当前位置: 首页>>代码示例>>C#>>正文


C# GameEvent.getParameter方法代码示例

本文整理汇总了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;
         }
     }
 }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:26,代码来源:Inventory.cs

示例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);
 }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:9,代码来源:ChangeSwitchEventEditor.cs

示例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;
            }
        }
    }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:16,代码来源:DialogInterpreter.cs

示例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;
    }
开发者ID:NasK1991,项目名称:IsoMonks,代码行数:30,代码来源:ConnectionImp.cs

示例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;
 }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:7,代码来源:GameEventInterpreter.cs

示例6: detachEvent

 public void detachEvent(GameEvent ge)
 {
     if (ge.getParameter("switch") == "")
     {
         ge.removeParameter("switch");
         ge.removeParameter("value");
     }
 }
开发者ID:nvidiosin,项目名称:IsoAbbey,代码行数:8,代码来源:ChangeSwitchEventEditor.cs

示例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;
        }
    }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:17,代码来源:ItemScript.cs

示例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);
        }
    }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:18,代码来源:AnimationManager.cs

示例9: eventHappened

 public override void eventHappened(GameEvent ge)
 {
     if(ge.getParameter("Talker") == this){
         switch (ge.Name.ToLower()) {
         case "talk":
             start = true;
             break;
         }
     }
 }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:10,代码来源:Talker.cs

示例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);
     }
 }
开发者ID:NasK1991,项目名称:IsoMonks,代码行数:10,代码来源:Game.cs

示例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;
             }
 }
开发者ID:NasK1991,项目名称:IsoMonks,代码行数:11,代码来源:Player.cs

示例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);
 }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:12,代码来源:SecuenceManager.cs

示例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;
        }
    }
开发者ID:nvidiosin,项目名称:isoAbbeyTFG,代码行数:22,代码来源:Mover.cs

示例14: detachEvent

 public void detachEvent(GameEvent ge)
 {
     if (ge.getParameter("item") == null)       ge.removeParameter("item");
     if (ge.getParameter("inventory") == null)  ge.removeParameter("inventory");
 }
开发者ID:nvidiosin,项目名称:IsoAbbey,代码行数:5,代码来源:AddItemEditor.cs

示例15: actionEvent

 private void actionEvent(GameEvent ge)
 {
     ((EventMark) ge.getParameter("cell")).responseEvent(ge.getParameter("actionName").ToString());
 }
开发者ID:NasK1991,项目名称:IsoMonks,代码行数:4,代码来源:Game.cs


注:本文中的GameEvent.getParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。