Exemplo n.º 1
0
    private void DetectHitable(Collider2D collision)
    {
        ReceiveHit hitable = collision.GetComponent <ReceiveHit>();

        if (hitable != null)
        {
            ApplyHitEffects(collision, hitable);
            // notify weapon system so player behavior can respond
            _weaponSystem.HitOtherObject();
        }
    }