Пример #1
0
    protected virtual void PowerupFunctionality()
    {
        switch (type)
        {
        case PowerupManager.PowerupTypes.ELECTIC_MISSLE_LAUNCHER:
            ElectricMissleLauncher missleLauncher = this.gameObject.AddComponent <ElectricMissleLauncher>();
            missleLauncher.SetUpLauncher(playerWhoEarnedPowerup, powerupManager.emlMissleSpeed, powerupManager.maxEMLMissles, powerupManager.emlTimeUntilExplosion, this);
            break;

        case PowerupManager.PowerupTypes.AUTO_FIRE_BLASTER:
            AutoFireBlaster fireBlaster = this.gameObject.AddComponent <AutoFireBlaster>();
            fireBlaster.autoBlasterDelayAmount = powerupManager.autoBlasterDelayAmount;
            fireBlaster.RapidFire(playerWhoEarnedPowerup);
            break;

        case PowerupManager.PowerupTypes.BUBBLE_SHIELD:
            //Bubble SHield
            break;
        }
    }
Пример #2
0
 //gets reference to the bulelt manager to get player identifier
 public void Instantiate(ElectricMissleLauncher eml)
 {
     missleLauncher       = eml;
     timeUntilExplosion   = eml.timeUntilMissleExplosion;
     missleExplosionSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MissleExplosion);
 }