public void ScheduleMovingSteps(IEnumerable <MovingStep> movingSteps) { ScheduledMovingSteps.Clear(); foreach (var movingStep in movingSteps) { ScheduledMovingSteps.Enqueue(movingStep); } }
private void ScheduleNextStep() { if (CurrentMovingStep == null && ScheduledMovingSteps.Count > 0) { Progress = 0; PreviousFacing = transform.forward; PreviousPosition = transform.position; CurrentMovingStep = ScheduledMovingSteps.Dequeue(); CurrentMovingStepProgression = 0; } }