// 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(); } }
// Update is called once per frame void Update() { plane.Move(Pitch: Pitch, Roll: Roll, Yaw: Yaw, Throttle: Throttle); }