// Use this for initialization void Start() { flightControl = GetComponent <FlightControl> (); radarSystem = GetComponent <RadarSystem> (); targetSystem = GetComponent <TargetSystem> (); weaponSystem = GetComponent <WeaponSystem> (); cmSystem = GetComponent <CounterMeasureSystem> (); }
void SpawnPlayer() { if (player == null) { player = (GameObject)Instantiate(playerPrefab, playerSpawnPoint.transform.position, playerSpawnPoint.transform.rotation); playerManager = player.GetComponentInChildren <PlayerManager> (); FlightControl fc = player.GetComponentInChildren <FlightControl> (); fc.m_thrust = fc.m_maxThrust / 2f; fc.m_velocity = fc.m_maxVelocity / 4f; } }
void Start() { flightControl = GetComponent <FlightControl> (); aircraftController = GetComponent <AircraftController> (); ResetPlayer(); }
// Use this for initialization void Start() { // connecting to core modules flightControl = host.GetComponent <FlightControl> (); }