本文整理汇总了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;
}
示例2: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "NodeDisconnectedEvent" :
break;
}
return false;
}
示例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;
}
示例4: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "GameOverEvent":
StartCoroutine(Fade());
break;
}
return false;
}
示例5: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "DoorOpen":
GameObject.Destroy(this.gameObject);
break;
}
return false;
}
示例6: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "DisconnectAllNodesEvent" :
startZapping();
break;
}
return false;
}
示例7: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "DoorOpen":
StartCoroutine("SwingOpen");
break;
}
return false;
}
示例8: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "NodeConnectionsChangedEvent" :
nodeConnectionsChanged();
break;
}
return false;
}
示例9: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "PhoneCall":
Call ();
StartCoroutine("ShakePhone");
break;
}
return true;
}
示例10: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "PhoneThrow":
Throw();
EventManager.TriggerEventAfter(new PhoneCall(), phoneCallDelay);
break;
}
return true;
}
示例11: switch
///////////////////// BLAH /////////////////////
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "GameStateProgressEvent":
GameState prog = ((GameStateProgressEvent)evt).GetProgress();
this.CheckProgress(prog);
break;
}
return false;
}
示例12: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "BabyFedEvent":
Debug.Log ("Baby Fed Event");
this.AnimateBabyExit();
break;
}
return false;
}
示例13: switch
bool IEventListener.HandleEvent(IEvent evt)
{
switch (evt.GetName()) {
case "GameStartEvent":
targetTransform = target.transform;
this.shouldFollow = false;
StartCoroutine(lerpToHero());
break;
}
return false;
}
示例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;
}
示例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;
}