update
This commit is contained in:
14
scenes/portal/init.gd
Normal file
14
scenes/portal/init.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends StaticBody3D
|
||||
|
||||
@export var stats: PortalStats
|
||||
|
||||
func _ready() -> void:
|
||||
add_to_group("portals")
|
||||
PortalData.register(self, stats)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
PortalData.deregister(self)
|
||||
|
||||
func _on_detection_area_body_entered(body: Node3D) -> void:
|
||||
if body is CharacterBody3D and body.name == "Player":
|
||||
EventBus.portal_entered.emit(self, body)
|
||||
Reference in New Issue
Block a user