public void OnGameEvent(GameFlowEvent flowEvent) { if (flowEvent.GetAction() == EGameFlowAction.Start) { ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.Menu: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowMenuState)); break; case EGameFlowAction.LevelSelection: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelSelectionState)); break; case EGameFlowAction.NextLevel: if (!LevelManagerProxy.Get().IsLastLevel()) { LevelManagerProxy.Get().NextLevel(); ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); } break; case EGameFlowAction.Retry: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); break; case EGameFlowAction.Resume: ChangeNextTransition(HSMTransition.EType.Exit); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.EndDialogue: if (m_HasEnded) { if (!LevelManagerProxy.Get().IsLastLevel()) { LevelManagerProxy.Get().NextLevel(); ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); } else { ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowEndGameState)); } } break; case EGameFlowAction.GameOver: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowGameOverState)); break; case EGameFlowAction.LevelWon: m_HasEnded = true; break; case EGameFlowAction.Menu: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowMenuState)); break; } }
public void OnGameEvent(GameFlowEvent gameFlowEvent) { if (gameFlowEvent.GetAction() == EGameFlowAction.EndLevelPanel) { gameObject.SetActive(true); } }
public void OnGameEvent(GameFlowEvent gameFlowEvent) { if (gameFlowEvent.GetAction() == EGameFlowAction.EndDialogue) { m_Demon.SetActive(false); } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.StartDialogue: ChangeNextTransition(HSMTransition.EType.Child, typeof(GameFlowDialogueState)); break; case EGameFlowAction.EndDialogue: new GameFlowEvent(EGameFlowAction.EndLevelPanel).Push(); break; case EGameFlowAction.LevelSelection: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelSelectionState)); break; case EGameFlowAction.Menu: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowMenuState)); break; case EGameFlowAction.Retry: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); break; case EGameFlowAction.NextLevel: if (!LevelManagerProxy.Get().IsLastLevel()) { LevelManagerProxy.Get().NextLevel(); ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); } break; } }
void EnterFlowState(GameFlowEvent flowEvent) { if (GameEventNotifier != null) { GameEventNotifier(this, flowEvent); } m_CurrentState = flowEvent; }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.EndDialogue: ChangeNextTransition(HSMTransition.EType.Exit); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.Menu: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowMenuState)); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.StartDialogue: ChangeNextTransition(HSMTransition.EType.Child, typeof(GameFlowDialogueState)); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.SuccessEdge: m_Player.OnEdge(null, false); ChangeNextTransition(HSMTransition.EType.Siblings, typeof(GameFlowNormalState)); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { StopAllCoroutines(); if (flowEvent.GetAction() == EGameFlowAction.StartTransition) { BlackOut(); } if (flowEvent.GetAction() == EGameFlowAction.EndTransition) { StartCoroutine(FadeIn()); } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.EnterNode: ChangeNextTransition(HSMTransition.EType.Siblings, typeof(GameFlowNodeState)); break; case EGameFlowAction.EnterEdge: ChangeNextTransition(HSMTransition.EType.Siblings, typeof(GameFlowEdgeState)); break; case EGameFlowAction.StartDialogue: ChangeNextTransition(HSMTransition.EType.Top, typeof(GameFlowDialogueState)); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.Quit: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowMenuState)); break; case EGameFlowAction.Retry: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowNormalState)); break; case EGameFlowAction.Resume: ChangeNextTransition(HSMTransition.EType.Exit); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.StartDialogue: UpdaterProxy.Get().SetPause(true); ChangeNextTransition(HSMTransition.EType.Child, typeof(GameFlowDialogueState)); break; case EGameFlowAction.EndDialogue: UpdaterProxy.Get().SetPause(false); break; case EGameFlowAction.EndLevel: ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowEndLevelState)); break; } }
public void OnGameEvent(GameFlowEvent flowEvent) { switch (flowEvent.GetAction()) { case EGameFlowAction.LeaveNode: ChangeNextTransition(HSMTransition.EType.Siblings, typeof(GameFlowNormalState)); break; case EGameFlowAction.LevelWon: if (!LevelManagerProxy.Get().IsLastLevel()) { LevelManagerProxy.Get().NextLevel(); ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState)); } else { ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowEndGameState)); } break; } }
/// <summary> /// Include A, Not Include B /// </summary> /// <returns></returns> bool BetweenFlowState(GameFlowEvent target, GameFlowEvent A, GameFlowEvent B) { return((int)target >= (int)A && (int)target < (int)B); }