Exemplo n.º 1
0
    public void SetState(IMovementState state)
    {
        if (mState == state)
        {
            return;
        }

        Debug.LogFormat("{0} -> {1}", mState, state);

        stateText.text = state.ToString();

        if (mState != null)
        {
            mState.Exit();
        }
        mState = state;
        mState.Enter();

        anim.SetInteger("StateID", mState.ID);
    }