예제 #1
0
    private void Splash()
    {
        PoisonSplash tmp = GameObject.Instantiate(splashPrefab, target.transform.position, Quaternion.identity);

        tmp.Damage = splashDamage;
        Physics2D.IgnoreCollision(target.GetComponent <Collider2D>(), tmp.GetComponent <Collider2D>());
    }
예제 #2
0
    /// <summary>
    /// Spawns a splash on the ground
    /// </summary>
    private void Splash()
    {
        //Spawns the splash at the monster's position
        PoisonSplash tmp = GameObject.Instantiate(splashPrefab, target.transform.position, Quaternion.identity) as PoisonSplash;

        //Sets the damage equal to the splash damage
        tmp.Damage = splashDamage;

        //Makes sure that the monster that spawned the splash can't collide with it
        Physics2D.IgnoreCollision(target.GetComponent <Collider2D>(), tmp.GetComponent <Collider2D>());
    }