exit teleport animation :)

This commit is contained in:
Haze Weathers 2023-10-07 21:43:05 -04:00
parent a03a1d8f6d
commit c25382dd83
6 changed files with 100 additions and 9 deletions

View file

@ -21,5 +21,10 @@ func _physics_process(delta):
func _on_Area2D_area_entered(area):
if area.is_in_group("player_hitbox"):
Game.tally_scores()
SceneManager.change_scene(preload("res://menus/results.tscn").instance())
var player = area.get_parent()
player.state_chart.send_event("start_teleport")
player.connect("teleport_finished", self, "_on_player_teleport_finished")
func _on_player_teleport_finished():
Game.tally_scores()
SceneManager.change_scene(preload("res://menus/results.tscn").instance())

View file

@ -27,8 +27,8 @@ interpolation_mode = 1
offsets = PoolRealArray( 0, 0.5 )
colors = PoolColorArray( 0.345098, 0.74902, 0.878431, 1, 0.396078, 1, 1, 1 )
[sub_resource type="RectangleShape2D" id=12]
extents = Vector2( 1, 1 )
[sub_resource type="SegmentShape2D" id=12]
b = Vector2( 0, 15 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 7, 7.5 )
@ -91,10 +91,9 @@ theme = ExtResource( 1 )
text = "¶22"
[node name="DetectPlayer" type="Area2D" parent="."]
z_index = -3
[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectPlayer"]
position = Vector2( 0, 11 )
[node name="CollisionShape" type="CollisionShape2D" parent="DetectPlayer"]
position = Vector2( 0, -3 )
shape = SubResource( 12 )
[node name="Collision" type="StaticBody2D" parent="." groups=["can_stain"]]