Esempio n. 1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        BasicShot bs = other.gameObject.GetComponent <BasicShot>();

        if (bs == null)
        {
            return;
        }

        bs.Kill();
    }
Esempio n. 2
0
    void OnTriggerEnter2D(Collider2D other)
    {
        BasicShot bs = other.gameObject.GetComponent <BasicShot>();

        if (bs == null)
        {
            return;
        }

        bs.Kill();
        Damage();
    }