private IEnumerator SquareFormationPatrol() { if (_currentState == GenericShipAiState.SquarePatrolling) { // Get random forward position and set it as destination. _forwardSquarePatrolPoint = GetRandomForwardPosition(); model.SetDestinationInput(_forwardSquarePatrolPoint); while (transform.position != _forwardSquarePatrolPoint) { yield return(new WaitForSeconds(_behaviorChangeRate)); } } }
protected virtual void SendInput() { // Set keyboard mode myShip.SetKeyboardMovement(UseKeyboard); // Enable if you want the ship to fly toward the mouse cursor position myShip.SetDestinationInput(mouseInput); myShip.SetKeyboardDestinationInput(keyboardInput); myShip.SetRotationInput(mouseInput); myShip.SetFireInput(Fire1); myShip.SetSecondaryInput(Fire2); }