public void rpcSetOwnership(int photonID) { PhotonView view = PhotonNetwork.GetPhotonView(photonID); if (view != null) { CombatFlow player = view.GetComponent <CombatFlow>(); localOwned = player.localOwned || player.isLocalPlayer; // This fixes bug where client launching against host-owned npc if (localOwned) { RealFlightControl flightCont = GetComponent <RealFlightControl>(); if (flightCont != null) { flightCont.enabled = true; } BasicMissile missile = GetComponent <BasicMissile>(); if (missile != null) { missile.setHasPassed(true); } } } }
void Awake() { pm = PerspectiveManager.getPManager(); flight = GetComponent <RealFlightControl>(); myFlow = GetComponent <CombatFlow>(); myRb = GetComponent <Rigidbody>(); ai = GetComponent <AI_Aircraft>(); }
private void Awake() { missileRef = GetComponent <BasicMissile>(); weaponRef = GetComponent <Weapon>(); rocketMotor = GetComponent <RocketMotor>(); myFlightControl = GetComponent <RealFlightControl>(); myRB = GetComponent <Rigidbody>(); myRadar = GetComponent <Radar>(); }
public void linkHudToAircraft(GameObject aircraftRoot) { aircraftRootObj = aircraftRoot; if (aircraftRoot != null) { // SET REFERENCES root_rbRef = aircraftRootObj.GetComponent <Rigidbody>(); root_flightInfoObjRef = aircraftRootObj.GetComponent <RealFlightControl>(); root_Engine = aircraftRootObj.GetComponent <EngineControl>(); root_combatFlow = aircraftRootObj.GetComponent <CombatFlow>(); } }