Teleporter bugfix
This commit is contained in:
1 parent
87df6cf283
commit
e808431fc2
3 files changed
+16
-4
No files matched your search
+5
-3
@@ -20,9 +20,11 @@ func _on_contact(body) -> void:
|
||||
#print("PASSED OVER TELEPORTER")
|
||||
#get_tree().call_group("TELEPORTERS","check_for_pair")
|
||||
for teleporter in get_tree().get_nodes_in_group("TELEPORTERS"):
|
||||
print("PAIRED" + str(teleporter))
|
||||
print("SELF" + str(self))
|
||||
print("PAIRED" + str(teleporter) + teleporter.paired_teleporter)
|
||||
print("SELF" + str(self) + teleporter.paired_teleporter)
|
||||
if teleporter != self:
|
||||
if %Player2D.teleport_cooldown == 0:
|
||||
if teleporter.paired_teleporter == paired_teleporter and %Player2D.teleport_cooldown == 0:
|
||||
%Player2D.get_node("Camera2D").position_smoothing_speed = 1
|
||||
body.set_position(teleporter.get_position())
|
||||
%Player2D.teleport_cooldown = 1
|
||||
%Player2D.get_node("Camera2D").position_smoothing_speed = %Player2D.CAMERA_SMOOTHING_SPEED
|
||||
Reference in new issue
Block a user