Exemple #1
0
 protected void dead()
 {
     if (health <= 0)
     {
         KillEnemyCount.Kill_count(Enemy_ID);
         GameObject.Instantiate(Effect_explode, gameObject.transform.position, Quaternion.identity);
         Destroy(gameObject);
     }
 }
Exemple #2
0
    void isDead()
    {
        if (health <= 0)
        {
            explosion();
            gameObject.transform.Translate(Vector3.down * 1f * Time.deltaTime);

            if (gameObject.transform.position.y < 0)
            {
                for (int i = 0; i < 500; i++)
                {
                    explosion();
                }
                KillEnemyCount.Kill_count(Enemy_ID);
                Destroy(gameObject);
            }
        }
    }
Exemple #3
0
 public void Back2Start()
 {
     KillEnemyCount.init_ALL();
     SceneManager.LoadScene(0);
 }
Exemple #4
0
 public void Restart()
 {
     KillEnemyCount.init_ALL();
     SceneManager.LoadScene(1);
 }