Beispiel #1
0
    //Depending on dropdown box, one of these sounds will be played
    public void PlayDeathSound(DeathSound play)
    {
        switch (play)
        {
        case DeathSound.wihelmScream:
            this.WihelmScream();
            break;

        case DeathSound.manDeath1:
            this.ManDeath1();
            break;

        case DeathSound.bearDeath1:
            this.BearDeath1();
            break;

        case DeathSound.slimeDeath1:
            this.SlimeDeath1();
            break;

        case DeathSound.breath:
            this.Breath();
            break;

        default:
            this.WihelmScream();
            break;
        }
    }
Beispiel #2
0
 void OnCollisionEnter2D(Collision2D hit)
 {
     if (hit.gameObject.tag == "Killer")
     {
         theGameManager.RestartGame();
         playerSpeed            = playerSpeedStore;
         speedMilestoneCount    = speedMilestoneCountStore;
         speedIncreaseMilestone = speedIncreaseMilestoneStore;
         DeathSound.Play();
     }
 }
Beispiel #3
0
 // Start is called when a script is enabled. If you need to make sure something is initialized
 // put it in awake.
 //
 void Start()
 {
     footsound       = GameObject.Find("Billie").GetComponent <AudioSource> ();
     envtsounds      = GameObject.Find("Environmental Sound");
     deathSound      = GameObject.Find("DeathSound").GetComponent <DeathSound> ();
     cursor          = GameObject.Find("Main Camera").GetComponent <HandleCursor> ();
     Time.timeScale  = 1;
     gameoverObjects = GameObject.FindGameObjectsWithTag("ShowOnGameOver");
     menuObjects     = GameObject.FindGameObjectsWithTag("MenuButton");
     hidegameover();
 }
Beispiel #4
0
        protected void onDeath(EventArgs args)
        {
            EventHandler handler = DeathEvent;

            if (handler != null)
            {
                handler(this, args);
            }

            if (DeathSound != null)
            {
                DeathSound.Play();
            }
            ActiveAnimation = DeathAnimation;
        }
Beispiel #5
0
 //Depending on dropdown box, one of these sounds will be played
 public void PlayDeathSound(DeathSound play)
 {
     switch (play)
     {
     case DeathSound.wihelmScream:
         this.WihelmScream();
         break;
     case DeathSound.manDeath1:
         this.ManDeath1();
         break;
     case DeathSound.bearDeath1:
         this.BearDeath1();
         break;
     case DeathSound.slimeDeath1:
         this.SlimeDeath1();
         break;
     case DeathSound.breath:
         this.Breath();
         break;
     default:
         this.WihelmScream();
         break;
     }
 }
Beispiel #6
0
 /// <summary>
 /// Plays death sound.
 /// </summary>
 protected void PlayDeathSound()
 {
     DeathSound?.PlayIfStopped();
 }