コード例 #1
0
    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;
    }
コード例 #2
0
 void Awake()
 {
     particleSystemEmissionModule = GetComponent <ParticleSystem>().emission;
     shipMovementHandler          = GetComponentInParent <ShipMovementHandler>();
 }
コード例 #3
0
 //Awake is called when the script instance is being loaded.
 void Awake()
 {
     shipMovementHandler    = GetComponent <ShipMovementHandler>();
     weaponHandlers         = GetComponentsInChildren <WeaponHandler>();
     missileLauncherHandler = GetComponentsInChildren <MissileLauncherHandler>();
 }