示例#1
0
    // To avoid double count on the score
    void OnDestroy()
    {
        if (gameManager.levelOver == false && gameManager.IsGameActive() && !isQuitting)
        {
            DropAbility();

            Score.AddToScore(pointValue);
            audioManager.Play("TriangleExplosion");
            GameObject explosionEffect = Instantiate(enemyExplosion, transform.position, Quaternion.identity);
            ScorePopup.Create(transform.position, pointValue);
            Destroy(explosionEffect, 0.5f);
        }
    }