Example #1
0
 // Update is called once per frame
 void Update()
 {
     if (enemyHealth <= 0)
     {
         // 怪物死亡
         Instantiate(enemyDeathEffect, transform.position, transform.rotation);
         ScoreManager.AddPoint(enemyPoint);           // 加分
         Destroy(gameObject);
         EnemySpawner.AddBeatCount();                 // 增加殺敵數
         enemySpawner.DecreaseEnemyCount();           // 減少總數
     }
 }