Esempio n. 1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        Defend defend = collision.collider.GetComponent <Defend>();

        Debug.Log(defend);
        defend?.TakeDamage(combatStats.Attack);
    }
Esempio n. 2
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        Defend defend = collision.GetComponent <Defend>();

        defend?.TakeDamage(combatStats.Attack);
    }