Пример #1
0
        /// <summary>Enables the Zone using the State</summary>
        private void ActivateStateZone()
        {
            switch (stateAction)
            {
            case StateAction.Activate:
                CurrentAnimal.State_Activate(stateID);
                break;

            case StateAction.AllowExit:
                if (CurrentAnimal.ActiveStateID == stateID)
                {
                    CurrentAnimal.ActiveState.AllowExit();
                }
                break;

            case StateAction.ForceActivate:
                CurrentAnimal.State_Force(stateID);
                break;

            case StateAction.Enable:
                CurrentAnimal.State_Enable(stateID);
                break;

            case StateAction.Disable:
                CurrentAnimal.State_Disable(stateID);
                break;

            default:
                break;
            }

            StatModifier.ModifyStat(AnimalStats);
            AlignAnimal();
            OnZoneActivation.Invoke();
        }