Enemy Hivemind became Room Manager, will probably pull out the actual enemy script at some point
This commit is contained in:
20
scripts/room_check.gd
Normal file
20
scripts/room_check.gd
Normal file
@@ -0,0 +1,20 @@
|
||||
extends Node
|
||||
|
||||
signal player_entered_room()
|
||||
signal player_left_room()
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
add_to_group("room_check")
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _on_body_entered(body: Node3D) -> void:
|
||||
if body.is_in_group("player"):
|
||||
emit_signal("player_entered_room")
|
||||
|
||||
func _on_body_exited(body: Node3D) -> void:
|
||||
if body.is_in_group("player"):
|
||||
emit_signal("player_left_room")
|
||||
Reference in New Issue
Block a user