Пример #1
0
    private void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Bullet")
        {
            return;
        }

        IDamagable damagable = collision.gameObject.GetComponent <IDamagable>();

        if (damagable != null)
        {
            damagable.DamagedBy(this);
        }

        //StartCoroutine(Timer(0.2f));
    }