Beispiel #1
0
    public static void KillEnemyBird(EnemyBird enemy)
    {
        GameObject part = Instantiate(enemy.deathParticles, enemy.transform.position, Quaternion.identity).gameObject;

        Destroy(part, 2);
        Destroy(enemy.gameObject);
    }
    void OnCollisionEnter2D(Collision2D collInfo)
    {
        EnemyBird bd = collInfo.collider.GetComponent <EnemyBird>();

        if (bd != null)
        {
            Debug.Log("hitttttttttttttttttt");
            bd.DamageEnemy(1000);
        }
    }