// Basically the Start method of the script, // since the Start of a base class script will not be called protected void InitShip() { if(m_exploder == null) m_exploder = Resources.Load("ShipPrefabs/ShipExplosion") as GameObject; m_thrust = GetComponent<ThrustScript>(); m_hitParticles = GetComponentInChildren<HitParticleSpawner>(); InitWeapons(); // Temporary Transform shieldTrans = transform.FindChild( "Shield" ); if( shieldTrans != null ) { m_shield = shieldTrans.GetComponent<ShieldScript>(); } }
// Basically the Start method of the script, // since the Start of a base class script will not be called protected void InitShip() { if (m_exploder == null) { m_exploder = Resources.Load("ShipPrefabs/ShipExplosion") as GameObject; } m_thrust = GetComponent <ThrustScript>(); m_hitParticles = GetComponentInChildren <HitParticleSpawner>(); InitWeapons(); // Temporary Transform shieldTrans = transform.FindChild("Shield"); if (shieldTrans != null) { m_shield = shieldTrans.GetComponent <ShieldScript>(); } }