// Use this for initialization void Start() { this.gameObject.SetActive(true); healthPoints = 2; shieldImpactSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.BlueShieldImpact); shieldDestructionSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.BlueShieldDestruction); }
public void SetUpLaserAssault(Player.PlayerIdentity identity, float laserBeamSpeed, float laserLifespan, float topRotation, float bottomRotation) { playerWhoSpawnedIt = identity; laserSpeed = laserBeamSpeed; laserLife = laserLifespan; topLaserRotation = topRotation; bottomLaserRotation = bottomRotation; laserAppear = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.LaserAssaultAppear); laserCharging = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.LaserAssaultCharge); laserFiring = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.LaserAssaultFiring); laserAppear.PlayAudioClip(); }
public void SetUpLauncher(Player.PlayerIdentity identity, float speed, int missles, float explosionTime, Powerup pu) { missleFireSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MissleFiring); misslePrefab = Resources.Load("Powerups/MisslesAndLasers/Missle") as GameObject; missleSpeed = speed; missleAmount = missles; powerup = pu; timeUntilMissleExplosion = explosionTime; for (int x = 0; x < GameObject.FindObjectsOfType <Player>().Length; x++) { if (GameObject.FindObjectsOfType <Player>()[x].identifier == identity) { player = GameObject.FindObjectsOfType <Player>()[x].gameObject; playerShooter = player.GetComponent <PlayerShootingManager>(); playerShooter.enabled = false; } } }
private void GetGunSoundReference() { if (gunSound == null) { switch (shooterIdentity) { case Player.PlayerIdentity.PLAYER_1: gunSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P1GunSound); break; case Player.PlayerIdentity.PLAYER_2: gunSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P2GunSound); break; default: gunSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P1GunSound); break; } } }
void Start() { this.transform.FindChild("Missile Launcher").gameObject.SetActive(false); this.transform.FindChild("AutoBlaster").gameObject.SetActive(false); #region Get Death Sound switch (identifier) { case PlayerIdentity.PLAYER_1: deathSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P1ShipExplosion); break; case PlayerIdentity.PLAYER_2: deathSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P2ShipExplosion); break; } #endregion #region Get Hover Sound switch (identifier) { case PlayerIdentity.PLAYER_1: hoverSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P1Hovering); break; case PlayerIdentity.PLAYER_2: hoverSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.P2Hovering); break; } #endregion hoverSound.LoopAudioClip(); //Setting rigidbody values rigidbody.drag = momentumDrag; rigidbody.useGravity = affectedByGravity; }
//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); }
// Use this for initialization void Start() { rockExplosion = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.RockExplosion); }
protected virtual void PlayPowerupSound() { powerupAppearSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.PowerupAppear); powerupObtainedSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.PowerupObtained); powerupAppearSound.PlayAudioClip(); }
void Start() { meteorSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MeteorExplosion); }
void Awake() { meteorStrikeSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MeteorStrikeAppear); }
public void PlaySoundEffect(AudioSimple audioSimple) { }
void Awake() { countdown = this.GetComponent <AudioSimple>(); }
// Use this for initialization void Start() { redShieldImpact = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.RedShieldImpact); }