Exemplo n.º 1
0
        public override void Start()
        {
            float           coeff      = 1F / jumps;
            Vector3         end        = point * coeff;
            Vector3         cp1        = Vector3.up * height;
            Vector3         cp2        = end + cp1;
            ActionBezierRel singleJump = new ActionBezierRel(cp1, cp2, end, duration * coeff);

            for (int i = 0; i < jumps; i++)
            {
                actions[i] = singleJump;
            }
            base.Start();
        }
Exemplo n.º 2
0
 public override void Start()
 {
     float coeff = 1F / jumps;
     if (locks != Axises.none)
         LockAxises(ref point);
     Vector3 start = target.gameObject.transform.position;
     Vector3 end = (point - start) * coeff;
     Vector3 cp1 = Vector3.up * height;
     Vector3 cp2 = end + cp1;
     ActionBezierRel singleJump = new ActionBezierRel(cp1, cp2, end, duration * coeff);
     for (int i = 0; i < jumps; i++)
     {
         actions[i] = singleJump;
     }
     base.Start();
 }