Пример #1
0
    private void SetPreviousState()
    {
        var currentState        = Animator.GetCurrentAnimatorStateInfo(0);
        var activeCharacterName = CurrentParty.GetActiveCharacter();

        if (activeCharacterName.Equals(AlexaTag))
        {
            if (currentState.IsName(StateNames.AlexaUp))
            {
                PreviousState = StateNames.AlexaUp;
            }
            else if (currentState.IsName(StateNames.AlexaLeft))
            {
                PreviousState = StateNames.AlexaLeft;
            }
            else if (currentState.IsName(StateNames.AlexaRight))
            {
                PreviousState = StateNames.AlexaRight;
            }
            else if (currentState.IsName(StateNames.AlexaDown))
            {
                PreviousState = StateNames.AlexaDown;
            }
        }
        else if (activeCharacterName.Equals(RogerTag))
        {
            if (currentState.IsName(StateNames.RogerUp))
            {
                PreviousState = StateNames.RogerUp;
            }
            else if (currentState.IsName(StateNames.RogerLeft))
            {
                PreviousState = StateNames.RogerLeft;
            }
            else if (currentState.IsName(StateNames.RogerRight))
            {
                PreviousState = StateNames.RogerRight;
            }
            else if (currentState.IsName(StateNames.RogerDown))
            {
                PreviousState = StateNames.RogerDown;
            }
        }

        MainGame.Store().StatusEffectManager.AfterEffects();
    }