コード例 #1
0
    private void MakeAStep()
    {
        //Vector2 nextStep = steps.Dequeue();
        TrunkStep nextStep = steps.Dequeue();

        transform.position = nextStep.stepPosition;
    }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
    public void AddStep(Vector2 step, bool high)
    {
        TrunkStep tempStep = new TrunkStep(step, high);

        steps.Enqueue(tempStep);
    }