From 9dfb7f8037be735d5e5f88fb47ae07d98dc39274 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 1 Aug 2020 16:39:38 +0300 Subject: Move levels under a Game node --- project.godot | 8 +- scenes/Game.tscn | 14 ++ scenes/Level1.tscn | 339 +++++++++++++++++++++++++++++++++++++++++++ scenes/Level2.tscn | 341 +++++++++++++++++++++++++++++++++++++++++++ scenes/Scene1.tscn | 345 -------------------------------------------- scenes/Scene2.tscn | 352 --------------------------------------------- scripts/Game.gd | 42 ++++++ scripts/Ladder.gd | 4 +- scripts/PlayerCharacter.gd | 10 -- 9 files changed, 745 insertions(+), 710 deletions(-) create mode 100644 scenes/Game.tscn create mode 100644 scenes/Level1.tscn create mode 100644 scenes/Level2.tscn delete mode 100644 scenes/Scene1.tscn delete mode 100644 scenes/Scene2.tscn create mode 100644 scripts/Game.gd diff --git a/project.godot b/project.godot index 0233336..d677db4 100644 --- a/project.godot +++ b/project.godot @@ -19,6 +19,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://scripts/GUI.gd" }, { +"base": "Node", +"class": "Game", +"language": "GDScript", +"path": "res://scripts/Game.gd" +}, { "base": "KinematicBody2D", "class": "PlayerCharacter", "language": "GDScript", @@ -27,13 +32,14 @@ _global_script_classes=[ { _global_script_class_icons={ "DwarfNPC": "", "GUI": "", +"Game": "", "PlayerCharacter": "" } [application] config/name="Rpg 1" -run/main_scene="res://scenes/Scene1.tscn" +run/main_scene="res://scenes/Game.tscn" config/icon="res://icon.png" [rendering] diff --git a/scenes/Game.tscn b/scenes/Game.tscn new file mode 100644 index 0000000..35d3bfd --- /dev/null +++ b/scenes/Game.tscn @@ -0,0 +1,14 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://scenes/Level1.tscn" type="PackedScene" id=1] +[ext_resource path="res://scenes/GUI.tscn" type="PackedScene" id=2] +[ext_resource path="res://scripts/Game.gd" type="Script" id=3] + +[node name="Game" type="Node"] +script = ExtResource( 3 ) + +[node name="Level" parent="." instance=ExtResource( 1 )] + +[node name="CanvasLayer" type="CanvasLayer" parent="."] + +[node name="GUI" parent="CanvasLayer" instance=ExtResource( 2 )] diff --git a/scenes/Level1.tscn b/scenes/Level1.tscn new file mode 100644 index 0000000..87924f5 --- /dev/null +++ b/scenes/Level1.tscn @@ -0,0 +1,339 @@ +[gd_scene load_steps=52 format=2] + +[ext_resource path="res://scenes/PlayerCharacter.tscn" type="PackedScene" id=1] +[ext_resource path="res://textures/world_tileset.tres" type="Texture" id=2] +[ext_resource path="res://scenes/DwarfNPC.tscn" type="PackedScene" id=3] +[ext_resource path="res://scripts/Scene1.gd" type="Script" id=4] +[ext_resource path="res://externals/point_light.png" type="Texture" id=5] +[ext_resource path="res://scenes/Ladder.tscn" type="PackedScene" id=6] + +[sub_resource type="OccluderPolygon2D" id=1] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=3] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=4] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=5] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=6] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=7] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="OccluderPolygon2D" id=8] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=9] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=10] +polygon = PoolVector2Array( 0, 8, 4, 8, 4, 4, 0, 4 ) + +[sub_resource type="OccluderPolygon2D" id=11] +polygon = PoolVector2Array( 0, 8, 4, 8, 4, 0, 0, 0 ) + +[sub_resource type="OccluderPolygon2D" id=12] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=13] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=14] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=15] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=16] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=17] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=18] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=19] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=20] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=21] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=22] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=23] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=24] +points = PoolVector2Array( 0, 4, 8, 4, 8, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=25] +points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=26] +points = PoolVector2Array( 0, 4, 4, 4, 4, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=27] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=28] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=29] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=30] +points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=31] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=32] +points = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=33] +points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=34] +points = PoolVector2Array( 4, 8, 0, 8, 0, 4, 4, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=35] +points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=36] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=37] +points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=38] +points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=39] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=40] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=41] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=42] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=43] +points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=44] +points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) + +[sub_resource type="TileSet" id=45] +0/name = "world_tileset.tres 0" +0/texture = ExtResource( 2 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 64, 56 ) +0/tile_mode = 2 +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 8, 8 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 1, 0 ), SubResource( 4 ), Vector2( 1, 1 ), SubResource( 5 ), Vector2( 1, 2 ), SubResource( 6 ), Vector2( 2, 0 ), SubResource( 7 ), Vector2( 2, 1 ), SubResource( 8 ), Vector2( 2, 2 ), SubResource( 9 ), Vector2( 3, 0 ), SubResource( 10 ), Vector2( 3, 1 ), SubResource( 11 ), Vector2( 3, 2 ), SubResource( 12 ), Vector2( 4, 0 ), SubResource( 13 ), Vector2( 4, 1 ), SubResource( 14 ), Vector2( 4, 2 ), SubResource( 15 ), Vector2( 5, 0 ), SubResource( 16 ), Vector2( 5, 1 ), SubResource( 17 ), Vector2( 5, 2 ), SubResource( 18 ), Vector2( 6, 1 ), SubResource( 19 ), Vector2( 6, 2 ), SubResource( 20 ), Vector2( 7, 1 ), SubResource( 21 ), Vector2( 7, 2 ), SubResource( 22 ) ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape = SubResource( 23 ) +0/shape_one_way = false +0/shape_one_way_margin = 1.0 +0/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 23 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 24 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 25 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 26 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 27 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 28 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 29 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 30 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 31 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 32 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 33 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 34 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 35 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 36 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 37 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 38 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 39 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 40 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 41 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 42 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 43 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 44 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +0/z_index = 0 + +[node name="Scene1" type="Node2D"] +script = ExtResource( 4 ) + +[node name="YSort" type="YSort" parent="."] + +[node name="TileMap" type="TileMap" parent="YSort"] +tile_set = SubResource( 45 ) +cell_size = Vector2( 8, 8 ) +cell_tile_origin = 2 +cell_y_sort = true +format = 1 +tile_data = PoolIntArray( -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 65540, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 1, 8, 0, 1, 9, 0, 1, 10, 0, 1, 11, 0, 1, 12, 0, 65541, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 65539, 65548, 0, 65538, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 65539, 131084, 0, 65538, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 65539, 196614, 0, 65542, 196615, 0, 1, 196616, 0, 1, 196617, 0, 1, 196618, 0, 1, 196619, 0, 1, 196620, 0, 65541, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 327677, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 65539, 262150, 0, 131075, 262156, 0, 65538, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 0, 393214, 0, 0, 393215, 0, 0, 327680, 0, 65539, 327692, 0, 65538, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 327700, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 65540, 393217, 0, 1, 393218, 0, 1, 393219, 0, 1, 393220, 0, 4, 393228, 0, 65538, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 65539, 458764, 0, 65538, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 131076, 524289, 0, 1, 524290, 0, 1, 524291, 0, 1, 524292, 0, 1, 524293, 0, 1, 524294, 0, 1, 524295, 0, 1, 524296, 0, 1, 524297, 0, 1, 524298, 0, 1, 524299, 0, 1, 524300, 0, 131077, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0 ) + +[node name="PlayerCharacter" parent="YSort" instance=ExtResource( 1 )] +position = Vector2( 12.8563, 19.5552 ) +speed = 32 + +[node name="Camera2D" type="Camera2D" parent="YSort/PlayerCharacter"] +current = true +zoom = Vector2( 0.2, 0.2 ) +process_mode = 0 +smoothing_speed = 2.0 + +[node name="Light2D" type="Light2D" parent="YSort/PlayerCharacter"] +position = Vector2( 0.257721, 0.17543 ) +rotation = 3.14159 +texture = ExtResource( 5 ) +texture_scale = 2.54 +color = Color( 0.827451, 0.886275, 0.705882, 1 ) +energy = 1.2 +mode = 2 +shadow_color = Color( 0.184314, 0.215686, 0.176471, 0 ) +shadow_filter = 1 + +[node name="DwarfNPC" parent="YSort" groups=[ +"Dialogue", +] instance=ExtResource( 3 )] +position = Vector2( 51.6174, 19.3117 ) +target = NodePath("../PlayerCharacter") + +[node name="Ladder" parent="YSort" instance=ExtResource( 6 )] +target_scene_num = 2 diff --git a/scenes/Level2.tscn b/scenes/Level2.tscn new file mode 100644 index 0000000..6312f9c --- /dev/null +++ b/scenes/Level2.tscn @@ -0,0 +1,341 @@ +[gd_scene load_steps=52 format=2] + +[ext_resource path="res://textures/world_tileset.tres" type="Texture" id=1] +[ext_resource path="res://scenes/DwarfNPC.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/Ladder.tscn" type="PackedScene" id=3] +[ext_resource path="res://scenes/PlayerCharacter.tscn" type="PackedScene" id=4] +[ext_resource path="res://externals/point_light.png" type="Texture" id=5] +[ext_resource path="res://scripts/Scene1.gd" type="Script" id=6] + +[sub_resource type="OccluderPolygon2D" id=1] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=2] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=3] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=4] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=5] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=6] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=7] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="OccluderPolygon2D" id=8] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=9] +polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=10] +polygon = PoolVector2Array( 0, 8, 4, 8, 4, 4, 0, 4 ) + +[sub_resource type="OccluderPolygon2D" id=11] +polygon = PoolVector2Array( 0, 8, 4, 8, 4, 0, 0, 0 ) + +[sub_resource type="OccluderPolygon2D" id=12] +polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="OccluderPolygon2D" id=13] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=14] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=15] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=16] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=17] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=18] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=19] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=20] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=21] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="OccluderPolygon2D" id=22] +polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=23] +points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=24] +points = PoolVector2Array( 0, 4, 8, 4, 8, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=25] +points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=26] +points = PoolVector2Array( 0, 4, 4, 4, 4, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=27] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=28] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=29] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=30] +points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=31] +points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=32] +points = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) + +[sub_resource type="ConvexPolygonShape2D" id=33] +points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=34] +points = PoolVector2Array( 4, 8, 0, 8, 0, 4, 4, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=35] +points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=36] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=37] +points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=38] +points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=39] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=40] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=41] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=42] +points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) + +[sub_resource type="ConvexPolygonShape2D" id=43] +points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=44] +points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) + +[sub_resource type="TileSet" id=45] +0/name = "world_tileset.tres 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 64, 56 ) +0/tile_mode = 2 +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 8, 8 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 1, 0 ), SubResource( 4 ), Vector2( 1, 1 ), SubResource( 5 ), Vector2( 1, 2 ), SubResource( 6 ), Vector2( 2, 0 ), SubResource( 7 ), Vector2( 2, 1 ), SubResource( 8 ), Vector2( 2, 2 ), SubResource( 9 ), Vector2( 3, 0 ), SubResource( 10 ), Vector2( 3, 1 ), SubResource( 11 ), Vector2( 3, 2 ), SubResource( 12 ), Vector2( 4, 0 ), SubResource( 13 ), Vector2( 4, 1 ), SubResource( 14 ), Vector2( 4, 2 ), SubResource( 15 ), Vector2( 5, 0 ), SubResource( 16 ), Vector2( 5, 1 ), SubResource( 17 ), Vector2( 5, 2 ), SubResource( 18 ), Vector2( 6, 1 ), SubResource( 19 ), Vector2( 6, 2 ), SubResource( 20 ), Vector2( 7, 1 ), SubResource( 21 ), Vector2( 7, 2 ), SubResource( 22 ) ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape = SubResource( 23 ) +0/shape_one_way = false +0/shape_one_way_margin = 1.0 +0/shapes = [ { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 23 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 24 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 25 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 26 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 27 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 28 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 29 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 30 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 31 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 32 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 33 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 34 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 3, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 35 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 36 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 37 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 38 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 39 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 40 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 6, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 41 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 7, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 42 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 4, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 43 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 5, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 44 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +0/z_index = 0 + +[node name="Scene2" type="Node2D"] +script = ExtResource( 6 ) + +[node name="YSort" type="YSort" parent="."] + +[node name="TileMap" type="TileMap" parent="YSort"] +tile_set = SubResource( 45 ) +cell_size = Vector2( 8, 8 ) +cell_tile_origin = 2 +cell_y_sort = true +format = 1 +tile_data = PoolIntArray( -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 65540, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 1, 8, 0, 1, 9, 0, 1, 10, 0, 1, 11, 0, 1, 12, 0, 65541, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 65539, 65548, 0, 65538, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 65539, 131084, 0, 65538, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 5, 262142, 0, 1, 262143, 0, 1, 196608, 0, 131075, 196620, 0, 2, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 262156, 0, 65538, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 5, 393214, 0, 1, 393215, 0, 1, 327680, 0, 3, 327692, 0, 65538, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 327700, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 3, 393228, 0, 65538, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 65539, 458764, 0, 65538, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 131076, 524289, 0, 1, 524290, 0, 1, 524291, 0, 1, 524292, 0, 1, 524293, 0, 1, 524294, 0, 1, 524295, 0, 1, 524296, 0, 1, 524297, 0, 1, 524298, 0, 1, 524299, 0, 1, 524300, 0, 131077, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0 ) + +[node name="PlayerCharacter" parent="YSort" instance=ExtResource( 4 )] +position = Vector2( 90.8539, 19.871 ) +speed = 32 + +[node name="Camera2D" type="Camera2D" parent="YSort/PlayerCharacter"] +current = true +zoom = Vector2( 0.2, 0.2 ) +process_mode = 0 +smoothing_enabled = true +smoothing_speed = 2.0 + +[node name="Light2D" type="Light2D" parent="YSort/PlayerCharacter"] +position = Vector2( 0.257721, 0.17543 ) +rotation = 3.14159 +texture = ExtResource( 5 ) +texture_scale = 2.54 +color = Color( 0.827451, 0.886275, 0.705882, 1 ) +energy = 1.2 +mode = 2 +shadow_color = Color( 0.184314, 0.215686, 0.176471, 0 ) +shadow_filter = 1 + +[node name="DwarfNPC" parent="YSort" groups=[ +"Dialogue", +] instance=ExtResource( 2 )] +position = Vector2( 17.3501, 55.8153 ) +target = NodePath("../../../Scene2/YSort/PlayerCharacter") + +[node name="Ladder" parent="YSort" instance=ExtResource( 3 )] +position = Vector2( 88, 48 ) +target_scene_num = 1 diff --git a/scenes/Scene1.tscn b/scenes/Scene1.tscn deleted file mode 100644 index d6652d9..0000000 --- a/scenes/Scene1.tscn +++ /dev/null @@ -1,345 +0,0 @@ -[gd_scene load_steps=53 format=2] - -[ext_resource path="res://scenes/PlayerCharacter.tscn" type="PackedScene" id=1] -[ext_resource path="res://textures/world_tileset.tres" type="Texture" id=2] -[ext_resource path="res://scenes/DwarfNPC.tscn" type="PackedScene" id=3] -[ext_resource path="res://scripts/Scene1.gd" type="Script" id=4] -[ext_resource path="res://externals/point_light.png" type="Texture" id=5] -[ext_resource path="res://scenes/Ladder.tscn" type="PackedScene" id=6] -[ext_resource path="res://scenes/GUI.tscn" type="PackedScene" id=7] - -[sub_resource type="OccluderPolygon2D" id=1] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=2] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=3] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=4] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=5] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=6] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=7] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="OccluderPolygon2D" id=8] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=9] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=10] -polygon = PoolVector2Array( 0, 8, 4, 8, 4, 4, 0, 4 ) - -[sub_resource type="OccluderPolygon2D" id=11] -polygon = PoolVector2Array( 0, 8, 4, 8, 4, 0, 0, 0 ) - -[sub_resource type="OccluderPolygon2D" id=12] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=13] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=14] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=15] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=16] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=17] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=18] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=19] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=20] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=21] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=22] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=23] -points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=24] -points = PoolVector2Array( 0, 4, 8, 4, 8, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=25] -points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=26] -points = PoolVector2Array( 0, 4, 4, 4, 4, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=27] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=28] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=29] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=30] -points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=31] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=32] -points = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=33] -points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=34] -points = PoolVector2Array( 4, 8, 0, 8, 0, 4, 4, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=35] -points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=36] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=37] -points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=38] -points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=39] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=40] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=41] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=42] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=43] -points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=44] -points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) - -[sub_resource type="TileSet" id=45] -0/name = "world_tileset.tres 0" -0/texture = ExtResource( 2 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 64, 56 ) -0/tile_mode = 2 -0/autotile/icon_coordinate = Vector2( 0, 0 ) -0/autotile/tile_size = Vector2( 8, 8 ) -0/autotile/spacing = 0 -0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 1, 0 ), SubResource( 4 ), Vector2( 1, 1 ), SubResource( 5 ), Vector2( 1, 2 ), SubResource( 6 ), Vector2( 2, 0 ), SubResource( 7 ), Vector2( 2, 1 ), SubResource( 8 ), Vector2( 2, 2 ), SubResource( 9 ), Vector2( 3, 0 ), SubResource( 10 ), Vector2( 3, 1 ), SubResource( 11 ), Vector2( 3, 2 ), SubResource( 12 ), Vector2( 4, 0 ), SubResource( 13 ), Vector2( 4, 1 ), SubResource( 14 ), Vector2( 4, 2 ), SubResource( 15 ), Vector2( 5, 0 ), SubResource( 16 ), Vector2( 5, 1 ), SubResource( 17 ), Vector2( 5, 2 ), SubResource( 18 ), Vector2( 6, 1 ), SubResource( 19 ), Vector2( 6, 2 ), SubResource( 20 ), Vector2( 7, 1 ), SubResource( 21 ), Vector2( 7, 2 ), SubResource( 22 ) ] -0/autotile/navpoly_map = [ ] -0/autotile/priority_map = [ ] -0/autotile/z_index_map = [ ] -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shape_offset = Vector2( 0, 0 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape = SubResource( 23 ) -0/shape_one_way = false -0/shape_one_way_margin = 1.0 -0/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 23 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 24 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 25 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 26 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 27 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 0, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 28 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 29 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 0, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 30 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 31 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 32 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 33 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 34 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 35 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 36 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 37 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 38 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 6, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 39 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 7, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 40 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 6, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 41 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 7, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 42 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 43 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 44 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -} ] -0/z_index = 0 - -[node name="Scene1" type="Node2D"] -script = ExtResource( 4 ) - -[node name="YSort" type="YSort" parent="."] - -[node name="TileMap" type="TileMap" parent="YSort"] -tile_set = SubResource( 45 ) -cell_size = Vector2( 8, 8 ) -cell_tile_origin = 2 -cell_y_sort = true -format = 1 -tile_data = PoolIntArray( -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 65540, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 1, 8, 0, 1, 9, 0, 1, 10, 0, 1, 11, 0, 1, 12, 0, 65541, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 65539, 65548, 0, 65538, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 65539, 131084, 0, 65538, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 0, 262142, 0, 0, 262143, 0, 0, 196608, 0, 65539, 196614, 0, 65542, 196615, 0, 1, 196616, 0, 1, 196617, 0, 1, 196618, 0, 1, 196619, 0, 1, 196620, 0, 65541, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 327677, 0, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 65539, 262150, 0, 131075, 262156, 0, 65538, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 0, 393214, 0, 0, 393215, 0, 0, 327680, 0, 65539, 327692, 0, 65538, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 327700, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 65540, 393217, 0, 1, 393218, 0, 1, 393219, 0, 1, 393220, 0, 4, 393228, 0, 65538, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 65539, 458764, 0, 65538, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 131076, 524289, 0, 1, 524290, 0, 1, 524291, 0, 1, 524292, 0, 1, 524293, 0, 1, 524294, 0, 1, 524295, 0, 1, 524296, 0, 1, 524297, 0, 1, 524298, 0, 1, 524299, 0, 1, 524300, 0, 131077, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0 ) - -[node name="PlayerCharacter" parent="YSort" instance=ExtResource( 1 )] -position = Vector2( 12.8563, 19.5552 ) -speed = 32 -gui_node = NodePath("../../CanvasLayer/GUI") - -[node name="Camera2D" type="Camera2D" parent="YSort/PlayerCharacter"] -current = true -zoom = Vector2( 0.2, 0.2 ) -process_mode = 0 -smoothing_speed = 2.0 - -[node name="Light2D" type="Light2D" parent="YSort/PlayerCharacter"] -position = Vector2( 0.257721, 0.17543 ) -rotation = 3.14159 -texture = ExtResource( 5 ) -texture_scale = 2.54 -color = Color( 0.827451, 0.886275, 0.705882, 1 ) -energy = 1.2 -mode = 2 -shadow_color = Color( 0.184314, 0.215686, 0.176471, 0 ) -shadow_filter = 1 - -[node name="DwarfNPC" parent="YSort" groups=[ -"Dialogue", -] instance=ExtResource( 3 )] -position = Vector2( 51.6174, 19.3117 ) -target = NodePath("../PlayerCharacter") - -[node name="Ladder" parent="YSort" instance=ExtResource( 6 )] -target_scene_num = 2 - -[node name="CanvasLayer" type="CanvasLayer" parent="."] - -[node name="GUI" parent="CanvasLayer" instance=ExtResource( 7 )] diff --git a/scenes/Scene2.tscn b/scenes/Scene2.tscn deleted file mode 100644 index a19590b..0000000 --- a/scenes/Scene2.tscn +++ /dev/null @@ -1,352 +0,0 @@ -[gd_scene load_steps=53 format=2] - -[ext_resource path="res://scenes/PlayerCharacter.tscn" type="PackedScene" id=1] -[ext_resource path="res://textures/world_tileset.tres" type="Texture" id=2] -[ext_resource path="res://scenes/DwarfNPC.tscn" type="PackedScene" id=3] -[ext_resource path="res://scripts/Scene1.gd" type="Script" id=4] -[ext_resource path="res://externals/point_light.png" type="Texture" id=5] -[ext_resource path="res://scenes/Ladder.tscn" type="PackedScene" id=6] -[ext_resource path="res://scripts/GUI.gd" type="Script" id=7] - -[sub_resource type="OccluderPolygon2D" id=1] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=2] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=3] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=4] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=5] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=6] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=7] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="OccluderPolygon2D" id=8] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=9] -polygon = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=10] -polygon = PoolVector2Array( 0, 8, 4, 8, 4, 4, 0, 4 ) - -[sub_resource type="OccluderPolygon2D" id=11] -polygon = PoolVector2Array( 0, 8, 4, 8, 4, 0, 0, 0 ) - -[sub_resource type="OccluderPolygon2D" id=12] -polygon = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="OccluderPolygon2D" id=13] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=14] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=15] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=16] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=17] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=18] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=19] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=20] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=21] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="OccluderPolygon2D" id=22] -polygon = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=23] -points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=24] -points = PoolVector2Array( 0, 4, 8, 4, 8, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=25] -points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=26] -points = PoolVector2Array( 0, 4, 4, 4, 4, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=27] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=28] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=29] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=30] -points = PoolVector2Array( 8, 8, 4, 8, 4, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=31] -points = PoolVector2Array( 8, 8, 4, 8, 4, 0, 8, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=32] -points = PoolVector2Array( 0, 0, 4, 0, 4, 8, 0, 8 ) - -[sub_resource type="ConvexPolygonShape2D" id=33] -points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=34] -points = PoolVector2Array( 4, 8, 0, 8, 0, 4, 4, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=35] -points = PoolVector2Array( 4, 8, 0, 8, 0, 0, 4, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=36] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=37] -points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=38] -points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=39] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=40] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=41] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=42] -points = PoolVector2Array( 8, 8, 0, 8, 0, 4, 8, 4 ) - -[sub_resource type="ConvexPolygonShape2D" id=43] -points = PoolVector2Array( 4, 0, 4, 4, 8, 4, 8, 8, 0, 8, 0, 0 ) - -[sub_resource type="ConvexPolygonShape2D" id=44] -points = PoolVector2Array( 4, 4, 4, 0, 8, 0, 8, 8, 0, 8, 0, 4 ) - -[sub_resource type="TileSet" id=45] -0/name = "world_tileset.tres 0" -0/texture = ExtResource( 2 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 64, 56 ) -0/tile_mode = 2 -0/autotile/icon_coordinate = Vector2( 0, 0 ) -0/autotile/tile_size = Vector2( 8, 8 ) -0/autotile/spacing = 0 -0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 1, 0 ), SubResource( 4 ), Vector2( 1, 1 ), SubResource( 5 ), Vector2( 1, 2 ), SubResource( 6 ), Vector2( 2, 0 ), SubResource( 7 ), Vector2( 2, 1 ), SubResource( 8 ), Vector2( 2, 2 ), SubResource( 9 ), Vector2( 3, 0 ), SubResource( 10 ), Vector2( 3, 1 ), SubResource( 11 ), Vector2( 3, 2 ), SubResource( 12 ), Vector2( 4, 0 ), SubResource( 13 ), Vector2( 4, 1 ), SubResource( 14 ), Vector2( 4, 2 ), SubResource( 15 ), Vector2( 5, 0 ), SubResource( 16 ), Vector2( 5, 1 ), SubResource( 17 ), Vector2( 5, 2 ), SubResource( 18 ), Vector2( 6, 1 ), SubResource( 19 ), Vector2( 6, 2 ), SubResource( 20 ), Vector2( 7, 1 ), SubResource( 21 ), Vector2( 7, 2 ), SubResource( 22 ) ] -0/autotile/navpoly_map = [ ] -0/autotile/priority_map = [ ] -0/autotile/z_index_map = [ ] -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shape_offset = Vector2( 0, 0 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape = SubResource( 23 ) -0/shape_one_way = false -0/shape_one_way_margin = 1.0 -0/shapes = [ { -"autotile_coord": Vector2( 0, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 23 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 24 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 25 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 26 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 27 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 0, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 28 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 29 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 0, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 30 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 2, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 31 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 32 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 33 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 1, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 34 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 3, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 35 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 0 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 36 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 37 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 38 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 6, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 39 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 7, 1 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 40 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 6, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 41 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 7, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 42 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 4, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 43 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -}, { -"autotile_coord": Vector2( 5, 2 ), -"one_way": false, -"one_way_margin": 1.0, -"shape": SubResource( 44 ), -"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) -} ] -0/z_index = 0 - -[node name="Scene2" type="Node2D"] -script = ExtResource( 4 ) - -[node name="YSort" type="YSort" parent="."] - -[node name="TileMap" type="TileMap" parent="YSort"] -tile_set = SubResource( 45 ) -cell_size = Vector2( 8, 8 ) -cell_tile_origin = 2 -cell_y_sort = true -format = 1 -tile_data = PoolIntArray( -262152, 0, 0, -262151, 0, 0, -262150, 0, 0, -262149, 0, 0, -262148, 0, 0, -262147, 0, 0, -262146, 0, 0, -262145, 0, 0, -327680, 0, 0, -327679, 0, 0, -327678, 0, 0, -327677, 0, 0, -327676, 0, 0, -327675, 0, 0, -327674, 0, 0, -327673, 0, 0, -327672, 0, 0, -327671, 0, 0, -327670, 0, 0, -327669, 0, 0, -327668, 0, 0, -327667, 0, 0, -327666, 0, 0, -327665, 0, 0, -327664, 0, 0, -327663, 0, 0, -327662, 0, 0, -327661, 0, 0, -327660, 0, 0, -196616, 0, 0, -196615, 0, 0, -196614, 0, 0, -196613, 0, 0, -196612, 0, 0, -196611, 0, 0, -196610, 0, 0, -196609, 0, 0, -262144, 0, 0, -262143, 0, 0, -262142, 0, 0, -262141, 0, 0, -262140, 0, 0, -262139, 0, 0, -262138, 0, 0, -262137, 0, 0, -262136, 0, 0, -262135, 0, 0, -262134, 0, 0, -262133, 0, 0, -262132, 0, 0, -262131, 0, 0, -262130, 0, 0, -262129, 0, 0, -262128, 0, 0, -262127, 0, 0, -262126, 0, 0, -262125, 0, 0, -262124, 0, 0, -131080, 0, 0, -131079, 0, 0, -131078, 0, 0, -131077, 0, 0, -131076, 0, 0, -131075, 0, 0, -131074, 0, 0, -131073, 0, 0, -196608, 0, 0, -196607, 0, 0, -196606, 0, 0, -196605, 0, 0, -196604, 0, 0, -196603, 0, 0, -196602, 0, 0, -196601, 0, 0, -196600, 0, 0, -196599, 0, 0, -196598, 0, 0, -196597, 0, 0, -196596, 0, 0, -196595, 0, 0, -196594, 0, 0, -196593, 0, 0, -196592, 0, 0, -196591, 0, 0, -196590, 0, 0, -196589, 0, 0, -196588, 0, 0, -65544, 0, 0, -65543, 0, 0, -65542, 0, 0, -65541, 0, 0, -65540, 0, 0, -65539, 0, 0, -65538, 0, 0, -65537, 0, 0, -131072, 0, 0, -131071, 0, 0, -131070, 0, 0, -131069, 0, 0, -131068, 0, 0, -131067, 0, 0, -131066, 0, 0, -131065, 0, 0, -131064, 0, 0, -131063, 0, 0, -131062, 0, 0, -131061, 0, 0, -131060, 0, 0, -131059, 0, 0, -131058, 0, 0, -131057, 0, 0, -131056, 0, 0, -131055, 0, 0, -131054, 0, 0, -131053, 0, 0, -131052, 0, 0, -8, 0, 0, -7, 0, 0, -6, 0, 0, -5, 0, 0, -4, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0, -65534, 0, 0, -65533, 0, 0, -65532, 0, 0, -65531, 0, 0, -65530, 0, 0, -65529, 0, 0, -65528, 0, 0, -65527, 0, 0, -65526, 0, 0, -65525, 0, 0, -65524, 0, 0, -65523, 0, 0, -65522, 0, 0, -65521, 0, 0, -65520, 0, 0, -65519, 0, 0, -65518, 0, 0, -65517, 0, 0, -65516, 0, 0, 65528, 0, 0, 65529, 0, 0, 65530, 0, 0, 65531, 0, 0, 65532, 0, 0, 65533, 0, 0, 65534, 0, 0, 65535, 0, 0, 0, 0, 65540, 1, 0, 1, 2, 0, 1, 3, 0, 1, 4, 0, 1, 5, 0, 1, 6, 0, 1, 7, 0, 1, 8, 0, 1, 9, 0, 1, 10, 0, 1, 11, 0, 1, 12, 0, 65541, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 131064, 0, 0, 131065, 0, 0, 131066, 0, 0, 131067, 0, 0, 131068, 0, 0, 131069, 0, 0, 131070, 0, 0, 131071, 0, 0, 65536, 0, 65539, 65548, 0, 65538, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 196600, 0, 0, 196601, 0, 0, 196602, 0, 0, 196603, 0, 0, 196604, 0, 0, 196605, 0, 0, 196606, 0, 0, 196607, 0, 0, 131072, 0, 65539, 131084, 0, 65538, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 262136, 0, 0, 262137, 0, 0, 262138, 0, 0, 262139, 0, 0, 262140, 0, 0, 262141, 0, 5, 262142, 0, 1, 262143, 0, 1, 196608, 0, 131075, 196620, 0, 2, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 327672, 0, 0, 327673, 0, 0, 327674, 0, 0, 327675, 0, 0, 327676, 0, 0, 262156, 0, 65538, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 393208, 0, 0, 393209, 0, 0, 393210, 0, 0, 393211, 0, 0, 393212, 0, 0, 393213, 0, 5, 393214, 0, 1, 393215, 0, 1, 327680, 0, 3, 327692, 0, 65538, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 327697, 0, 0, 327698, 0, 0, 327699, 0, 0, 327700, 0, 0, 458744, 0, 0, 458745, 0, 0, 458746, 0, 0, 458747, 0, 0, 458748, 0, 0, 458749, 0, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 3, 393228, 0, 65538, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 0, 0, 524280, 0, 0, 524281, 0, 0, 524282, 0, 0, 524283, 0, 0, 524284, 0, 0, 524285, 0, 0, 524286, 0, 0, 524287, 0, 0, 458752, 0, 65539, 458764, 0, 65538, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 0, 0, 589816, 0, 0, 589817, 0, 0, 589818, 0, 0, 589819, 0, 0, 589820, 0, 0, 589821, 0, 0, 589822, 0, 0, 589823, 0, 0, 524288, 0, 131076, 524289, 0, 1, 524290, 0, 1, 524291, 0, 1, 524292, 0, 1, 524293, 0, 1, 524294, 0, 1, 524295, 0, 1, 524296, 0, 1, 524297, 0, 1, 524298, 0, 1, 524299, 0, 1, 524300, 0, 131077, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 0, 0, 655352, 0, 0, 655353, 0, 0, 655354, 0, 0, 655355, 0, 0, 655356, 0, 0, 655357, 0, 0, 655358, 0, 0, 655359, 0, 0, 589824, 0, 0, 589825, 0, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 0, 0, 720888, 0, 0, 720889, 0, 0, 720890, 0, 0, 720891, 0, 0, 720892, 0, 0, 720893, 0, 0, 720894, 0, 0, 720895, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 0, 0, 655363, 0, 0, 655364, 0, 0, 655365, 0, 0, 655366, 0, 0, 655367, 0, 0, 655368, 0, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 0, 0, 786424, 0, 0, 786425, 0, 0, 786426, 0, 0, 786427, 0, 0, 786428, 0, 0, 786429, 0, 0, 786430, 0, 0, 786431, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 0, 0, 720916, 0, 0, 851960, 0, 0, 851961, 0, 0, 851962, 0, 0, 851963, 0, 0, 851964, 0, 0, 851965, 0, 0, 851966, 0, 0, 851967, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 0, 0, 786447, 0, 0, 786448, 0, 0, 786449, 0, 0, 786450, 0, 0, 786451, 0, 0, 786452, 0, 0 ) - -[node name="PlayerCharacter" parent="YSort" instance=ExtResource( 1 )] -position = Vector2( 90.8539, 19.871 ) -speed = 32 - -[node name="Camera2D" type="Camera2D" parent="YSort/PlayerCharacter"] -current = true -zoom = Vector2( 0.2, 0.2 ) -process_mode = 0 -smoothing_enabled = true -smoothing_speed = 2.0 - -[node name="Light2D" type="Light2D" parent="YSort/PlayerCharacter"] -position = Vector2( 0.257721, 0.17543 ) -rotation = 3.14159 -texture = ExtResource( 5 ) -texture_scale = 2.54 -color = Color( 0.827451, 0.886275, 0.705882, 1 ) -energy = 1.2 -mode = 2 -shadow_color = Color( 0.184314, 0.215686, 0.176471, 0 ) -shadow_filter = 1 - -[node name="DwarfNPC" parent="YSort" groups=[ -"Dialogue", -] instance=ExtResource( 3 )] -position = Vector2( 17.3501, 55.8153 ) -target = NodePath("../../../Scene2/YSort/PlayerCharacter") - -[node name="Ladder" parent="YSort" instance=ExtResource( 6 )] -position = Vector2( 88, 48 ) -target_scene_num = 1 - -[node name="CanvasLayer" type="CanvasLayer" parent="."] - -[node name="GUI" type="MarginContainer" parent="CanvasLayer"] -margin_right = 40.0 -margin_bottom = 40.0 -script = ExtResource( 7 ) -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/scripts/Game.gd b/scripts/Game.gd new file mode 100644 index 0000000..e36fdfe --- /dev/null +++ b/scripts/Game.gd @@ -0,0 +1,42 @@ +extends Node +class_name Game +onready var gui: GUI = $CanvasLayer/GUI + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" + + +# Called when the node enters the scene tree for the first time. +func _ready(): + update_debug_gui() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass + +func update_debug_gui(): + var current_level = $Level.get_filename() + gui.set_debug_text("Level: %s" % current_level) + +func _on_Level_ready(): + yield(get_tree(), "idle_frame") + update_debug_gui() + +func change_level(num: int): + var new_scene = "res://scenes/Level" + String(num) + ".tscn" + + var cur_level = $Level + self.remove_child(cur_level) + cur_level.call_deferred("free") + + var new_level_res = load(new_scene) + var new_level: Node = new_level_res.instance() + + print("Changed level to " + new_scene) + var err = new_level.connect("ready", self, "_on_Level_ready") + if err: + push_error(err) + + self.add_child(new_level) + new_level.set_name("Level") diff --git a/scripts/Ladder.gd b/scripts/Ladder.gd index c21752b..9c566da 100644 --- a/scripts/Ladder.gd +++ b/scripts/Ladder.gd @@ -18,5 +18,5 @@ func _ready(): func _on_Ladder_body_entered(body): if body is PlayerCharacter: - var player: PlayerCharacter = body - player.change_level(target_scene_num) + var game: Game = get_tree().get_root().get_node("Game") + game.call_deferred("change_level", target_scene_num) diff --git a/scripts/PlayerCharacter.gd b/scripts/PlayerCharacter.gd index 1df100c..3cf4518 100644 --- a/scripts/PlayerCharacter.gd +++ b/scripts/PlayerCharacter.gd @@ -65,13 +65,3 @@ func _physics_process(_delta): dialogue_active_with = coll.collider run_dialogue(coll.collider) break - -func change_level(num: int): - var new_scene = "res://scenes/Scene" + String(num) + ".tscn" - var gui: GUI = get_node(gui_node) - var success = get_tree().change_scene(new_scene) - if success == OK: - gui.set_debug_text("Level: %s" % num) - print("Changed level to " + new_scene) - else: - push_error("Failed to change level to " + new_scene) -- cgit v1.3