Exemplo n.º 1
0
    /** Manage the ring's state update
     * Handling the "Input state changers" before the "Update state changers"
     */
    public void Update()
    {
        StateBase state = _move.Update(_ring);

        if (state != null)
        {
            ChangeMoveState((MoveState)state);
        }
    }
Exemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        switch (FSM.CurrentState)
        {
        case State.IDLE:
            IdleState.Update();
            break;

        case State.MOVE:
            MoveState.Update();
            break;

        case State.JUMP:
            JumpState.Update();
            break;

        case State.DEAD:
            DeadState.Update();
            break;

        default:
            throw new System.NotImplementedException($"{FSM.CurrentState} state not implemented.");
        }
    }