Extract MatchParticipantComponent from Player entity and fix HealthComponent tests

This commit is contained in:
Squinty 2024-04-27 13:32:03 +00:00
parent 3ce62a6548
commit cfd0dd73fd
23 changed files with 149 additions and 124 deletions

View file

@ -14,9 +14,16 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name ExplosiveDamageComponent extends Area3D
@export var damage : int = 100
@export var damage : int = 35
@export var impulse_force : int = 1000
var damage_dealer : Player
var damage_dealer : MatchParticipantComponent
func _ready() -> void:
# this component only scans to apply explosion damage/impulse
# at the moment layers: 1 Object, 3 Damage, 4 Objective
monitorable = false
monitoring = true
collision_mask = 0b10000000_00000000_00000000_00001101
func _physics_process(_delta : float) -> void:
for body in get_overlapping_bodies():