Added Health pickup, started pickup assignment through level control and added enemy counter
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user