void Awake() { shipMovementHandler = GetComponent <ShipMovementHandler>(); //Only use this component on players if (!shipMovementHandler.IsPlayer()) { Destroy(this); return; } weaponHandlers = GetComponentsInChildren <WeaponHandler>(); shipFuelHandler = GetComponent <ShipFuelHandler>(); laserAudioSource.volume = 0; }
void Awake() { particleSystemEmissionModule = GetComponent <ParticleSystem>().emission; shipMovementHandler = GetComponentInParent <ShipMovementHandler>(); }
//Awake is called when the script instance is being loaded. void Awake() { shipMovementHandler = GetComponent <ShipMovementHandler>(); weaponHandlers = GetComponentsInChildren <WeaponHandler>(); missileLauncherHandler = GetComponentsInChildren <MissileLauncherHandler>(); }