Exemple #1
0
    void OnTriggerEnter2D(Collider2D other)
    {
        CannonController cannon = other.gameObject.GetComponent <CannonController>();

        if (cannon != null)
        {
            cannon.changeHealth(-collisionDamage);
        }
    }