Exemplo n.º 1
0
    /// <summary>
    /// Alter the game's state, such as to pause game or show BP window
    /// </summary>
    /// <param name="state"></param>
    public void SetState(string newState)
    {
        switch (newState)
        {
        case "NORMAL": state = STATE.NORMAL;
            eParty.ResetState();
            pParty.ResetState();
            break;

        case "ANIMATING": state = STATE.ANIMATING;
            break;

        case "SPECIAL_ANIMATING": state = STATE.SPECIAL_ANIMATING;
            break;

        case "COMMANDING": state = STATE.COMMANDING;
            break;

        case "SPECIAL_SELECTION": state = STATE.SPECIAL_SELECTION;
            break;

        case "SELECTION": state = STATE.SELECTION;
            break;

        case "TILE_SELECTION": state = STATE.TILE_SELECTION;
            board.SetColliders(true);
            break;

        case "LEVEL_UP": state = STATE.LEVEL_UP;
            break;

        case "PLAYER_PROJECTION": state = STATE.PLAYER_PROJECTION;
            break;

        case "ENEMY_PROJECTION": state = STATE.ENEMY_PROJECTION;
            break;

        case "PAUSED": state = STATE.PAUSED;
            break;

        case "VICTORY": state = STATE.VICTORY;
            break;

        case "GAME_OVER": state = STATE.GAME_OVER;
            break;

        case "FLEE_REPORT": state = STATE.FLEE_REPORT;
            break;

        default: Debug.Log("Not an existing state: " + newState); break;
        }

        ui.ChangingState();
    }
Exemplo n.º 2
0
    /// <summary>
    /// Alter the game's state, such as to pause game or show BP window
    /// </summary>
    /// <param name="state"></param>
    public void SetState(string newState)
    {
        switch (newState)
        {
        case "NORMAL": state = STATE.NORMAL;
            eParty.ResetState();
            pParty.ResetState();
            break;

        case "ANIMATING": state = STATE.ANIMATING;
            break;

        case "SPECIAL_ANIMATING": state = STATE.SPECIAL_ANIMATING;
            break;

        case "COMMANDING": state = STATE.COMMANDING;
            break;

        case "SPECIAL_SELECTION": state = STATE.SPECIAL_SELECTION;
            break;

        case "SELECTION": state = STATE.SELECTION;
            break;

        case "TILE_SELECTION": state = STATE.TILE_SELECTION;
            break;

        case "LEVEL_UP": state = STATE.LEVEL_UP;
            break;

        case "PLAYER_PROJECTION": state = STATE.PLAYER_PROJECTION;
            break;

        case "ENEMY_PROJECTION": state = STATE.ENEMY_PROJECTION;
            break;

        case "PAUSED": state = STATE.PAUSED;
            break;

        default: Debug.Log("Not an existing state: " + newState); break;
        }

        ui.ChangingState();
    }