Implemented win/lose scenes and added fire spinner trap

This commit is contained in:
VoidTwo
2021-12-09 22:55:16 -06:00
parent 8bd4acb6fe
commit 8707397bb7
20 changed files with 577 additions and 90 deletions

92
GUI/Level Complete.tscn Normal file
View File

@@ -0,0 +1,92 @@
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Sprites/Assets/Black_Background.png" type="Texture" id=1]
[ext_resource path="res://GUI/Level Ending.gd" type="Script" id=2]
[ext_resource path="res://Resources/Ash.tres" type="DynamicFontData" id=3]
[ext_resource path="res://Sprites/Assets/Smol_P.png" type="Texture" id=4]
[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 3 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 4 )
region = Rect2( 43, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 4 )
region = Rect2( 86, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 4 )
region = Rect2( 129, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 4 )
region = Rect2( 172, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 4 )
region = Rect2( 215, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 4 )
region = Rect2( 258, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 4 )
region = Rect2( 301, 0, 43, 38 )
[sub_resource type="SpriteFrames" id=10]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[node name="Level Complete" type="CanvasLayer"]
script = ExtResource( 2 )
[node name="Background" type="TextureRect" parent="."]
margin_right = 40.0
margin_bottom = 40.0
rect_min_size = Vector2( 320, 180 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CenterContainer" type="CenterContainer" parent="."]
margin_right = 320.0
margin_bottom = 135.0
rect_min_size = Vector2( 320, 90 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="CenterContainer"]
margin_left = 48.0
margin_top = 58.0
margin_right = 271.0
margin_bottom = 77.0
custom_fonts/font = SubResource( 1 )
text = "Level Complete"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 160, 120 )
frames = SubResource( 10 )
playing = true
[node name="Timer" type="Timer" parent="."]
wait_time = 4.0
one_shot = true
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

10
GUI/Level Ending.gd Normal file
View File

@@ -0,0 +1,10 @@
extends CanvasLayer
export var hub_world_path: String = 'res://Levels/Hub World.tscn'
func _on_timer_timeout() -> void:
if get_tree().change_scene(hub_world_path) != OK:
print('ERROR: Level Ending failed to change scene to Hub World.')
queue_free()
return

93
GUI/Level Failed.tscn Normal file
View File

@@ -0,0 +1,93 @@
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Sprites/Assets/Black_Background.png" type="Texture" id=1]
[ext_resource path="res://GUI/Level Ending.gd" type="Script" id=2]
[ext_resource path="res://Resources/Ash.tres" type="DynamicFontData" id=3]
[ext_resource path="res://Sprites/Assets/Smol_P.png" type="Texture" id=4]
[sub_resource type="DynamicFont" id=1]
font_data = ExtResource( 3 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 4 )
region = Rect2( 0, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 4 )
region = Rect2( 43, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 4 )
region = Rect2( 86, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 4 )
region = Rect2( 129, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 4 )
region = Rect2( 172, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 4 )
region = Rect2( 215, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 4 )
region = Rect2( 258, 0, 43, 38 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 4 )
region = Rect2( 301, 0, 43, 38 )
[sub_resource type="SpriteFrames" id=10]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[node name="Level Failed" type="CanvasLayer"]
script = ExtResource( 2 )
[node name="Background" type="TextureRect" parent="."]
margin_right = 40.0
margin_bottom = 40.0
rect_min_size = Vector2( 320, 180 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CenterContainer" type="CenterContainer" parent="."]
margin_right = 320.0
margin_bottom = 135.0
rect_min_size = Vector2( 320, 90 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Label" type="Label" parent="CenterContainer"]
margin_left = 74.0
margin_top = 58.0
margin_right = 245.0
margin_bottom = 77.0
custom_fonts/font = SubResource( 1 )
text = "Level Failed"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 160, 120 )
frames = SubResource( 10 )
frame = 7
playing = true
[node name="Timer" type="Timer" parent="."]
wait_time = 4.0
one_shot = true
autostart = true
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]