private void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player") { float hp = WattBarManager.hitpoint; if (hp + wattIncrease > maxWatt) { WattBarManager.GainWatt((hp + wattIncrease) - maxWatt); } else { WattBarManager.GainWatt(wattIncrease); } } }