Update
This commit is contained in:
1 parent
19bbb052ad
commit
4f73b744d1
3 files changed
+13
-2
No files matched your search
+7
-1
@@ -11,6 +11,12 @@ func check_for_pair() -> String:
|
||||
print(paired_teleporter)
|
||||
return paired_teleporter
|
||||
|
||||
func disable():
|
||||
$Sprite2D.modulate = Color.DARK_ORANGE
|
||||
|
||||
func enable():
|
||||
$Sprite2D.modulate = Color.WHITE
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
@@ -19,7 +25,7 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func _on_contact(body) -> void:
|
||||
#print("PASSED OVER TELEPORTER")
|
||||
#get_tree().call_group("TELEPORTERS","check_for_pair")
|
||||
get_tree().call_group("TELEPORTERS","disable")
|
||||
for teleporter in get_tree().get_nodes_in_group("TELEPORTERS"):
|
||||
if teleporter != self:
|
||||
if teleporter.paired_teleporter == paired_teleporter and %Player2D.teleport_cooldown == 0:
|
||||
|
||||
Reference in new issue
Block a user