Пример #1
0
 /// <summary> Check if the Next Target is a Air Target</summary>
 private void CheckAirTarget()
 {
     if (NextWayPoint != null && NextWayPoint.PointType == WayPointType.Air)    //If the animal can fly, there's a new wayPoint & is on the Air
     {
         Debuging(name + ": NextTarget is AIR", NextTarget.gameObject);
         animal.State_Activate(StateEnum.Fly);
         FreeMove = true;
     }
 }
Пример #2
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();
        }