BulletMLLib.ChangeDirectionTask.Run C# (CSharp) Метод

Run() публичный Метод

public Run ( Bullet bullet ) : ERunStatus
bullet Bullet
Результат ERunStatus
        public override ERunStatus Run(Bullet bullet)
        {
            //change the direction of the bullet by the correct amount
            bullet.Direction += DirectionChange;

            //decrement the amount if time left to run and return End when this task is finished
            Duration -= 1.0f * bullet.TimeSpeed;
            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;
            }
        }