Added Health pickup, started pickup assignment through level control and added enemy counter

This commit is contained in:
derek
2024-08-05 13:37:35 -05:00
parent c8f3e8eee6
commit 3335ad0804
17 changed files with 883 additions and 44 deletions

View File

@@ -38,7 +38,7 @@ func _process(delta):
position += transform.basis * Vector3(0, 0, -bullet_speed) * delta
rotation.x = clamp(rotation.x - delta * bullet_drop,deg_to_rad(-90),deg_to_rad(90))
if ray.is_colliding():
if ray.is_colliding() and ray.get_collider != null:
if ray.get_collider().is_in_group("player"):
var player = ray.get_collider()
player.level_control.health -= bullet_damage