Compare commits
2
Commits
a45d9f4de7
...
66f6906bfd
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
66f6906bfd | ||
|
|
4f73b744d1 |
No files matched your search
+5
-1
@@ -20,8 +20,12 @@ func refresh_jump(new_jumps):
|
||||
jumps = new_jumps
|
||||
else:
|
||||
jumps = 1
|
||||
teleport_cooldown = 0
|
||||
refresh_teleport()
|
||||
|
||||
func refresh_teleport():
|
||||
teleport_cooldown = 0
|
||||
get_tree().call_group("TELEPORTERS","enable")
|
||||
|
||||
func on_teleport():
|
||||
refresh_jump(1)
|
||||
teleport_cooldown = 1
|
||||
|
||||
+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:
|
||||
|
||||
@@ -18,6 +18,7 @@ scale = Vector2(1, 1.0155824)
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="." unique_id=1982310971]
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer" unique_id=63102975]
|
||||
visible = false
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
Reference in new issue
Block a user