Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (!Target)
        {
            FindTarget();
        }
        Pitch    = Input.GetAxis("Pitch");
        Roll     = Input.GetAxis("Roll");
        Throttle = Input.GetAxis("Throttle");
        Yaw      = Input.GetAxis("Yaw");
        plane.Move(Pitch: Pitch, Roll: Roll, Yaw: Yaw, Throttle: Throttle);

        if (Input.GetKey(KeyCode.LeftControl))
        {
            plane.ShootMiniGun();
        }
        if (Input.GetKeyDown(KeyCode.Space))
        {
            plane.LaunchMissile();
        }
    }
Exemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     plane.Move(Pitch: Pitch, Roll: Roll, Yaw: Yaw, Throttle: Throttle);
 }