Update
This commit is contained in:
1 parent
19bbb052ad
commit
4f73b744d1
3 files changed
+12
-1
No files matched your search
@@ -20,7 +20,11 @@ func refresh_jump(new_jumps):
|
|||||||
jumps = new_jumps
|
jumps = new_jumps
|
||||||
else:
|
else:
|
||||||
jumps = 1
|
jumps = 1
|
||||||
|
refresh_teleport()
|
||||||
|
|
||||||
|
func refresh_teleport():
|
||||||
teleport_cooldown = 0
|
teleport_cooldown = 0
|
||||||
|
get_tree().call_group("TELEPORTERS","enable")
|
||||||
|
|
||||||
func on_teleport():
|
func on_teleport():
|
||||||
refresh_jump(1)
|
refresh_jump(1)
|
||||||
|
|||||||
+7
-1
@@ -11,6 +11,12 @@ func check_for_pair() -> String:
|
|||||||
print(paired_teleporter)
|
print(paired_teleporter)
|
||||||
return paired_teleporter
|
return paired_teleporter
|
||||||
|
|
||||||
|
func disable():
|
||||||
|
$Sprite2D.modulate = Color.DARK_ORANGE
|
||||||
|
|
||||||
|
func enable():
|
||||||
|
$Sprite2D.modulate = Color.WHITE
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -19,7 +25,7 @@ func _physics_process(delta: float) -> void:
|
|||||||
|
|
||||||
func _on_contact(body) -> void:
|
func _on_contact(body) -> void:
|
||||||
#print("PASSED OVER TELEPORTER")
|
#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"):
|
for teleporter in get_tree().get_nodes_in_group("TELEPORTERS"):
|
||||||
if teleporter != self:
|
if teleporter != self:
|
||||||
if teleporter.paired_teleporter == paired_teleporter and %Player2D.teleport_cooldown == 0:
|
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="CanvasLayer" type="CanvasLayer" parent="." unique_id=1982310971]
|
||||||
|
|
||||||
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer" unique_id=63102975]
|
[node name="RichTextLabel" type="RichTextLabel" parent="CanvasLayer" unique_id=63102975]
|
||||||
|
visible = false
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
|
|||||||
Reference in new issue
Block a user