Пример #1
0
 public LinearMoveTask(AiController worker, Action <AiController> onPreUpdate, Vector2 start, Vector2 end,
                       float speed, bool canBeCanceled) : base(worker, onPreUpdate)
 {
     _start        = start;
     _cur          = start;
     _end          = end;
     _speed        = speed;
     CanBeCanceled = canBeCanceled;
 }
Пример #2
0
        public BezierMoveTask(AiController worker, Action <AiController> onPreUpdate, BezierCurve curve, float speed) :
            base(worker, onPreUpdate)
        {
            _curve = curve;
            _speed = speed;

            _v1 = -3 * curve.A + 9 * curve.B - 9 * curve.C + 3 * curve.D;
            _v2 = 6 * curve.A - 12 * curve.B + 6 * curve.C;
            _v3 = -3 * curve.A + 3 * curve.B;
        }
Пример #3
0
 protected MovementTask(AiController worker, Action <AiController> onPreUpdate)
 {
     Worker       = worker;
     _onPreUpdate = onPreUpdate;
 }
Пример #4
0
 public WaitTask(AiController worker, Action <AiController> onPreUpdate, float time)
     : base(worker, onPreUpdate)
 {
     _time = time;
 }