예제 #1
0
 public static void SendSIG(GAME_SIG game_sig)
 {
     if (game_sig != GAME_SIG.Non)
     {
         UpdateState(game_sig);
     }
 }
예제 #2
0
    private static void UpdateState(GAME_SIG game_sig)
    {
        switch (now_state)
        {
        case GAME_STAT.Menu:
            if (game_sig == GAME_SIG.Game)
            {
                now_state = GAME_STAT.Game;
            }
            else if (game_sig == GAME_SIG.Tutorial)
            {
                now_state = GAME_STAT.Tutorial;
            }
            break;

        case GAME_STAT.Game:
            if (game_sig == GAME_SIG.Menu)
            {
                now_state = GAME_STAT.Menu;
            }
            else if (game_sig == GAME_SIG.Pause)
            {
                now_state = GAME_STAT.Pause;
            }
            else if (game_sig == GAME_SIG.GameOver)
            {
                now_state = GAME_STAT.GameOver;
            }
            break;

        case GAME_STAT.Tutorial:
            if (game_sig == GAME_SIG.Game)
            {
                now_state = GAME_STAT.Game;
            }
            else if (game_sig == GAME_SIG.Menu)
            {
                now_state = GAME_STAT.Menu;
            }
            break;

        case GAME_STAT.Pause:
            if (game_sig == GAME_SIG.Game)
            {
                now_state = GAME_STAT.Game;
            }
            break;

        case GAME_STAT.GameOver:
            if (game_sig == GAME_SIG.Game)
            {
                now_state = GAME_STAT.Game;
            }
            else if (game_sig == GAME_SIG.Menu)
            {
                now_state = GAME_STAT.Menu;
            }
            break;

        default:
            Debug.Log("Error!! Invalid game state: " + now_state);
            break;
        }
    }