本文整理汇总了C#中GameEvent.getParameter方法的典型用法代码示例。如果您正苦于以下问题:C# GameEvent.getParameter方法的具体用法?C# GameEvent.getParameter怎么用?C# GameEvent.getParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameEvent
的用法示例。
在下文中一共展示了GameEvent.getParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: eventHappened
public override void eventHappened(GameEvent ge)
{
if(ge.getParameter("Inventory") == this || ge.getParameter("Inventory") == this.Entity.gameObject)
{
Item item = (Item)ge.getParameter("Item");
switch (ge.Name.ToLower())
{
case "open inventory":
openInventory = true;
events.Add(ge);
break;
case "add item":
itemsToAdd.Add (item);
events.Add(ge);
break;
case "remove item":
itemsToRemove.Add(item);
events.Add(ge);
break;
case "use item":
itemsToUse.Add(item);
events.Add(ge);
break;
}
}
}
示例2: useEvent
public void useEvent(GameEvent ge)
{
this.ge = ge;
this.ge.Name = this.EventName;
if (ge.getParameter ("switch") == null)
ge.setParameter ("switch", "");
if (ge.getParameter ("value") == null)
ge.setParameter ("value", true);
}
示例3: EventHappened
public void EventHappened(GameEvent ge)
{
if(ge.getParameter("Launcher") == this)
{
switch (ge.Name.ToLower())
{
case "ended fragment":
next = true;
break;
case "chosen option":
chosen = (int)ge.getParameter("option");
break;
}
}
}
示例4: parseEvent
private GameEvent parseEvent(GameEvent ge)
{
foreach (string contenido_param in ge.Params) {
object param = ge.getParameter(contenido_param);
if (contenido_param.Equals("direction")) {
Mover.Direction t = new Mover.Direction();
switch ((System.String)param) {
case "North": ge.setParameter(contenido_param, t); break;
case "East": ge.setParameter(contenido_param, t + 1); break;
case "South": ge.setParameter(contenido_param, t + 2); break;
case "West": ge.setParameter(contenido_param, t + 3); break;
}
} else {
if (param.GetType() == typeof(System.Int32)) {
int intParam = (int)param;
if (EntityMap.getInstance().getEntityMap().ContainsKey(intParam)) {
UnityEngine.Object go_src;
EntityMap.getInstance().getEntityMap().TryGetValue(intParam, out go_src);
ge.setParameter(contenido_param, go_src);
}
}/* else {
Debug.Log("====================================");
Debug.Log("tipo: " + param.GetType() + ", valor: " + param);
Debug.Log("====================================");
}*/
}
}
return ge;
}
示例5: EventHappened
public void EventHappened(GameEvent ge)
{
Debug.Log ("Something happened: " + ge.Name);
if(waitTillEventFinished)
if(ge.Name.ToLower() == "event finished")
waitTillEventFinished = ge.getParameter("event") != node.Content;
}
示例6: detachEvent
public void detachEvent(GameEvent ge)
{
if (ge.getParameter("switch") == "")
{
ge.removeParameter("switch");
ge.removeParameter("value");
}
}
示例7: eventHappened
public override void eventHappened(GameEvent ge)
{
switch(ge.Name.ToLower()){
case "pick":
if(ge.getParameter("Executer") != null && ge.getParameter ("Item") == this){
Entity executor = ge.getParameter("Executer") as Entity;
by = executor.GetComponent<Inventory>();
picked = by != null;
}
break;
case "event finished":
if(ge.getParameter("event") == addItemEvent)
destroy = true;
break;
}
}
示例8: ReceiveEvent
public override void ReceiveEvent(GameEvent ev)
{
if(ev.Name == "ShowAnimation"){
Decoration dec = (ev.getParameter("Objetive") as GameObject).GetComponent<Decoration>();
GameObject animation = (GameObject)ev.getParameter("Animation");
GameObject go = (GameObject) GameObject.Instantiate(animation);
Decoration animation2 = go.GetComponent<Decoration>();
animation2.GetComponent<Renderer>().sharedMaterial = new Material(Shader.Find("Transparent/Cutout/Diffuse"));
animation2.Father = dec;
animation2.adaptate();
AutoAnimator anim = go.GetComponent<AutoAnimator>();
anim.registerEvent(ev);
}
}
示例9: eventHappened
public override void eventHappened(GameEvent ge)
{
if(ge.getParameter("Talker") == this){
switch (ge.Name.ToLower()) {
case "talk":
start = true;
break;
}
}
}
示例10: eventFinished
public void eventFinished(GameEvent ge)
{
object sync = ge.getParameter("synchronous");
if(sync!=null && ((bool)sync)){
GameEvent f = ScriptableObject.CreateInstance<GameEvent>();
f.Name = "Event Finished";
f.setParameter("event", ge);
this.enqueueEvent(f);
}
}
示例11: eventHappened
public override void eventHappened(GameEvent ge)
{
// If we're waiting for the event finished
if(movement!=null)
if(ge.Name.ToLower() == "event finished")
// Let's check it's our event:
if(ge.getParameter("event") == movement){
// Ok it's done
movement = null;
}
}
示例12: ReceiveEvent
public override void ReceiveEvent(GameEvent ev)
{
if(secuenceInterpreter == null){
if(ev.Name.ToLower() == "start secuence"){
Secuence secuence = (ev.getParameter("Secuence") as Secuence);
secuenceInterpreter = new SecuenceInterpreter(secuence);
de = ControllerManager.onControllerEvent;
ControllerManager.onControllerEvent = null;
ControllerManager.onControllerEvent += this.onControllerEvent;
}
}else secuenceInterpreter.EventHappened(ev);
}
示例13: eventHappened
public override void eventHappened(GameEvent ge)
{
switch(ge.Name.ToLower()){
case "move": {
if(ge.getParameter("entity") == this.Entity || ge.getParameter("entity") == this.gameObject){
this.moveToCell = (Cell) ge.getParameter("cell");
this.move = moveToCell!=null;
distanceToMove = (ge.getParameter("distance")!=null)? (int) ge.getParameter("distance"): 0;
this.bcEvent = ge;
}
}break;
case "teleport": {
if(ge.getParameter("entity") == this.Entity || ge.getParameter("entity") == this.gameObject){
teleport = true;
teleportToCell = ge.getParameter("Cell") as Cell;
}
}break;
}
}
示例14: detachEvent
public void detachEvent(GameEvent ge)
{
if (ge.getParameter("item") == null) ge.removeParameter("item");
if (ge.getParameter("inventory") == null) ge.removeParameter("inventory");
}
示例15: actionEvent
private void actionEvent(GameEvent ge)
{
((EventMark) ge.getParameter("cell")).responseEvent(ge.getParameter("actionName").ToString());
}