rat hole tweaks

This commit is contained in:
Derek
2025-05-12 19:49:45 -05:00
parent ed3c47e9cf
commit 888efb25ad
5 changed files with 26 additions and 13 deletions

View File

@@ -5,14 +5,14 @@ class_name RatHole
@onready var spawnpos: Marker3D = $spawnpos
@onready var area_3d = $Area3D
func spawn_rat(end_hole):
func spawn_rat(end_hole,number_of_pickups):
var spawn_rat = rat.instantiate()
spawn_rat.position = spawnpos.global_position
spawn_rat.end_hole = end_hole
spawn_rat.number_of_drops = number_of_pickups
get_parent().add_child(spawn_rat)
func _on_area_3d_body_entered(body):
if body.is_in_group("rat"):
if body is Rat:
if body.end_hole == self:
#body.control_node.spawn_amount += 1 #signal to control node that another rat can enter the scene
body.queue_free()