Пример #1
0
        public override bool TakeTurn()
        {
            Profiler.BeginSample("PlayerActor");

            bool result = false;

            if (firstRun)
            {
                UpdateVisibility();
                UpdateAudibility();
                firstRun = false;
            }
            else if (chosenAction != null)
            {
                chosenAction.Perform();
                UpdateVisibility();
                UpdateAudibility();
                //Controllers.ui.UpdateCameraTrack();
                Controllers.ui.CameraTrackPop();
                Controllers.ui.inputActive = false;
                result = true;
            }

            Profiler.EndSample();

            return(result);
        }
Пример #2
0
 public override void Perform()
 {
     if (m_ConcreteAction == null)
     {
         return;
     }
     m_ConcreteAction.Perform();
 }
Пример #3
0
        public override bool TakeTurn()
        {
            Profiler.BeginSample("EnemyActor");

            ActorAction chosenAction = null;

            if (priorityAction.CanPerform())
            {
                chosenAction = priorityAction;
            }
            else
            {
                chosenAction = otherActions.Where(x => x.CanPerform()).RandomPick();
            }

            chosenAction.Perform();

            Profiler.EndSample();

            return(true);
        }