Added animated text
This commit is contained in:
parent
3c8230e756
commit
00b9e5ab28
|
@ -7,5 +7,5 @@ signal playerExit
|
|||
func _on_body_entered(body: Node2D) -> void:
|
||||
if body.name == "player":
|
||||
emit_signal("playerExit")
|
||||
await get_tree().create_timer(2).timeout
|
||||
await get_tree().create_timer(6).timeout
|
||||
get_tree().change_scene_to_packed(credits)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=15 format=3 uid="uid://bdd6q3m06bnn3"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://bdd6q3m06bnn3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://enxayokme5rs" path="res://levels/levelFinal/core/core.gd" id="1_6sogb"]
|
||||
[ext_resource type="Texture2D" uid="uid://c54p5kdrt1r71" path="res://levels/levelFinal/core/coreSprites/planetCore_0001.png" id="1_macrm"]
|
||||
|
@ -64,6 +64,18 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Label:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||
resource_name = "fadeIn"
|
||||
|
@ -91,6 +103,18 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Label:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.16, 0.57, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39), Vector2(501.7, 297.66), Vector2(501.7, 297.66), Vector2(510, -39)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e5775"]
|
||||
resource_name = "fadeOut"
|
||||
|
@ -119,11 +143,28 @@ tracks/1/keys = {
|
|||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1pmln"]
|
||||
resource_name = "text"
|
||||
length = 2.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Label:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.22, 1.7, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39), Vector2(518, 296), Vector2(518, 296), Vector2(499, -61)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_h31ej"),
|
||||
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||
&"fadeOut": SubResource("Animation_e5775")
|
||||
&"fadeOut": SubResource("Animation_e5775"),
|
||||
&"text": SubResource("Animation_1pmln")
|
||||
}
|
||||
|
||||
[node name="core" type="Area2D"]
|
||||
|
@ -160,5 +201,11 @@ mouse_filter = 2
|
|||
color = Color(0, 0, 0, 1)
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Label" type="Label" parent="fadeOut"]
|
||||
offset_left = 510.0
|
||||
offset_top = -39.0
|
||||
offset_right = 602.0
|
||||
offset_bottom = -16.0
|
||||
text = "placeholder"
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="playerExit" from="." to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]
|
||||
|
|
|
@ -5,3 +5,5 @@ func _ready() -> void:
|
|||
|
||||
func _on_exit_zone_player_exit() -> void:
|
||||
play("fadeOut")
|
||||
play("text")
|
||||
await get_tree().create_timer(4)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://dxojtfoa4jbe"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://dxojtfoa4jbe"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c3qi2ffmxsl8i" path="res://levels/levelOne/exit_zone.gd" id="1_2uwmc"]
|
||||
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/levelOne/animation_player.gd" id="2_h31ej"]
|
||||
|
@ -32,6 +32,18 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Label:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||
resource_name = "fadeIn"
|
||||
|
@ -59,6 +71,18 @@ tracks/1/keys = {
|
|||
"update": 0,
|
||||
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("Label:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0, 0.16, 0.57, 1),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39), Vector2(501.7, 297.66), Vector2(501.7, 297.66), Vector2(510, -39)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_e5775"]
|
||||
resource_name = "fadeOut"
|
||||
|
@ -87,11 +111,28 @@ tracks/1/keys = {
|
|||
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_1pmln"]
|
||||
resource_name = "text"
|
||||
length = 2.0
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("Label:position")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.22, 1.7, 2),
|
||||
"transitions": PackedFloat32Array(1, 1, 1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(510, -39), Vector2(518, 296), Vector2(518, 296), Vector2(499, -61)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||
_data = {
|
||||
&"RESET": SubResource("Animation_h31ej"),
|
||||
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||
&"fadeOut": SubResource("Animation_e5775")
|
||||
&"fadeOut": SubResource("Animation_e5775"),
|
||||
&"text": SubResource("Animation_1pmln")
|
||||
}
|
||||
|
||||
[node name="exit" type="Node2D"]
|
||||
|
@ -124,5 +165,12 @@ mouse_filter = 2
|
|||
color = Color(0, 0, 0, 1)
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="Label" type="Label" parent="fadeOut"]
|
||||
offset_left = 510.0
|
||||
offset_top = -39.0
|
||||
offset_right = 602.0
|
||||
offset_bottom = -16.0
|
||||
text = "placeholder"
|
||||
|
||||
[connection signal="body_entered" from="exitZone" to="exitZone" method="_on_body_entered"]
|
||||
[connection signal="playerExit" from="exitZone" to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user