Пример #1
0
        private async Task StartMovement(MovementCommandsQueue lineMovementCommandsQueue, bool delayFire)
        {
            _fireController.AllowFire(delayFire?3:0);
            await _enemyMover.DoMovement(lineMovementCommandsQueue);

            _fireController.RestrictFire();
        }
Пример #2
0
        public async Task DoMovement(MovementCommandsQueue movementCommandsQueue)
        {
            transform.SetParent(null);

            foreach (var movementAction in movementCommandsQueue.Actions)
            {
                if (enabled && gameObject.activeInHierarchy)
                {
                    await DoAction(movementAction);
                }
            }

            _currentStrategy = null;

            if (enabled && gameObject.activeInHierarchy)
            {
                transform.SetParent(_formationCell);
                transform.localRotation = Quaternion.identity;
                transform.localPosition = Vector3.zero;
            }
        }
Пример #3
0
 public Task StartIncomingMovement(MovementCommandsQueue lineMovementCommandsQueue)
 {
     return(StartMovement(lineMovementCommandsQueue, true));
 }