private async Task StartMovement(MovementCommandsQueue lineMovementCommandsQueue, bool delayFire) { _fireController.AllowFire(delayFire?3:0); await _enemyMover.DoMovement(lineMovementCommandsQueue); _fireController.RestrictFire(); }
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; } }
public Task StartIncomingMovement(MovementCommandsQueue lineMovementCommandsQueue) { return(StartMovement(lineMovementCommandsQueue, true)); }