Added more levels
This commit is contained in:
parent
f12885ba4c
commit
32977ba666
19 changed files with 85 additions and 23 deletions
15
Scenes/Levels/level_2.tscn
Normal file
15
Scenes/Levels/level_2.tscn
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene format=4 uid="uid://cu13iy2i2eok2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://co1q286ior12i" path="res://Scripts/Levels/level_2.gd" id="1_oylv5"]
|
||||
[ext_resource type="TileSet" uid="uid://bxbrytgrtnaie" path="res://Sprites/Tile Sets/main.tres" id="2_w2ac1"]
|
||||
[ext_resource type="PackedScene" uid="uid://syx6ov00a585" path="res://Scenes/player.tscn" id="3_ovj6s"]
|
||||
|
||||
[node name="Main" type="Node2D" unique_id=1790453106]
|
||||
script = ExtResource("1_oylv5")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=1662317524]
|
||||
tile_map_data = PackedByteArray("AAABAAwAAAAAAAEAAAACAAwAAAAAAAEAAAADAAwAAAAAAAEAAAAEAAwAAAAAAAEAAAAFAAwAAAAAAAEAAAAGAAwAAAAAAAEAAAAHAAwAAAAAAAEAAAAIAAwAAAAAAAEAAAAJAAwAAAAAAAEAAAAQAAwAAAAAAAEAAAARAAwAAAAAAAEAAAASAAwAAAAAAAEAAAATAAwAAAAAAAEAAAAUAAwAAAAAAAEAAAAVAAwAAAAAAAEAAAAWAAwAAAAAAAEAAAAXAAwAAAAAAAEAAAAYAAwAAAAAAAEAAAAYAAsAAAACAAAAAAAIAAcAAAAAAAEAAAAJAAcAAAAAAAEAAAAKAAcAAAAAAAEAAAALAAcAAAAAAAEAAAAMAAcAAAAAAAEAAAANAAcAAAAAAAEAAAAOAAcAAAAAAAEAAAAPAAcAAAAAAAEAAAAQAAcAAAAAAAEAAAARAAcAAAAAAAEAAAA=")
|
||||
tile_set = ExtResource("2_w2ac1")
|
||||
|
||||
[node name="Player" parent="." unique_id=748235082 instance=ExtResource("3_ovj6s")]
|
||||
position = Vector2(24, 184)
|
||||
15
Scenes/Levels/level_3.tscn
Normal file
15
Scenes/Levels/level_3.tscn
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene format=4 uid="uid://d3vlua0i4hqn1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cwhqka60plgqp" path="res://Scripts/Levels/level_3.gd" id="1_nfly3"]
|
||||
[ext_resource type="TileSet" uid="uid://bxbrytgrtnaie" path="res://Sprites/Tile Sets/main.tres" id="2_t8c31"]
|
||||
[ext_resource type="PackedScene" uid="uid://syx6ov00a585" path="res://Scenes/player.tscn" id="3_rc141"]
|
||||
|
||||
[node name="Main" type="Node2D" unique_id=1790453106]
|
||||
script = ExtResource("1_nfly3")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=1662317524]
|
||||
tile_map_data = PackedByteArray("AAABAAwAAAAAAAEAAAACAAwAAAAAAAEAAAADAAwAAAAAAAEAAAAEAAwAAAAAAAEAAAAFAAwAAAAAAAEAAAAGAAwAAAAAAAEAAAAHAAwAAAAAAAEAAAAIAAwAAAAAAAEAAAAJAAwAAAAAAAEAAAAQAAwAAAAAAAEAAAARAAwAAAAAAAEAAAASAAwAAAAAAAEAAAATAAwAAAAAAAEAAAAUAAwAAAAAAAEAAAAVAAwAAAAAAAEAAAAWAAwAAAAAAAEAAAAXAAwAAAAAAAEAAAAYAAwAAAAAAAEAAAAYAAsAAAACAAAAAAAKAAcAAAAAAAEAAAALAAcAAAAAAAEAAAAMAAcAAAAAAAEAAAANAAcAAAAAAAEAAAAOAAcAAAAAAAEAAAAPAAcAAAAAAAEAAAAQAAcAAAAAAAEAAAARAAcAAAAAAAEAAAAJAAcAAAAAAAEAAAAIAAcAAAAAAAEAAAAKAAwAAAAAAAEAAAAPAAwAAAAAAAEAAAAOAAwAAAAAAAEAAAALAAwAAAAAAAEAAAAKAAsAAAABAAEAAAALAAsAAAABAAEAAAAMAAsAAAABAAEAAAANAAsAAAABAAEAAAAOAAsAAAABAAEAAAAPAAsAAAABAAEAAAAMAAwAAAAAAAEAAAANAAwAAAAAAAEAAAA=")
|
||||
tile_set = ExtResource("2_t8c31")
|
||||
|
||||
[node name="Player" parent="." unique_id=748235082 instance=ExtResource("3_rc141")]
|
||||
position = Vector2(24, 184)
|
||||
15
Scenes/Levels/level_4.tscn
Normal file
15
Scenes/Levels/level_4.tscn
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene format=4 uid="uid://cf2eony45smar"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cwhqka60plgqp" path="res://Scripts/Levels/level_3.gd" id="1_6grq2"]
|
||||
[ext_resource type="TileSet" uid="uid://bxbrytgrtnaie" path="res://Sprites/Tile Sets/main.tres" id="2_vwhew"]
|
||||
[ext_resource type="PackedScene" uid="uid://syx6ov00a585" path="res://Scenes/player.tscn" id="3_jqrsn"]
|
||||
|
||||
[node name="Main" type="Node2D" unique_id=1790453106]
|
||||
script = ExtResource("1_6grq2")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=1662317524]
|
||||
tile_map_data = PackedByteArray("AAABAAwAAAAAAAEAAAACAAwAAAAAAAEAAAADAAwAAAAAAAEAAAAEAAwAAAAAAAEAAAAJABMAAAAAAAEAAAAKABMAAAAAAAEAAAALABMAAAAAAAEAAAAMABMAAAAAAAEAAAARAAYAAAAAAAEAAAASAAYAAAAAAAEAAAATAAYAAAAAAAEAAAAUAAYAAAAAAAEAAAAUAAcAAAACAAAAAAA=")
|
||||
tile_set = ExtResource("2_vwhew")
|
||||
|
||||
[node name="Player" parent="." unique_id=748235082 instance=ExtResource("3_jqrsn")]
|
||||
position = Vector2(24, 184)
|
||||
|
|
@ -8,8 +8,8 @@
|
|||
script = ExtResource("1_q1p36")
|
||||
|
||||
[node name="TileMapLayer" type="TileMapLayer" parent="." unique_id=1288252359]
|
||||
position = Vector2(1, 0)
|
||||
tile_map_data = PackedByteArray("AAADAAgAAAAAAAEAAAAEAAgAAAAAAAEAAAAFAAg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AAAAAEAAAAMAAgAAAAAAAEAAAANAAgAAAAAAAEAAAAOAAgAAAAAAAEAAAAPAAwAAAAAAAEAAAAQAAwAAAAAAAEAAAAQAAsAAAAAAAEAAAAQAAoAAAAAAAEAAAAQAAkAAAAAAAEAAAAQAAgAAAAAAAEAAAAPAAgAAAAAAAEAAAAIAAgAAAACAAEAAAAJAAgAAAACAAEAAAAKAAgAAAACAAEAAAAJAAEAAAABAAIAAAAPAAsAAAABAAAAAAA=")
|
||||
tile_set = ExtResource("1_4te2q")
|
||||
|
||||
[node name="Player" parent="." unique_id=791571 instance=ExtResource("2_q1p36")]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene format=3 uid="uid://syx6ov00a585"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ohb2t6o7wr1u" path="res://Scripts/player.gd" id="1_cvnsp"]
|
||||
[ext_resource type="Texture2D" uid="uid://btqnhg54e1p66" path="res://Sprites/png/spritesheet.png" id="2_6t5aa"]
|
||||
[ext_resource type="Texture2D" uid="uid://cad78jiqplxdi" path="res://Sprites/png/spritesheet.png" id="2_6t5aa"]
|
||||
[ext_resource type="Material" uid="uid://ck13qte606w1j" path="res://Materials/Particles/down_particles.tres" id="2_vgqql"]
|
||||
[ext_resource type="Script" uid="uid://de1fdvk35epdt" path="res://Scripts/player_camera.gd" id="4_vgqql"]
|
||||
[ext_resource type="PackedScene" uid="uid://botdddpmgoc8o" path="res://Scenes/scene_transition_rect.tscn" id="5_fkybt"]
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ extends Node2D
|
|||
var startPosX : int = 24
|
||||
var startPosY : int = 184
|
||||
|
||||
var next_level : String = "res://Scenes/main.tscn"
|
||||
var next_level : String = "res://Scenes/Levels/level_2.tscn"
|
||||
|
|
|
|||
6
Scripts/Levels/level_2.gd
Normal file
6
Scripts/Levels/level_2.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
var startPosX : int = 24
|
||||
var startPosY : int = 184
|
||||
|
||||
var next_level : String = "res://Scenes/Levels/level_3.tscn"
|
||||
1
Scripts/Levels/level_2.gd.uid
Normal file
1
Scripts/Levels/level_2.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://co1q286ior12i
|
||||
6
Scripts/Levels/level_3.gd
Normal file
6
Scripts/Levels/level_3.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
var startPosX : int = 24
|
||||
var startPosY : int = 184
|
||||
|
||||
var next_level : String = "res://Scenes/main.tscn"
|
||||
1
Scripts/Levels/level_3.gd.uid
Normal file
1
Scripts/Levels/level_3.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cwhqka60plgqp
|
||||
6
Scripts/Levels/level_4.gd
Normal file
6
Scripts/Levels/level_4.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Node2D
|
||||
|
||||
var startPosX : int = 24
|
||||
var startPosY : int = 184
|
||||
|
||||
var next_level : String = "res://Scenes/main.tscn"
|
||||
1
Scripts/Levels/level_4.gd.uid
Normal file
1
Scripts/Levels/level_4.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dvxyil8cxwkqi
|
||||
|
|
@ -15,6 +15,8 @@ var move_input : float
|
|||
var dead : bool
|
||||
var tile_map_custom_data = []
|
||||
|
||||
signal player_died
|
||||
|
||||
func _ready() -> void:
|
||||
|
||||
#Loads in all of the custom tile data from the Tile Map Layer.
|
||||
|
|
@ -84,12 +86,15 @@ func tilemap_detection() -> void:
|
|||
"canc_grav":
|
||||
al_globals.x_gravity = 0
|
||||
al_globals.y_gravity = al_globals.gravity
|
||||
"void":
|
||||
print("you hit the void")
|
||||
|
||||
#Facilitates the death of the player.
|
||||
func death(fallen: bool) -> void:
|
||||
|
||||
#Prevents movement.
|
||||
dead = true
|
||||
player_died.emit()
|
||||
|
||||
#Checks if the player has not fallen out of bounds.
|
||||
#If not, halt all current velocity, and shrink them down to 0 scale as a death animation.
|
||||
|
|
@ -116,7 +121,7 @@ func respawn() -> void:
|
|||
|
||||
#Sets the Y gravity back to default (downwards)
|
||||
if al_globals.y_gravity < 0:
|
||||
al_globals.gravity *= -1
|
||||
al_globals.y_gravity *= -1
|
||||
|
||||
#Change their position to the start position of the current level.
|
||||
position.x = current_level.startPosX
|
||||
|
|
|
|||
|
|
@ -1,12 +1,13 @@
|
|||
[gd_resource type="TileSet" format=3 uid="uid://bxbrytgrtnaie"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://btqnhg54e1p66" path="res://Sprites/png/spritesheet.png" id="1_tl1wk"]
|
||||
[ext_resource type="Texture2D" uid="uid://cad78jiqplxdi" path="res://Sprites/png/spritesheet.png" id="1_tl1wk"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_bo1nx"]
|
||||
texture = ExtResource("1_tl1wk")
|
||||
0:0/0 = 0
|
||||
0:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
1:0/0 = 0
|
||||
1:0/0/custom_data_6 = true
|
||||
0:1/0 = 0
|
||||
0:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
|
||||
1:1/0 = 0
|
||||
|
|
@ -36,4 +37,6 @@ custom_data_layer_4/name = "left_grav"
|
|||
custom_data_layer_4/type = 1
|
||||
custom_data_layer_5/name = "canc_grav"
|
||||
custom_data_layer_5/type = 1
|
||||
custom_data_layer_6/name = "void"
|
||||
custom_data_layer_6/type = 1
|
||||
sources/0 = SubResource("TileSetAtlasSource_bo1nx")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://btqnhg54e1p66"
|
||||
uid="uid://cad78jiqplxdi"
|
||||
path="res://.godot/imported/spritesheet.png-a2ccbc152119c25d94640044aa7d9968.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
|
|
|
|||
|
|
@ -3,15 +3,11 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://r6u1jtnbr4eg"
|
||||
path="res://.godot/imported/atop.png-e7eeb8db1372f6d12e66a684718d9524.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/_Godot-IDE_/plugins/script_splitter/assets/atop.png"
|
||||
dest_files=["res://.godot/imported/atop.png-e7eeb8db1372f6d12e66a684718d9524.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
|
|||
|
|
@ -3,15 +3,11 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxds5tr6aq5v3"
|
||||
path="res://.godot/imported/file_in.png-af9f02cc8f82ddae25e5704ad234b217.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/_Godot-IDE_/plugins/script_splitter/assets/file_in.png"
|
||||
dest_files=["res://.godot/imported/file_in.png-af9f02cc8f82ddae25e5704ad234b217.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
|
|||
|
|
@ -3,15 +3,11 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://x8xl24etv1nb"
|
||||
path="res://.godot/imported/warning.png-7a2d105cf05eee357eaf1264447091e5.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/_Godot-IDE_/shared_resources/warning.png"
|
||||
dest_files=["res://.godot/imported/warning.png-7a2d105cf05eee357eaf1264447091e5.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
|||
[application]
|
||||
|
||||
config/name="TheFlipSide"
|
||||
run/main_scene="res://Scenes/main.tscn"
|
||||
run/main_scene="uid://c6aveiahox475"
|
||||
config/features=PackedStringArray("4.6", "Forward Plus")
|
||||
|
||||
[autoload]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue