Esempio n. 1
0
 public void OnGameEvent(GameFlowEvent flowEvent)
 {
     if (flowEvent.GetAction() == EGameFlowAction.Start)
     {
         ChangeNextTransition(HSMTransition.EType.Clear, typeof(GameFlowLevelState));
     }
 }
Esempio n. 2
0
    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;
        }
    }
Esempio n. 3
0
    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;
        }
    }
Esempio n. 4
0
 public void OnGameEvent(GameFlowEvent gameFlowEvent)
 {
     if (gameFlowEvent.GetAction() == EGameFlowAction.EndLevelPanel)
     {
         gameObject.SetActive(true);
     }
 }
Esempio n. 5
0
 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;
        }
    }
Esempio n. 7
0
 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;
     }
 }
Esempio n. 11
0
 public void OnGameEvent(GameFlowEvent flowEvent)
 {
     switch (flowEvent.GetAction())
     {
     case EGameFlowAction.SuccessEdge:
         m_Player.OnEdge(null, false);
         ChangeNextTransition(HSMTransition.EType.Siblings, typeof(GameFlowNormalState));
         break;
     }
 }
Esempio n. 12
0
 public void OnGameEvent(GameFlowEvent flowEvent)
 {
     StopAllCoroutines();
     if (flowEvent.GetAction() == EGameFlowAction.StartTransition)
     {
         BlackOut();
     }
     if (flowEvent.GetAction() == EGameFlowAction.EndTransition)
     {
         StartCoroutine(FadeIn());
     }
 }
Esempio n. 13
0
    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;
        }
    }
Esempio n. 14
0
    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;
        }
    }
Esempio n. 15
0
    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;
        }
    }
Esempio n. 16
0
    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;
        }
    }
Esempio n. 17
0
 /// <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);
 }