示例#1
0
    public void GetDamage(float damage, Vector2 pos)
    {
        health -= damage;

        if (health <= 0)
        {
            Die();
        }

        peg?.OnDamage(damage, pos);

        crate?.OnDamage(pos);

        healthBar?.OnDamage();
    }