private void MakeAStep() { //Vector2 nextStep = steps.Dequeue(); TrunkStep nextStep = steps.Dequeue(); transform.position = nextStep.stepPosition; }
public void InitializeSteps(Vector2 target) { steps = new Queue <TrunkStep>(); for (int i = 0; i < GameMode.BODY_FRAMES_BEHIND; i++) { Vector2 newStep = Vector2.Lerp(transform.position, target, (float)i / (float)stepsBehind); TrunkStep newTrunkStep = new TrunkStep(newStep, false); steps.Enqueue(newTrunkStep); } }
public void AddStep(Vector2 step, bool high) { TrunkStep tempStep = new TrunkStep(step, high); steps.Enqueue(tempStep); }