Remove hidden teleportal class.
It doesn't do anything that the hidden group doesn't already, since the hidden logic is done in the player. Also, hidden teleportal inherited the relative position bug that was since fixed in the regular one.
This commit is contained in:
1 parent
6848bd3d79
commit
92f0cb57c0
4 files changed
+4
-86
No files matched your search
@@ -1,43 +0,0 @@
|
||||
extends Node2D
|
||||
|
||||
@export var paired_teleporter: String
|
||||
var checked_teleport
|
||||
var telecam_speed_mult = 4
|
||||
var enabled = true
|
||||
var cooldown = 2
|
||||
|
||||
func _ready() -> void:
|
||||
modulate = Color.PURPLE
|
||||
add_to_group("TELEPORTERS")
|
||||
add_to_group("Hidden")
|
||||
|
||||
func check_for_pair() -> String:
|
||||
return paired_teleporter
|
||||
|
||||
func disable():
|
||||
enabled = false
|
||||
$Sprite2D.modulate = Color.DARK_ORANGE
|
||||
|
||||
func enable():
|
||||
enabled = true
|
||||
$Sprite2D.modulate = Color.WHITE
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func _on_contact(body) -> void:
|
||||
#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 enabled:
|
||||
%Player2D.get_node("Camera2D").position_smoothing_enabled = false
|
||||
if %Player2D.teleport_cooldown > 0:
|
||||
return
|
||||
body.set_position(teleporter.get_position())
|
||||
%Player2D.on_teleport()
|
||||
disable()
|
||||
await get_tree().create_timer(cooldown).timeout
|
||||
enable()
|
||||
@@ -1 +0,0 @@
|
||||
uid://btxx0p5ccar5f
|
||||
@@ -1,40 +0,0 @@
|
||||
[gd_scene format=3 uid="uid://7bjqgxckho"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://btxx0p5ccar5f" path="res://hidden_teleporter.gd" id="1_52wed"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0tvtt4eu8jmt" path="res://art/block/portal.png" id="2_rx1y0"]
|
||||
[ext_resource type="Texture2D" uid="uid://55ihxa2emnep" path="res://art/block/portal2.png" id="3_5admx"]
|
||||
[ext_resource type="Texture2D" uid="uid://d4a5x8gwhl2wc" path="res://art/block/portal3.png" id="4_tfiuq"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_tuehi"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_rx1y0")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_5admx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_tfiuq")
|
||||
}],
|
||||
"loop": 1,
|
||||
"name": &"default",
|
||||
"speed": 5.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_7k7bx"]
|
||||
radius = 9.0
|
||||
|
||||
[node name="HiddenTeleporter" type="Node2D" unique_id=1201409437 groups=["Hidden"]]
|
||||
script = ExtResource("1_52wed")
|
||||
|
||||
[node name="Sprite2D" type="AnimatedSprite2D" parent="." unique_id=395479262]
|
||||
sprite_frames = SubResource("SpriteFrames_tuehi")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="Sprite2D" unique_id=2050186824]
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite2D/Area2D" unique_id=1560168165]
|
||||
shape = SubResource("CircleShape2D_7k7bx")
|
||||
|
||||
[connection signal="body_entered" from="Sprite2D/Area2D" to="." method="_on_contact"]
|
||||
+4
-2
@@ -35,7 +35,6 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cue2gfw1bdfh7" path="res://sign_arrow_up.tscn" id="31_jjr1n"]
|
||||
[ext_resource type="PackedScene" uid="uid://div6quttr84u1" path="res://horizontal_moving_block.tscn" id="34_w44yn"]
|
||||
[ext_resource type="PackedScene" uid="uid://b61sumdnt0qqh" path="res://hidden_horizontal_moving_block.tscn" id="35_6ah6f"]
|
||||
[ext_resource type="PackedScene" uid="uid://7bjqgxckho" path="res://hidden_teleporter.tscn" id="36_g1i3r"]
|
||||
[ext_resource type="PackedScene" uid="uid://c13khrhjy5nrj" path="res://saw.tscn" id="37_my276"]
|
||||
[ext_resource type="PackedScene" uid="uid://bnuiagw3bblfh" path="res://hat_pickup.tscn" id="38_yx0jh"]
|
||||
|
||||
@@ -2481,7 +2480,7 @@ position = Vector2(-619, -477.55838)
|
||||
[node name="HiddenHorizontalMovingBlock4" parent="QuadrantC" unique_id=1059738582 instance=ExtResource("35_6ah6f")]
|
||||
position = Vector2(-367, -477.55832)
|
||||
|
||||
[node name="HiddenTeleporter" parent="QuadrantC" unique_id=1585223156 instance=ExtResource("36_g1i3r")]
|
||||
[node name="HiddenTeleporter" parent="QuadrantC" unique_id=1585223156 groups=["Hidden"] instance=ExtResource("4_gbfbk")]
|
||||
position = Vector2(-491, -133.91316)
|
||||
paired_teleporter = "C1"
|
||||
|
||||
@@ -2724,4 +2723,7 @@ position = Vector2(-4297, 467.7119)
|
||||
position = Vector2(-4396, 458.85)
|
||||
sign_text = "DEBUG MODE WARP PORTALS"
|
||||
|
||||
[node name="Pharaoh" parent="DebugPortals" unique_id=1770352474 groups=["Hidden"] instance=ExtResource("15_hiqwa")]
|
||||
position = Vector2(-4150, 460.8193)
|
||||
|
||||
[connection signal="toggled" from="CanvasLayer/MusicButton" to="CanvasLayer/MusicButton" method="_on_toggled"]
|
||||
Reference in new issue
Block a user