Ejemplo n.º 1
0
 private void AttackTarget(GameObject enemy)
 {
     // While facing the enemy, shoot.
     if (IsFacingTarget(enemy))
     {
         model.SetFireInput(true);
     }
     if (!IsFacingTarget(enemy))
     {
         model.SetFireInput(false);
     }
 }
Ejemplo n.º 2
0
        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);
        }