Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (!pause)
     {
         if (executedTime < duration)
         {
             executedTime = (executedTime + Time.deltaTime) > duration ? duration : executedTime + Time.deltaTime;
             Vector2 v2Pos = MathParabola.Parabola2(start, end, height, LerpTime());
             this.transform.position = v2Pos;
         }
         else
         {
             notifyCurveMove(CurveMoveStatus.END);
             if (destoryAfterAnimation)
             {
                 Destroy();
             }
         }
     }
 }