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

View File

@@ -6,97 +6,94 @@
[ext_resource path="res://Enemies/Hellhound.gd" type="Script" id=4]
[ext_resource path="res://Sprites/Enemies/Hell_Hound_Jump.png" type="Texture" id=5]
[ext_resource path="res://Sprites/Enemies/Hell_Hound_Run.png" type="Texture" id=6]
[ext_resource path="res://Sprites/Enemies/Chasing_Glowing_Ghost.png" type="Texture" id=7]
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 5 )
region = Rect2( 65, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 5 )
region = Rect2( 130, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 5 )
region = Rect2( 195, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 5 )
region = Rect2( 260, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 5 )
region = Rect2( 325, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=15]
atlas = ExtResource( 6 )
region = Rect2( 0, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=16]
atlas = ExtResource( 6 )
region = Rect2( 67, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=17]
atlas = ExtResource( 6 )
region = Rect2( 134, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=18]
atlas = ExtResource( 6 )
region = Rect2( 201, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=19]
atlas = ExtResource( 6 )
region = Rect2( 268, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=9]
[sub_resource type="AtlasTexture" id=23]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 64, 32 )
[sub_resource type="AtlasTexture" id=10]
[sub_resource type="AtlasTexture" id=24]
atlas = ExtResource( 3 )
region = Rect2( 64, 0, 64, 32 )
[sub_resource type="AtlasTexture" id=11]
[sub_resource type="AtlasTexture" id=25]
atlas = ExtResource( 3 )
region = Rect2( 128, 0, 64, 32 )
[sub_resource type="AtlasTexture" id=12]
[sub_resource type="AtlasTexture" id=26]
atlas = ExtResource( 3 )
region = Rect2( 192, 0, 64, 32 )
[sub_resource type="AtlasTexture" id=13]
[sub_resource type="AtlasTexture" id=27]
atlas = ExtResource( 3 )
region = Rect2( 256, 0, 64, 32 )
[sub_resource type="AtlasTexture" id=14]
[sub_resource type="AtlasTexture" id=28]
atlas = ExtResource( 3 )
region = Rect2( 320, 0, 64, 32 )
[sub_resource type="SpriteFrames" id=20]
animations = [ {
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ) ],
[sub_resource type="AtlasTexture" id=29]
atlas = ExtResource( 6 )
region = Rect2( 0, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=30]
atlas = ExtResource( 6 )
region = Rect2( 67, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=31]
atlas = ExtResource( 6 )
region = Rect2( 134, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=32]
atlas = ExtResource( 6 )
region = Rect2( 201, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=33]
atlas = ExtResource( 6 )
region = Rect2( 268, 0, 67, 32 )
[sub_resource type="AtlasTexture" id=34]
atlas = ExtResource( 5 )
region = Rect2( 0, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=35]
atlas = ExtResource( 5 )
region = Rect2( 65, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=36]
atlas = ExtResource( 5 )
region = Rect2( 130, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=37]
atlas = ExtResource( 5 )
region = Rect2( 195, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=38]
atlas = ExtResource( 5 )
region = Rect2( 260, 0, 65, 48 )
[sub_resource type="AtlasTexture" id=39]
atlas = ExtResource( 5 )
region = Rect2( 325, 0, 65, 48 )
[sub_resource type="SpriteFrames" id=40]
animations = [ {
"frames": [ SubResource( 23 ), SubResource( 24 ), SubResource( 25 ), SubResource( 26 ), SubResource( 27 ), SubResource( 28 ) ],
"loop": true,
"name": "Jump",
"speed": 8.0
"name": "Idle",
"speed": 5.0
}, {
"frames": [ SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ) ],
"frames": [ SubResource( 29 ), SubResource( 30 ), SubResource( 31 ), SubResource( 32 ), SubResource( 33 ) ],
"loop": true,
"name": "Running",
"speed": 5.0
}, {
"frames": [ SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ) ],
"frames": [ SubResource( 34 ), SubResource( 35 ), SubResource( 36 ), SubResource( 37 ), SubResource( 38 ), SubResource( 39 ) ],
"loop": true,
"name": "Idle",
"speed": 3.0
"name": "Jump",
"speed": 5.0
} ]
[sub_resource type="CapsuleShape2D" id=21]
radius = 1.5
height = 3.0
@@ -115,14 +112,13 @@ radius = 25.02
light_mask = 0
collision_layer = 4
collision_mask = 5
script = ExtResource( 4 )
[node name="AnimatedSprite1" type="AnimatedSprite" parent="."]
light_mask = 0
position = Vector2( 1, -3 )
scale = Vector2( 0.5625, 0.5625 )
frames = SubResource( 18 )
frames = SubResource( 40 )
animation = "Idle"
frame = 3
playing = true
@@ -131,7 +127,6 @@ playing = true
visible = false
light_mask = 4
position = Vector2( 0, -3 )
texture = ExtResource( 7 )
offset = Vector2( 0, 0.5 )
@@ -155,15 +150,11 @@ shape = SubResource( 1 )
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
collision_layer = 0
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
visible = false
light_mask = 0
shape = SubResource( 2 )
@@ -171,12 +162,8 @@ shape = SubResource( 2 )
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
collision_layer = 0
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack"]
shape = SubResource( 22 )
@@ -191,7 +178,6 @@ monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector - Attack2"]
shape = SubResource( 22 )
[node name="Light" type="Light2D" parent="."]
visible = false
texture = ExtResource( 2 )

View File

@@ -0,0 +1,21 @@
extends Area2D
const SPEED: int = 50
var velocity: Vector2 = Vector2.ZERO
func init(spawn_position: Vector2, shoot_position: Vector2) -> void:
position = spawn_position
velocity = position.direction_to(shoot_position).normalized() * SPEED
return
func _physics_process(delta: float) -> void:
position += velocity * delta
return
func _on_tifetime_timeout() -> void:
call_deferred('queue_free')
return

View File

@@ -0,0 +1,40 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=1]
[ext_resource path="res://Enemies/Projectiles/Glowing Fireball.gd" type="Script" id=2]
[ext_resource path="res://Sprites/Enemies/Projectiles/Glowing_Fireball.png" type="Texture" id=3]
[sub_resource type="CircleShape2D" id=1]
radius = 12.0
[node name="Glowing Fireball" type="Area2D" groups=["enemy_projectile_1"]]
light_mask = 0
scale = Vector2( 0.5, 0.5 )
collision_layer = 0
collision_mask = 2
input_pickable = false
monitoring = false
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 3 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
light_mask = 0
shape = SubResource( 1 )
[node name="Light" type="Light2D" parent="."]
texture = ExtResource( 1 )
texture_scale = 0.3
color = Color( 0.984314, 0.282353, 0.211765, 1 )
energy = 1.5
range_item_cull_mask = 15
shadow_item_cull_mask = 0
[node name="Lifetime" type="Timer" parent="."]
wait_time = 1.5
one_shot = true
autostart = true
[connection signal="timeout" from="Lifetime" to="." method="_on_tifetime_timeout"]

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"]

View File

@@ -32,6 +32,7 @@ func _on_coin_grabbed() -> void:
func _timer_out() -> void:
get_tree().change_scene('res://Levels/Hub World.tscn')
queue_free()
return
@@ -51,6 +52,6 @@ func _on_DoorDetector_body_entered(body: Node) -> void:
func _on_DoorDetector_area_entered(area: Area2D) -> void:
if area.get_parent().name == 'Player':
print('WIN WIN WIN')
get_tree().change_scene('res://Levels/Hub World.tscn')
get_tree().change_scene('res://GUI/Level Complete.tscn')
queue_free()
return

View File

@@ -86,21 +86,21 @@ tile_data = PoolIntArray( -2686978, 0, 5, -2686977, 0, 196610, -2752512, 0, 1966
[node name="Fire3" type="AnimatedSprite" parent="."]
position = Vector2( -607.628, -210.601 )
frames = SubResource( 1 )
frame = 12
frame = 1
playing = true
offset = Vector2( 679.819, 333.222 )
[node name="Fire2" type="AnimatedSprite" parent="."]
position = Vector2( -543.25, -212.563 )
frames = SubResource( 1 )
frame = 1
frame = 4
playing = true
offset = Vector2( 679.819, 333.222 )
[node name="Fire1" type="AnimatedSprite" parent="."]
position = Vector2( -479.806, -214.167 )
frames = SubResource( 1 )
frame = 8
frame = 11
playing = true
offset = Vector2( 679.819, 333.222 )

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=14 format=2]
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1]
[ext_resource path="res://Levels/Level 5.gd" type="Script" id=2]
@@ -11,8 +11,9 @@
[ext_resource path="res://Enemies/Chasing Glowing Ghost.tscn" type="PackedScene" id=9]
[ext_resource path="res://Levels/Traps/Spawn Trap.tscn" type="PackedScene" id=10]
[ext_resource path="res://Levels/Interactables/Silver Key Pickup.tscn" type="PackedScene" id=11]
[ext_resource path="res://Levels/Interactables/Silver Barrier.tscn" type="PackedScene" id=12]
[ext_resource path="res://Levels/Interactables/Silver Barrier 2.tscn" type="PackedScene" id=12]
[ext_resource path="res://Enemies/Creepy Glowing Ghost.tscn" type="PackedScene" id=13]
[ext_resource path="res://Levels/Traps/Fire Spinner.tscn" type="PackedScene" id=14]
[node name="Void Level" type="Node2D"]
script = ExtResource( 2 )
@@ -36,7 +37,7 @@ tile_set = ExtResource( 8 )
cell_size = Vector2( 16, 16 )
collision_mask = 0
format = 1
tile_data = PoolIntArray( -196589, 0, 0, -196588, 0, 1, -196587, 0, 1, -196586, 0, 1, -196585, 0, 1, -196584, 0, 1, -196583, 0, 2, -131055, 0, 0, -131054, 0, 1, -131053, 0, 131078, -131052, 0, 65541, -131051, 0, 131073, -131050, 0, 131073, -131049, 0, 131073, -131048, 0, 65542, -131047, 0, 65538, -65524, 0, 0, -65523, 0, 1, -65522, 0, 1, -65521, 0, 1, -65520, 0, 1, -65519, 0, 65545, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131074, -65512, 0, 65536, -65511, 0, 65538, 12, 0, 65536, 13, 0, 65541, 14, 0, 131073, 15, 0, 131073, 16, 0, 131073, 17, 0, 131074, 24, 0, 65536, 25, 0, 65538, 65548, 0, 65536, 65549, 0, 65538, 65560, 0, 65536, 65561, 0, 65538, 131078, 0, 0, 131079, 0, 1, 131080, 0, 1, 131081, 0, 1, 131082, 0, 1, 131083, 0, 1, 131084, 0, 131078, 131085, 0, 65538, 131089, 0, 3, 131096, 0, 65536, 131097, 0, 65538, 196614, 0, 65536, 196615, 0, 65541, 196616, 0, 131073, 196617, 0, 131073, 196618, 0, 131073, 196619, 0, 131073, 196620, 0, 65542, 196621, 0, 65538, 196625, 0, 65539, 196632, 0, 65536, 196633, 0, 65538, 262150, 0, 65536, 262151, 0, 65538, 262156, 0, 65536, 262157, 0, 65538, 262161, 0, 65539, 262163, 0, 0, 262164, 0, 2, 262167, 0, 0, 262168, 0, 131078, 262169, 0, 65538, 327686, 0, 65536, 327687, 0, 65538, 327692, 0, 65536, 327693, 0, 65538, 327696, 0, 4, 327697, 0, 196615, 327699, 0, 131072, 327700, 0, 65543, 327703, 0, 65536, 327704, 0, 65541, 327705, 0, 131074, 393222, 0, 65536, 393223, 0, 65538, 393228, 0, 65536, 393229, 0, 131077, 393230, 0, 5, 393231, 0, 196609, 393232, 0, 196615, 393236, 0, 131075, 393239, 0, 65536, 393240, 0, 65538, 458755, 0, 0, 458756, 0, 2, 458758, 0, 65536, 458759, 0, 65538, 458761, 0, 0, 458762, 0, 2, 458764, 0, 131072, 458765, 0, 131073, 458766, 0, 131074, 458774, 0, 0, 458775, 0, 131078, 458776, 0, 65538, 524291, 0, 65536, 524292, 0, 65538, 524294, 0, 65536, 524295, 0, 65538, 524297, 0, 65536, 524298, 0, 65538, 524309, 0, 0, 524310, 0, 131078, 524311, 0, 65541, 524312, 0, 131074, 589827, 0, 65536, 589828, 0, 65538, 589830, 0, 131072, 589831, 0, 131074, 589833, 0, 65536, 589834, 0, 131077, 589835, 0, 1, 589836, 0, 1, 589837, 0, 1, 589838, 0, 1, 589839, 0, 1, 589840, 0, 1, 589841, 0, 1, 589842, 0, 1, 589843, 0, 1, 589844, 0, 1, 589845, 0, 131078, 589846, 0, 65541, 589847, 0, 131074, 655363, 0, 65536, 655364, 0, 65538, 655369, 0, 65536, 655370, 0, 65541, 655371, 0, 131073, 655372, 0, 131073, 655373, 0, 131073, 655374, 0, 131073, 655375, 0, 131073, 655376, 0, 131073, 655377, 0, 131073, 655378, 0, 131073, 655379, 0, 131073, 655380, 0, 131073, 655381, 0, 131073, 655382, 0, 131074, 720899, 0, 65536, 720900, 0, 65538, 720905, 0, 65536, 720906, 0, 65538, 786435, 0, 65536, 786436, 0, 65538, 786441, 0, 65536, 786442, 0, 65538, 851971, 0, 65536, 851972, 0, 65538, 851977, 0, 65536, 851978, 0, 65538, 917507, 0, 65536, 917508, 0, 65538, 917513, 0, 65536, 917514, 0, 65538, 983043, 0, 65536, 983044, 0, 131077, 983045, 0, 1, 983046, 0, 1, 983047, 0, 1, 983048, 0, 1, 983049, 0, 131078, 983050, 0, 65538, 1048579, 0, 131072, 1048580, 0, 131073, 1048581, 0, 131073, 1048582, 0, 131073, 1048583, 0, 131073, 1048584, 0, 131073, 1048585, 0, 131073, 1048586, 0, 131074 )
tile_data = PoolIntArray( -393217, 0, 0, -458752, 0, 1, -458751, 0, 1, -458750, 0, 1, -458749, 0, 1, -458748, 0, 1, -458747, 0, 1, -458746, 0, 1, -458745, 0, 1, -458744, 0, 1, -458743, 0, 2, -327682, 0, 0, -327681, 0, 65545, -393216, 0, 131073, -393215, 0, 131073, -393214, 0, 131073, -393213, 0, 131073, -393212, 0, 131073, -393211, 0, 131073, -393210, 0, 131073, -393209, 0, 131073, -393208, 0, 131073, -393207, 0, 9, -393206, 0, 1, -393205, 0, 2, -262146, 0, 65536, -262145, 0, 65538, -327671, 0, 131072, -327670, 0, 65542, -327669, 0, 131077, -327668, 0, 2, -196611, 0, 0, -196610, 0, 131078, -196609, 0, 65538, -262142, 0, 0, -262141, 0, 1, -262140, 0, 1, -262139, 0, 1, -262138, 0, 1, -262137, 0, 2, -262134, 0, 131072, -262133, 0, 131073, -262132, 0, 65543, -131075, 0, 65536, -131074, 0, 65541, -131073, 0, 131074, -196606, 0, 131072, -196605, 0, 131073, -196604, 0, 131073, -196603, 0, 131073, -196602, 0, 65542, -196601, 0, 65538, -196596, 0, 131075, -196589, 0, 0, -196588, 0, 1, -196587, 0, 1, -196586, 0, 1, -196585, 0, 1, -196584, 0, 1, -196583, 0, 2, -65539, 0, 65536, -65538, 0, 65538, -131066, 0, 65536, -131065, 0, 65538, -131055, 0, 0, -131054, 0, 1, -131053, 0, 131078, -131052, 0, 65541, -131051, 0, 131073, -131050, 0, 131073, -131049, 0, 131073, -131048, 0, 65542, -131047, 0, 65538, -3, 0, 65536, -2, 0, 65538, -65530, 0, 65536, -65529, 0, 65538, -65524, 0, 0, -65523, 0, 1, -65522, 0, 1, -65521, 0, 1, -65520, 0, 1, -65519, 0, 65545, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131074, -65512, 0, 65536, -65511, 0, 65538, 65533, 0, 65536, 65534, 0, 65538, 6, 0, 65536, 7, 0, 65538, 12, 0, 65536, 13, 0, 65541, 14, 0, 131073, 15, 0, 131073, 16, 0, 131073, 17, 0, 131074, 24, 0, 65536, 25, 0, 65538, 131069, 0, 65536, 131070, 0, 65538, 65542, 0, 65536, 65543, 0, 131077, 65544, 0, 1, 65545, 0, 1, 65546, 0, 1, 65547, 0, 1, 65548, 0, 131078, 65549, 0, 65538, 65560, 0, 65536, 65561, 0, 65538, 196605, 0, 65536, 196606, 0, 65538, 131078, 0, 65536, 131079, 0, 65537, 131080, 0, 65537, 131081, 0, 65537, 131082, 0, 65537, 131083, 0, 65537, 131084, 0, 65537, 131085, 0, 65538, 131089, 0, 3, 131096, 0, 65536, 131097, 0, 65538, 262141, 0, 65536, 262142, 0, 65538, 196614, 0, 65536, 196615, 0, 65541, 196616, 0, 131073, 196617, 0, 131073, 196618, 0, 131073, 196619, 0, 131073, 196620, 0, 65542, 196621, 0, 65538, 196625, 0, 65539, 196632, 0, 65536, 196633, 0, 65538, 327677, 0, 65536, 327678, 0, 65538, 262150, 0, 65536, 262151, 0, 65538, 262156, 0, 65536, 262157, 0, 65538, 262161, 0, 65539, 262163, 0, 0, 262164, 0, 2, 262167, 0, 0, 262168, 0, 131078, 262169, 0, 65538, 393213, 0, 65536, 393214, 0, 131077, 393215, 0, 1, 327680, 0, 1, 327681, 0, 1, 327682, 0, 1, 327683, 0, 1, 327684, 0, 2, 327686, 0, 65536, 327687, 0, 65538, 327692, 0, 65536, 327693, 0, 65538, 327696, 0, 4, 327697, 0, 196615, 327699, 0, 131072, 327700, 0, 65543, 327703, 0, 65536, 327704, 0, 65541, 327705, 0, 131074, 458749, 0, 131072, 458750, 0, 131073, 458751, 0, 131073, 393216, 0, 131073, 393217, 0, 131073, 393218, 0, 131073, 393219, 0, 65542, 393220, 0, 65538, 393222, 0, 65536, 393223, 0, 65538, 393228, 0, 65536, 393229, 0, 131077, 393230, 0, 5, 393231, 0, 196609, 393232, 0, 196615, 393236, 0, 131075, 393239, 0, 65536, 393240, 0, 65538, 458755, 0, 65536, 458756, 0, 65538, 458758, 0, 65536, 458759, 0, 65538, 458761, 0, 0, 458762, 0, 2, 458764, 0, 131072, 458765, 0, 131073, 458766, 0, 131074, 458774, 0, 0, 458775, 0, 131078, 458776, 0, 65538, 524291, 0, 65536, 524292, 0, 65538, 524294, 0, 65536, 524295, 0, 65538, 524297, 0, 65536, 524298, 0, 65538, 524309, 0, 0, 524310, 0, 131078, 524311, 0, 65541, 524312, 0, 131074, 589827, 0, 65536, 589828, 0, 65538, 589830, 0, 131072, 589831, 0, 131074, 589833, 0, 65536, 589834, 0, 131077, 589835, 0, 1, 589836, 0, 1, 589837, 0, 1, 589838, 0, 1, 589839, 0, 1, 589840, 0, 1, 589841, 0, 1, 589842, 0, 1, 589843, 0, 1, 589844, 0, 1, 589845, 0, 131078, 589846, 0, 65541, 589847, 0, 131074, 655363, 0, 65536, 655364, 0, 65538, 655369, 0, 65536, 655370, 0, 65541, 655371, 0, 131073, 655372, 0, 131073, 655373, 0, 131073, 655374, 0, 131073, 655375, 0, 131073, 655376, 0, 131073, 655377, 0, 131073, 655378, 0, 131073, 655379, 0, 131073, 655380, 0, 131073, 655381, 0, 131073, 655382, 0, 131074, 720899, 0, 65536, 720900, 0, 65538, 720905, 0, 65536, 720906, 0, 65538, 786435, 0, 65536, 786436, 0, 65538, 786441, 0, 65536, 786442, 0, 65538, 851971, 0, 65536, 851972, 0, 65538, 851977, 0, 65536, 851978, 0, 65538, 917507, 0, 65536, 917508, 0, 65538, 917513, 0, 65536, 917514, 0, 65538, 983043, 0, 65536, 983044, 0, 131077, 983045, 0, 1, 983046, 0, 1, 983047, 0, 1, 983048, 0, 1, 983049, 0, 131078, 983050, 0, 65538, 1048579, 0, 131072, 1048580, 0, 131073, 1048581, 0, 131073, 1048582, 0, 131073, 1048583, 0, 131073, 1048584, 0, 131073, 1048585, 0, 131073, 1048586, 0, 131074 )
[node name="YSort" type="YSort" parent="."]
@@ -68,23 +69,45 @@ position = Vector2( 90, 175 )
[node name="Creepy Glowing Ghost 02" parent="YSort/Enemies" instance=ExtResource( 13 )]
position = Vector2( 100, 220 )
[node name="Creepy Glowing Ghost 03" parent="YSort/Enemies" instance=ExtResource( 13 )]
position = Vector2( 160, -20 )
[node name="Interactables" type="Node2D" parent="."]
[node name="Silver Key Pickup" parent="Interactables" instance=ExtResource( 11 )]
[node name="Silver Key Pickup 1" parent="Interactables" instance=ExtResource( 11 )]
position = Vector2( 240, 80 )
[node name="Silver Barrier" parent="Interactables" instance=ExtResource( 12 )]
[node name="Silver Barrier 1" parent="Interactables" instance=ExtResource( 12 )]
position = Vector2( 136, 120 )
alignment = "H"
[node name="Silver Key Pickup 2" parent="Interactables" instance=ExtResource( 11 )]
position = Vector2( -16, 64 )
[node name="Silver Barrier" parent="Interactables" instance=ExtResource( 12 )]
position = Vector2( 200, -24 )
[node name="Traps" type="Node2D" parent="."]
[node name="Spawn Trap" parent="Traps" instance=ExtResource( 10 )]
[node name="Spawn Trap 1" parent="Traps" instance=ExtResource( 10 )]
position = Vector2( 256, 16 )
enemy_path = "res://Enemies/Chasing Glowing Ghost.tscn"
relative_x_tiles = -1
relative_y_tiles = 2
[node name="Fire Spinner" parent="Traps" instance=ExtResource( 14 )]
position = Vector2( 40, 24 )
[node name="Spawn Trap 2" parent="Traps" instance=ExtResource( 10 )]
position = Vector2( 48, -80 )
enemy_path = "res://Enemies/Chasing Glowing Ghost.tscn"
relative_x_tiles = 3
[node name="Spawn Trap 3" parent="Traps" instance=ExtResource( 10 )]
position = Vector2( 48, -80 )
enemy_path = "res://Enemies/Chasing Glowing Ghost.tscn"
relative_x_tiles = 5
[node name="Projectiles" type="Node2D" parent="."]
[node name="HUD" parent="." instance=ExtResource( 3 )]

View File

@@ -0,0 +1,55 @@
extends StaticBody2D
export var glowing_fireball: PackedScene
var player: KinematicBody2D = null
var center: Vector2
var shoot_directions: Array
var rotated_shoot_directions: Array
func _ready() -> void:
center = $Sprite.global_position
shoot_directions = [
Vector2(center.x - 1, center.y),
Vector2(center.x + 1, center.y),
Vector2(center.x, center.y - 1),
Vector2(center.x, center.y + 1)]
rotated_shoot_directions = [
Vector2(center.x - 1, center.y - 1),
Vector2(center.x + 1, center.y + 1),
Vector2(center.x + 1, center.y - 1),
Vector2(center.x - 1, center.y + 1)]
return
func _on_spinner_timeout():
$Sprite.set_rotation_degrees($Sprite.get_rotation_degrees() + 45)
return
func _on_shoot_timeout():
if player:
var shoot_array: Array
if int($Sprite.get_rotation_degrees()) % 90 == 0:
shoot_array = shoot_directions
else:
shoot_array = rotated_shoot_directions
for itr in shoot_array:
var projectile: Node = glowing_fireball.instance()
projectile.init(center, itr)
get_tree().get_current_scene().get_node('Projectiles').add_child(projectile)
return
func _on_player_detector_body_entered(body: Node) -> void:
if body.is_in_group('player'):
player = body
return
func _on_player_detector_body_exited(body: Node) -> void:
if body.is_in_group('player'):
player = null
return

View File

@@ -0,0 +1,59 @@
[gd_scene load_steps=7 format=2]
[ext_resource path="res://Sprites/Levels/Objects/Fire_Spinner.png" type="Texture" id=1]
[ext_resource path="res://Levels/Traps/Fire Spinner.gd" type="Script" id=2]
[ext_resource path="res://Enemies/Projectiles/Glowing Fireball.tscn" type="PackedScene" id=3]
[ext_resource path="res://Sprites/Assets/Light.png" type="Texture" id=4]
[sub_resource type="CircleShape2D" id=1]
radius = 9.0
[sub_resource type="CircleShape2D" id=2]
radius = 80.0
[node name="Fire Spinner" type="StaticBody2D"]
light_mask = 0
collision_mask = 0
script = ExtResource( 2 )
glowing_fireball = ExtResource( 3 )
[node name="Sprite" type="Sprite" parent="."]
texture = ExtResource( 1 )
[node name="Collision" type="CollisionShape2D" parent="."]
visible = false
light_mask = 0
shape = SubResource( 1 )
[node name="Player Detector" type="Area2D" parent="."]
light_mask = 0
collision_layer = 0
collision_mask = 2
input_pickable = false
monitorable = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"]
visible = false
light_mask = 0
shape = SubResource( 2 )
[node name="Light2D" type="Light2D" parent="."]
light_mask = 15
texture = ExtResource( 4 )
texture_scale = 0.3
color = Color( 1, 0.164706, 0, 1 )
energy = 1.5
shadow_item_cull_mask = 0
[node name="Spinner" type="Timer" parent="."]
wait_time = 2.0
autostart = true
[node name="Shoot" type="Timer" parent="."]
wait_time = 0.5
autostart = true
[connection signal="body_entered" from="Player Detector" to="." method="_on_player_detector_body_entered"]
[connection signal="body_exited" from="Player Detector" to="." method="_on_player_detector_body_exited"]
[connection signal="timeout" from="Spinner" to="." method="_on_spinner_timeout"]
[connection signal="timeout" from="Shoot" to="." method="_on_shoot_timeout"]

View File

@@ -117,7 +117,9 @@ func _on_hitbox_area_entered(area: Area2D) -> void:
hud.update_health(HEALTH_SLICES[health_index])
else:
get_tree().change_scene('res://Levels/Hub World.tscn')
if get_tree().change_scene('res://GUI/Level Failed.tscn') != OK:
print('ERROR: Player failed to change scene to Level Failed.')
queue_free()
return

View File

@@ -10,11 +10,6 @@
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 4 ) ],
"loop": false,
"name": "look_up",
"speed": 5.0
}, {
"frames": [ ExtResource( 2 ) ],
"loop": false,
"name": "look_right",
@@ -29,6 +24,11 @@ animations = [ {
"loop": false,
"name": "look_left",
"speed": 5.0
}, {
"frames": [ ExtResource( 4 ) ],
"loop": false,
"name": "look_up",
"speed": 5.0
} ]
[sub_resource type="CapsuleShape2D" id=2]

BIN
Sprites/Assets/Smol_P.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Smol_P.png-461ab79206d243d0e6557502092babb6.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Assets/Smol_P.png"
dest_files=[ "res://.import/Smol_P.png-461ab79206d243d0e6557502092babb6.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=2
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=0
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

View File

@@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Glowing_Fireball.png-bc9c88e29a1eee0cb2ab4e7e7d242c8a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Enemies/Projectiles/Glowing_Fireball.png"
dest_files=[ "res://.import/Glowing_Fireball.png-bc9c88e29a1eee0cb2ab4e7e7d242c8a.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=2
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=0
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

View File

@@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/Fire_Spinner.png-9a680d54ca5433b685c52b10c84def6e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Sprites/Levels/Objects/Fire_Spinner.png"
dest_files=[ "res://.import/Fire_Spinner.png-9a680d54ca5433b685c52b10c84def6e.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=2
flags/repeat=0
flags/filter=false
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=0
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0