예제 #1
0
 public void AbilityExplosion()
 {
     spawnCont.Explosion(transform.position, 100, null);
     Instantiate(shockWave, transform.position, Quaternion.identity);
     Instantiate(comboExplosion, transform.position, Quaternion.identity);
     audioCont.PlaySound(comboBomb);
 }
예제 #2
0
    void FireExplosion(Vector3 direction)
    {
        audioCont.PlaySound(fireAbilitySound);
        spawnCont.Explosion(transform.position, 25, this);
        int rnd = Random.Range(10, 15);

        for (int i = 0; i < rnd; i++)
        {
            GameObject instance = Instantiate(Resources.Load("FireAbilityDebris") as GameObject, transform.position, Quaternion.identity);
            instance.GetComponent <Rigidbody2D>().AddForce((direction + new Vector3(Random.Range(-0.5f, 0.5f), Random.Range(-0.5f, 0.5f)))
                                                           * 10000);
        }
        Destroy(fireAbilityMarker);
        Destroy(gameObject);
    }