// Destroys target and will increase between a range
        void Destroy()
        {
            AudioManager.PlaySound("target_destroy");
            DeathEffect temp = deathEffectPool.GetObject();

            temp.transform.position = new Vector3(transform.position.x, transform.position.y, temp.transform.position.z);
            temp.gameObject.SetActive(true);
            gameObject.SetActive(false);
            newOrbitValue += Random.value < 0.5 ? 10 : 20 < 0.9 ? 10 : 30;
            requiredOrbits = newOrbitValue;
        }
Exemplo n.º 2
0
        void Destroy()
        {
            AudioManager.PlaySound("ExplosionSound");

            DeathEffect temp = deathEffectPool.GetObject();

            temp.transform.position = new Vector3(transform.position.x, transform.position.y, temp.transform.position.z);
            temp.gameObject.SetActive(true);
            gameObject.SetActive(false);

            GameManager.ParticleDied();
        }