Fade added
This commit is contained in:
parent
53b06f6373
commit
c1833c0086
|
@ -2,6 +2,10 @@ extends Area2D
|
||||||
|
|
||||||
var credits = preload("res://credits/GodotCredits.tscn")
|
var credits = preload("res://credits/GodotCredits.tscn")
|
||||||
|
|
||||||
|
signal playerExit
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if body.name == "player":
|
if body.name == "player":
|
||||||
|
emit_signal("playerExit")
|
||||||
|
await get_tree().create_timer(2).timeout
|
||||||
get_tree().change_scene_to_packed(credits)
|
get_tree().change_scene_to_packed(credits)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=10 format=3 uid="uid://bdd6q3m06bnn3"]
|
[gd_scene load_steps=15 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="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"]
|
[ext_resource type="Texture2D" uid="uid://c54p5kdrt1r71" path="res://levels/levelFinal/core/coreSprites/planetCore_0001.png" id="1_macrm"]
|
||||||
|
@ -7,6 +7,7 @@
|
||||||
[ext_resource type="Texture2D" uid="uid://ch6720bqxcsmf" path="res://levels/levelFinal/core/coreSprites/planetCore_0004.png" id="4_c0dob"]
|
[ext_resource type="Texture2D" uid="uid://ch6720bqxcsmf" path="res://levels/levelFinal/core/coreSprites/planetCore_0004.png" id="4_c0dob"]
|
||||||
[ext_resource type="Texture2D" uid="uid://cd3n7wtnkho61" path="res://levels/levelFinal/core/coreSprites/planetCore_0005.png" id="5_v2s1a"]
|
[ext_resource type="Texture2D" uid="uid://cd3n7wtnkho61" path="res://levels/levelFinal/core/coreSprites/planetCore_0005.png" id="5_v2s1a"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bykh05626og5c" path="res://levels/levelFinal/core/coreSprites/planetCore_0006.png" id="6_in0ky"]
|
[ext_resource type="Texture2D" uid="uid://bykh05626og5c" path="res://levels/levelFinal/core/coreSprites/planetCore_0006.png" id="6_in0ky"]
|
||||||
|
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/levelOne/animation_player.gd" id="8_d4a53"]
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_macrm"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_macrm"]
|
||||||
animations = [{
|
animations = [{
|
||||||
|
@ -37,6 +38,94 @@ animations = [{
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_a5wrw"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_a5wrw"]
|
||||||
radius = 112.0
|
radius = 112.0
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_h31ej"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||||
|
resource_name = "fadeIn"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_e5775"]
|
||||||
|
resource_name = "fadeOut"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_h31ej"),
|
||||||
|
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||||
|
&"fadeOut": SubResource("Animation_e5775")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="core" type="Area2D"]
|
[node name="core" type="Area2D"]
|
||||||
collision_layer = 3
|
collision_layer = 3
|
||||||
collision_mask = 3
|
collision_mask = 3
|
||||||
|
@ -51,4 +140,24 @@ autoplay = "default"
|
||||||
position = Vector2(0, -1)
|
position = Vector2(0, -1)
|
||||||
shape = SubResource("CircleShape2D_a5wrw")
|
shape = SubResource("CircleShape2D_a5wrw")
|
||||||
|
|
||||||
|
[node name="fadeOut" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
|
||||||
|
physics_interpolation_mode = 1
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_h31ej")
|
||||||
|
}
|
||||||
|
script = ExtResource("8_d4a53")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="fadeOut"]
|
||||||
|
modulate = Color(0, 0, 0, 1)
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||||
|
[connection signal="playerExit" from="." to="fadeOut/AnimationPlayer" method="_on_exit_zone_player_exit"]
|
||||||
|
|
7
levels/levelOne/animation_player.gd
Normal file
7
levels/levelOne/animation_player.gd
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
extends AnimationPlayer
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
play("fadeIn")
|
||||||
|
|
||||||
|
func _on_exit_zone_player_exit() -> void:
|
||||||
|
play("fadeOut")
|
1
levels/levelOne/animation_player.gd.uid
Normal file
1
levels/levelOne/animation_player.gd.uid
Normal file
|
@ -0,0 +1 @@
|
||||||
|
uid://jeddvfkorpxu
|
|
@ -1,10 +1,99 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://dxojtfoa4jbe"]
|
[gd_scene load_steps=8 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://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"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
||||||
size = Vector2(32, 29)
|
size = Vector2(32, 29)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_h31ej"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||||
|
resource_name = "fadeIn"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_e5775"]
|
||||||
|
resource_name = "fadeOut"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_h31ej"),
|
||||||
|
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||||
|
&"fadeOut": SubResource("Animation_e5775")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="exit" type="Node2D"]
|
[node name="exit" type="Node2D"]
|
||||||
|
|
||||||
[node name="exitZone" type="Area2D" parent="."]
|
[node name="exitZone" type="Area2D" parent="."]
|
||||||
|
@ -15,4 +104,24 @@ script = ExtResource("1_2uwmc")
|
||||||
position = Vector2(-14, 18)
|
position = Vector2(-14, 18)
|
||||||
shape = SubResource("RectangleShape2D_jhhth")
|
shape = SubResource("RectangleShape2D_jhhth")
|
||||||
|
|
||||||
|
[node name="fadeOut" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
|
||||||
|
physics_interpolation_mode = 1
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_h31ej")
|
||||||
|
}
|
||||||
|
script = ExtResource("2_h31ej")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="fadeOut"]
|
||||||
|
modulate = Color(0, 0, 0, 1)
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="exitZone" to="exitZone" method="_on_body_entered"]
|
[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"]
|
||||||
|
|
|
@ -11,6 +11,10 @@ func levelComplete():
|
||||||
activated = true
|
activated = true
|
||||||
print("exit active")
|
print("exit active")
|
||||||
|
|
||||||
|
signal playerExit
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if activated:
|
if activated:
|
||||||
|
emit_signal("playerExit")
|
||||||
|
await get_tree().create_timer(2).timeout
|
||||||
get_tree().change_scene_to_packed(planetOne)
|
get_tree().change_scene_to_packed(planetOne)
|
||||||
|
|
|
@ -1,10 +1,99 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://iui8sgglpc55"]
|
[gd_scene load_steps=8 format=3 uid="uid://iui8sgglpc55"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b0brgicfdcox0" path="res://levels/levelThree/exit_zone3.gd" id="1_pekjb"]
|
[ext_resource type="Script" uid="uid://b0brgicfdcox0" path="res://levels/levelThree/exit_zone3.gd" id="1_pekjb"]
|
||||||
|
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/levelOne/animation_player.gd" id="2_ofyjg"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
||||||
size = Vector2(32, 29)
|
size = Vector2(32, 29)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_h31ej"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_e5775"]
|
||||||
|
resource_name = "fadeOut"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||||
|
resource_name = "fadeIn"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_h31ej"),
|
||||||
|
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||||
|
&"fadeOut": SubResource("Animation_e5775")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="exit3" type="Node2D"]
|
[node name="exit3" type="Node2D"]
|
||||||
|
|
||||||
[node name="exitZone" type="Area2D" parent="."]
|
[node name="exitZone" type="Area2D" parent="."]
|
||||||
|
@ -15,4 +104,24 @@ script = ExtResource("1_pekjb")
|
||||||
position = Vector2(-14, 18)
|
position = Vector2(-14, 18)
|
||||||
shape = SubResource("RectangleShape2D_jhhth")
|
shape = SubResource("RectangleShape2D_jhhth")
|
||||||
|
|
||||||
|
[node name="fadeOut" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
|
||||||
|
physics_interpolation_mode = 1
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_h31ej")
|
||||||
|
}
|
||||||
|
script = ExtResource("2_ofyjg")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="fadeOut"]
|
||||||
|
modulate = Color(0, 0, 0, 1)
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="exitZone" to="exitZone" method="_on_body_entered"]
|
[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"]
|
||||||
|
|
|
@ -11,6 +11,10 @@ func levelComplete():
|
||||||
activated = true
|
activated = true
|
||||||
print("exit active")
|
print("exit active")
|
||||||
|
|
||||||
|
signal playerExit
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if activated:
|
if activated:
|
||||||
|
emit_signal("playerExit")
|
||||||
|
await get_tree().create_timer(2).timeout
|
||||||
get_tree().change_scene_to_packed(planetThree)
|
get_tree().change_scene_to_packed(planetThree)
|
||||||
|
|
|
@ -1,10 +1,99 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://c0h3r0ot5jeds"]
|
[gd_scene load_steps=8 format=3 uid="uid://c0h3r0ot5jeds"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b2wo3pho6jsk3" path="res://levels/levelTwo/exit_zone2.gd" id="1_i04ng"]
|
[ext_resource type="Script" uid="uid://b2wo3pho6jsk3" path="res://levels/levelTwo/exit_zone2.gd" id="1_i04ng"]
|
||||||
|
[ext_resource type="Script" uid="uid://jeddvfkorpxu" path="res://levels/levelOne/animation_player.gd" id="2_qxd85"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jhhth"]
|
||||||
size = Vector2(32, 29)
|
size = Vector2(32, 29)
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_h31ej"]
|
||||||
|
length = 0.001
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0),
|
||||||
|
"transitions": PackedFloat32Array(1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_e5775"]
|
||||||
|
resource_name = "fadeOut"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 0), Color(0, 0, 0, 1)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="Animation" id="Animation_a6hc6"]
|
||||||
|
resource_name = "fadeIn"
|
||||||
|
tracks/0/type = "value"
|
||||||
|
tracks/0/imported = false
|
||||||
|
tracks/0/enabled = true
|
||||||
|
tracks/0/path = NodePath("ColorRect:color")
|
||||||
|
tracks/0/interp = 1
|
||||||
|
tracks/0/loop_wrap = true
|
||||||
|
tracks/0/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
tracks/1/type = "value"
|
||||||
|
tracks/1/imported = false
|
||||||
|
tracks/1/enabled = true
|
||||||
|
tracks/1/path = NodePath("ColorRect:modulate")
|
||||||
|
tracks/1/interp = 1
|
||||||
|
tracks/1/loop_wrap = true
|
||||||
|
tracks/1/keys = {
|
||||||
|
"times": PackedFloat32Array(0, 1),
|
||||||
|
"transitions": PackedFloat32Array(1, 1),
|
||||||
|
"update": 0,
|
||||||
|
"values": [Color(0, 0, 0, 1), Color(0, 0, 0, 0)]
|
||||||
|
}
|
||||||
|
|
||||||
|
[sub_resource type="AnimationLibrary" id="AnimationLibrary_h31ej"]
|
||||||
|
_data = {
|
||||||
|
&"RESET": SubResource("Animation_h31ej"),
|
||||||
|
&"fadeIn": SubResource("Animation_a6hc6"),
|
||||||
|
&"fadeOut": SubResource("Animation_e5775")
|
||||||
|
}
|
||||||
|
|
||||||
[node name="exit2" type="Node2D"]
|
[node name="exit2" type="Node2D"]
|
||||||
|
|
||||||
[node name="exitZone" type="Area2D" parent="."]
|
[node name="exitZone" type="Area2D" parent="."]
|
||||||
|
@ -15,4 +104,24 @@ script = ExtResource("1_i04ng")
|
||||||
position = Vector2(-14, 18)
|
position = Vector2(-14, 18)
|
||||||
shape = SubResource("RectangleShape2D_jhhth")
|
shape = SubResource("RectangleShape2D_jhhth")
|
||||||
|
|
||||||
|
[node name="fadeOut" type="CanvasLayer" parent="."]
|
||||||
|
|
||||||
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="fadeOut"]
|
||||||
|
physics_interpolation_mode = 1
|
||||||
|
libraries = {
|
||||||
|
&"": SubResource("AnimationLibrary_h31ej")
|
||||||
|
}
|
||||||
|
script = ExtResource("2_qxd85")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="ColorRect" parent="fadeOut"]
|
||||||
|
modulate = Color(0, 0, 0, 1)
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
metadata/_edit_use_anchors_ = true
|
||||||
|
|
||||||
[connection signal="body_entered" from="exitZone" to="exitZone" method="_on_body_entered"]
|
[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"]
|
||||||
|
|
|
@ -11,6 +11,10 @@ func levelComplete():
|
||||||
activated = true
|
activated = true
|
||||||
print("exit active")
|
print("exit active")
|
||||||
|
|
||||||
|
signal playerExit
|
||||||
|
|
||||||
func _on_body_entered(body: Node2D) -> void:
|
func _on_body_entered(body: Node2D) -> void:
|
||||||
if activated:
|
if activated:
|
||||||
|
emit_signal("playerExit")
|
||||||
|
await get_tree().create_timer(2).timeout
|
||||||
get_tree().change_scene_to_packed(planetTwo)
|
get_tree().change_scene_to_packed(planetTwo)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user