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); }
public override void Perform() { if (m_ConcreteAction == null) { return; } m_ConcreteAction.Perform(); }
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); }