示例#1
0
    // 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);
    }
示例#2
0
    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();
    }
示例#3
0
    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;
            }
        }
    }
示例#5
0
    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;
    }
示例#6
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);
 }
 // Use this for initialization
 void Start()
 {
     rockExplosion = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.RockExplosion);
 }
示例#8
0
 protected virtual void PlayPowerupSound()
 {
     powerupAppearSound   = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.PowerupAppear);
     powerupObtainedSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.PowerupObtained);
     powerupAppearSound.PlayAudioClip();
 }
示例#9
0
 void Start()
 {
     meteorSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MeteorExplosion);
 }
示例#10
0
 void Awake()
 {
     meteorStrikeSound = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.MeteorStrikeAppear);
 }
示例#11
0
 public void PlaySoundEffect(AudioSimple audioSimple)
 {
 }
 void Awake()
 {
     countdown = this.GetComponent <AudioSimple>();
 }
示例#13
0
 // Use this for initialization
 void Start()
 {
     redShieldImpact = AudioManager.Instance.FindAudioClip(AudioManager.SoundName.RedShieldImpact);
 }