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


C# IEvent.GetName方法代码示例

本文整理汇总了C#中IEvent.GetName方法的典型用法代码示例。如果您正苦于以下问题:C# IEvent.GetName方法的具体用法?C# IEvent.GetName怎么用?C# IEvent.GetName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IEvent的用法示例。


在下文中一共展示了IEvent.GetName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: if

 bool IEventListener.HandleEvent(IEvent e)
 {
     //print(e.GetName());
     if(e.GetName() == "PlayerLockEvent") {
         this.movable = false;
     } else if (e.GetName() == "PlayerUnlockEvent") {
         this.movable = true;
     }
     return true;
 }
开发者ID:Archanium,项目名称:ngj,代码行数:10,代码来源:MovementController.cs

示例2: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
         case "NodeDisconnectedEvent" :
             break;
     }
     return false;
 }
开发者ID:mahalis,项目名称:ggj-2013,代码行数:8,代码来源:SoundManager.cs

示例3: interactionSatisfied

    /*
    void interactionSatisfied () {
        if (this.popup != null){
            GameObject.Destroy(this.popup);
            this.popup = PopupManager.getInstance().showPopupFromGameObject("thankYou",this.gameObject, new Vector3(0,0.75f,0));
            StartCoroutine(hideThankYou());
        }
    }

    IEnumerator hideThankYou() {
        yield return new WaitForSeconds(1f);
        GameObject.Destroy(this.popup);
        this.popup = null;
    }
    */
    bool IEventListener.HandleEvent(IEvent evt)
    {
        switch (evt.GetName()) {
        case "HeroInteractEvent":
            this.heroInteracted();
            break;
        }
        return false;
    }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:24,代码来源:InteractionTarget.cs

示例4: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "GameOverEvent":
         StartCoroutine(Fade());
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:9,代码来源:FadeToBlack.cs

示例5: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "DoorOpen":
         GameObject.Destroy(this.gameObject);
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:9,代码来源:FrontDoorInteractionArea.cs

示例6: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
         case "DisconnectAllNodesEvent" :
             startZapping();
             break;
     }
     return false;
 }
开发者ID:mahalis,项目名称:ggj-2013,代码行数:9,代码来源:BackgroundManager.cs

示例7: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "DoorOpen":
         StartCoroutine("SwingOpen");
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:9,代码来源:SwingOpener.cs

示例8: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
         case "NodeConnectionsChangedEvent" :
             nodeConnectionsChanged();
             break;
     }
     return false;
 }
开发者ID:mahalis,项目名称:ggj-2013,代码行数:9,代码来源:GameManager.cs

示例9: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "PhoneCall":
         Call ();
         StartCoroutine("ShakePhone");
         break;
     }
     return true;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:10,代码来源:Caller.cs

示例10: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "PhoneThrow":
         Throw();
         EventManager.TriggerEventAfter(new PhoneCall(), phoneCallDelay);
         break;
     }
     return true;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:10,代码来源:Thrower.cs

示例11: switch

 /////////////////////  BLAH  /////////////////////
 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
         case "GameStateProgressEvent":
             GameState prog = ((GameStateProgressEvent)evt).GetProgress();
             this.CheckProgress(prog);
             break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:11,代码来源:GameManager.cs

示例12: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "BabyFedEvent":
         Debug.Log ("Baby Fed Event");
         this.AnimateBabyExit();
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:10,代码来源:BabiesController.cs

示例13: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "GameStartEvent":
         targetTransform = target.transform;
         this.shouldFollow = false;
         StartCoroutine(lerpToHero());
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:11,代码来源:FollowController.cs

示例14: PlayerLockEvent

    bool IEventListener.HandleEvent(IEvent e)
    {
        if (e.GetName() == "SceneChangeEvent")
        {
            this.index = int.Parse(e.GetData() as string);
            var scene = (SceneNames)this.index;
            var offset = CameraXOffsetAttribute.GetOffset(scene);
            //print (this.index);
            EventManager.instance.AddListener(this as IEventListener, "FadeEvent");
            EventManager.instance.QueueEvent(new PlayerLockEvent());
            EventManager.instance.QueueEvent(new FadeOutEvent(2));
            if (index < endSceneStart)
            {
                this.TransformPlayer(offset);
            }

        }
        if (e.GetName() == "FadeEvent")
        {
            if (bool.TrueString == e.GetData() as string)
            {
                var scene = (SceneNames)this.index;
                var offset = CameraXOffsetAttribute.GetOffset(scene);
                this.TransformCamera(offset);
                EventManager.instance.QueueEvent(new FadeInEvent(2));
            }
            else if (bool.FalseString == e.GetData() as string)
            {
                EventManager.instance.DetachListener(this as IEventListener, "FadeEvent");
                EventManager.instance.QueueEvent(new PlayerUnlockEvent());

                if (index == endSceneStart)
                {
                    this.shown = true;
                }
            }
        }

        return true;
    }
开发者ID:Archanium,项目名称:ngj,代码行数:40,代码来源:SceneChanger.cs

示例15: switch

 bool IEventListener.HandleEvent(IEvent evt)
 {
     switch (evt.GetName()) {
     case "GameOverEvent":
         this.rigidbody2D.isKinematic = true;
         Leaver l = this.gameObject.AddComponent<Leaver>();
         l.speed = 15;
         l.Leave();
         SetMovementInteractionEnabled(false);
         break;
     case "GameStartEvent":
         SetMovementInteractionEnabled(true);
         break;
     }
     return false;
 }
开发者ID:jamiltron,项目名称:ggj2014,代码行数:16,代码来源:HeroController.cs


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