// Use this for initialization
    void Start()
    {
        Time.timeScale = 1;
        healthBarSize  = healthBarImage.transform.localScale;


        grid     = new Transform[width, height];
        gridBool = new bool[width, height];
        ResetAllGridBools();

        mM.ChangeMusicLevel(level);
    }
Esempio n. 2
0
 void RemoveHealth()
 {
     gM.health -= Time.deltaTime * damageMult;
     if (gM.health <= 0)
     {
         if (!isGameOver)
         {
             takingDamageInst.stop(FMOD.Studio.STOP_MODE.IMMEDIATE);
             takingDamageInst.release();
             gM.GameOver();
             mM.ChangeMusicLevel(0);
             isGameOver = true;
         }
     }
 }