예제 #1
0
    void enemyDie()
    {
        if (_gameManager.gameState == GameState.Play)
        {
            if (_Hp <= 0)
            {
                planeDie.Explosion();
                _gameManager.addPoint(_Point);
                _gameManager.countEnemyDie++;

                Destroy(gameObject);
            }
        }
    }
예제 #2
0
    void enemyDie()
    {
        if (_gameManager.gameState == GameState.Play)
        {
            if (_Hp <= 0)
            {
                planeDie.Explosion();
                _gameManager.addPoint(_Point);
                _gameManager.countEnemyDie++;
                if (Random.Range(0, 1000) < GameSetting.instance.SupportDropRate)
                {
                    Instantiate(GameSetting.instance.supportPrefab);
                }

                Destroy(gameObject);
            }
        }
    }
예제 #3
0
 void takeDame()
 {
     if (preHP <= 0)
     {
         planeDie.Explosion();
         if (GameSetting.instance.getLife())
         {
             StartCoroutine(revival());
             Transform pointGen = GameObject.Find("pointGenPlayer").transform;
             transform.position = pointGen.position;
             _gameManager._uiManager.updateData();
         }
         else if (_gameManager != null)
         {
             _gameManager.gameOver();
             Destroy(gameObject);
         }
     }
 }