BulletMLLib.AccelTask.Run C# (CSharp) Method

Run() public method

Run this task and all subtasks against a bullet This is called once a frame during runtime.
public Run ( Bullet bullet ) : ERunStatus
bullet Bullet The bullet to update this task against.
return ERunStatus
        public override ERunStatus Run(Bullet bullet)
        {
            //Add the acceleration to the bullet
              bullet.Acceleration += Acceleration;

              //decrement the amount if time left to run and return End when this task is finished
              Duration -= 1.0f * bullet.TimeSpeed * TimeFix.Delta;
              if (Duration <= 0.0f || startDuration <= 1)
              {
            TaskFinished = true;
            return ERunStatus.End;
              }
              else
              {
            //since this task isn't finished, run it again next time
            return ERunStatus.Continue;
              }
        }