rat hole tweaks
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user