From d2902ac4aa9da6f43056e3a771eb9efc1fe7e5db Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Mon, 26 Oct 2020 08:21:11 -0400 Subject: [PATCH] [WIP] new way wo warp between levels. Need some work still to get back from warp to hub (mutiple exits/enterences in a level). Currently it is supporting 1 entrence and one exit from each level... --- .vscode/launch.json | 18 +++ assets/Tiles/TrapTiles.gd | 7 ++ assets/Tiles/TrapTiles.tscn | 40 +++++++ assets/Tiles/spikes.png | Bin 0 -> 644 bytes assets/Tiles/spikes.png.import | 34 ++++++ project.godot | 20 +++- src/Actors/Camera.gd | 2 + src/Actors/Player.gd | 30 +++-- src/Actors/WiseOldDude/WiseOldDude.tscn | 58 ++++++++-- src/CutScenes/ChallengeCutscene.gd | 8 +- src/CutScenes/DialogBubble/DialogBubble.gd | 11 +- src/CutScenes/IntroCutscene.gd | 3 +- src/GameWorld/GameWorld.gd | 96 ++++++++++++++-- src/GameWorld/GameWorld.tscn | 20 +--- src/GameWorld/Levels/FirstLevels/TMP.gd | 8 ++ src/GameWorld/Levels/FirstLevels/TMP.tscn | 39 +++++++ src/GameWorld/Levels/FirstLevels/TMP2.gd | 21 ++++ src/GameWorld/Levels/FirstLevels/TMP2.tscn | 45 ++++++++ src/GameWorld/Levels/Level.gd | 84 ++++++++++++++ src/GameWorld/{ => Levels}/PreGame.gd | 29 ++++- src/GameWorld/{ => Levels}/PreGame.tscn | 121 ++++++++++++--------- src/GameWorld/Levels/WorldHub.gd | 12 ++ src/GameWorld/Levels/WorldHub.tscn | 78 +++++++++++++ src/Intro/Intro.tscn | 23 ++-- src/Scripts/CutScene.gd | 11 +- src/Scripts/SpawnPoint.gd | 30 ++++- src/Scripts/WarpZone.gd | 12 ++ src/Scripts/WarpZone.tscn | 15 +++ src/Singletons/GameState.gd | 26 ++--- src/Singletons/Stage.tscn | 1 - 30 files changed, 755 insertions(+), 147 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 assets/Tiles/TrapTiles.gd create mode 100644 assets/Tiles/TrapTiles.tscn create mode 100644 assets/Tiles/spikes.png create mode 100644 assets/Tiles/spikes.png.import create mode 100644 src/GameWorld/Levels/FirstLevels/TMP.gd create mode 100644 src/GameWorld/Levels/FirstLevels/TMP.tscn create mode 100644 src/GameWorld/Levels/FirstLevels/TMP2.gd create mode 100644 src/GameWorld/Levels/FirstLevels/TMP2.tscn create mode 100644 src/GameWorld/Levels/Level.gd rename src/GameWorld/{ => Levels}/PreGame.gd (53%) rename src/GameWorld/{ => Levels}/PreGame.tscn (62%) create mode 100644 src/GameWorld/Levels/WorldHub.gd create mode 100644 src/GameWorld/Levels/WorldHub.tscn create mode 100644 src/Scripts/WarpZone.gd create mode 100644 src/Scripts/WarpZone.tscn diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..70bbfed --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,18 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "GDScript Godot", + "type": "godot", + "request": "launch", + "project": "${workspaceFolder}", + "port": 6007, + "address": "127.0.0.1", + "launch_game_instance": true, + "launch_scene": false + } + ] +} \ No newline at end of file diff --git a/assets/Tiles/TrapTiles.gd b/assets/Tiles/TrapTiles.gd new file mode 100644 index 0000000..098052b --- /dev/null +++ b/assets/Tiles/TrapTiles.gd @@ -0,0 +1,7 @@ +extends TileMap +class_name TrapTiles + +func _ready() -> void: + var cells = get_used_cells() + pass + diff --git a/assets/Tiles/TrapTiles.tscn b/assets/Tiles/TrapTiles.tscn new file mode 100644 index 0000000..1dbb732 --- /dev/null +++ b/assets/Tiles/TrapTiles.tscn @@ -0,0 +1,40 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://assets/Tiles/spikes.png" type="Texture" id=1] + +[sub_resource type="OccluderPolygon2D" id=1] +polygon = PoolVector2Array( 0, 13.9545, 0, 13.7219, 3.48895, 8.37286, 6.97746, 14.1871, 11.6288, 8.1403, 15.3499, 13.7219, 16, 14.1871, 16, 16, 0, 16 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 16, 16, 0, 16, 0, 7.90773, 16, 7.90773 ) + +[sub_resource type="TileSet" id=3] +0/name = "spikes.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 16, 16 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 0, 0 ) +0/occluder = SubResource( 1 ) +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( 2 ) +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( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] +0/z_index = 0 + +[node name="TrapTiles" type="TileMap"] +tile_set = SubResource( 3 ) +cell_size = Vector2( 16, 16 ) +collision_layer = 4 +occluder_light_mask = 0 +format = 1 diff --git a/assets/Tiles/spikes.png b/assets/Tiles/spikes.png new file mode 100644 index 0000000000000000000000000000000000000000..5c95760720f6e0ccd7f6072dce0a56964fa26181 GIT binary patch literal 644 zcmV-~0(EX>4Tx04R}tkv&MmKpe$iQ$;D24pxxjkfAz=1yK=4twIqhlv<%x2a`*`ph-iL z;^HW{799LotU9+0Yt2!bCVPL58BE>hzEl0u6Z503ls?%w0>9UwF+Of|d40ade% zbRsThbE{&{D*_lm2oa1*%+%*nsU$qd*FAiEy^HZI?{j~SJ|%B5z$X&VGTpFgN$qlPjnun?nFBgI6T_TwJ@h~rO@OD0zt zj2sK7LWSh`!T;cQw`O5-!c7Xsf$kUE{ul;&c7bNyw!e>UyLkfmpMfi_?XNa~nNQN| zZ7q5Pgtmc;>$WEE0hc?#;FB&Hk|X(P3WWmjen#Jv1Nv`)z?$1zYagc%K!&y{D4^000SaNLh0L z04^f{04^f|c%?sf00007bV*G`2jmJB4<#=o2_CX>@2HM@dakSAh-}00016Nkl void: _input_check() _velocity = calculate_move_velocity(_direction,_is_jump_canceled, delta) _velocity = move_and_slide(_velocity, Vector2.UP) + _check_collisions() update_sprite(_direction) @@ -78,7 +79,12 @@ func _input_check() -> void: _direction = Vector2.ZERO - +func _check_collisions(): + for i in get_slide_count(): + var collision = get_slide_collision(i) + if collision.collider.name == 'TrapTiles': + die() + return func _update_state(new_state:int = -1): @@ -98,6 +104,7 @@ func _update_state(new_state:int = -1): elif _velocity.y >=0 and is_on_wall(): if _state != States.WALL_SLIDING: _velocity.y=0 + _falling_start_position = position.y new_state = States.WALL_SLIDING elif _state == States.WALL_SLIDING: if is_on_floor() or not is_on_wall(): @@ -107,7 +114,7 @@ func _update_state(new_state:int = -1): func _transition_state(old_state, new_state, auto_update): if new_state != old_state: - print("[Player]: State Update: [%s] -> [%s] | Automatic: %s" % [old_state, new_state, auto_update]) + # print("[Player]: State Update: [%s] -> [%s] | Automatic: %s" % [old_state, new_state, auto_update]) _state = new_state if old_state == States.IDLE: # idle -> attak = ground attack - stop _velocity.x @@ -213,14 +220,15 @@ func _revive(): func update_sprite(_direction:Vector2) -> void: + if not _alive: return; var air_animation = "jump" if _velocity.y <= 0 else "fall" if _state == States.ATTACKING: return var attack = Input.is_action_just_pressed("attack") and abilities.attack if _velocity.x > .5 and not _state == States.WALL_SLIDING: - $Sprite.scale = Vector2(1,1) + face_player(true) $AnimationPlayer.play("run" if is_on_floor() else air_animation) elif _velocity.x < -.5 and not _state == States.WALL_SLIDING: - $Sprite.scale = Vector2(-1,1) + face_player(false) $AnimationPlayer.play("run" if is_on_floor() else air_animation) else: if not _state == States.IN_AIR: $AnimationPlayer.play("idle") @@ -257,17 +265,17 @@ func _attack(): _update_state(States.IDLE) func _on_die_animation_done(): - emit_signal("died") _respawn() _revive() func die(): + emit_signal("died") _alive = false $AnimationPlayer.play("die") $Camera.start_shake() - GameState.player_died(self) + GameState.player_died() -func setAbility(ability:String, enabled:bool=false): +func set_ability(ability:String, enabled:bool=false): if ability == 'dash': abilities.dash = enabled elif ability == 'wall_jump': @@ -290,3 +298,11 @@ func _on_SordRange_body_entered(body: Node) -> void: if body.is_in_group("Enemies"): body.take_damage($Sprite.scale.x) pass # Replace with function body. + +func get_camera(): + return $Camera +func face_player(right:bool = true): + $Sprite.scale = Vector2( + 1 if right else -1, + 1 + ) diff --git a/src/Actors/WiseOldDude/WiseOldDude.tscn b/src/Actors/WiseOldDude/WiseOldDude.tscn index 91d5bf5..297d1db 100644 --- a/src/Actors/WiseOldDude/WiseOldDude.tscn +++ b/src/Actors/WiseOldDude/WiseOldDude.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://src/Actors/WiseOldDude/wize_old_dude.png" type="Texture" id=1] +[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=2] -[sub_resource type="Animation" id=2] +[sub_resource type="Animation" id=1] resource_name = "fade" length = 0.5 tracks/0/type = "value" @@ -29,9 +30,20 @@ tracks/1/keys = { "update": 0, "values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ) ] } +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite/Light2D:energy") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.3 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ 0.0, 1.0 ] +} -[sub_resource type="Animation" id=1] -resource_name = "idle" +[sub_resource type="Animation" id=2] length = 0.8 loop = true tracks/0/type = "value" @@ -46,6 +58,30 @@ tracks/0/keys = { "update": 1, "values": [ 17, 18, 19, 20, 21 ] } +tracks/1/type = "value" +tracks/1/path = NodePath("Sprite/Light2D:energy") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.4, 0.8 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ 1.0, 0.9, 1.0 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Sprite/Light2D:texture_scale") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.4, 0.8 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ 15.0, 10.0, 15.0 ] +} [node name="WiseOldDude" type="Node2D"] @@ -56,8 +92,16 @@ scale = Vector2( 0.6875, 0.6875 ) texture = ExtResource( 1 ) vframes = 6 hframes = 9 -frame = 17 +frame = 21 + +[node name="Light2D" type="Light2D" parent="Sprite"] +texture = ExtResource( 2 ) +texture_scale = 15.0 +color = Color( 0.768627, 0.913725, 0.992157, 1 ) +energy = 0.0 +shadow_enabled = true +shadow_item_cull_mask = 9 [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -anims/fade = SubResource( 2 ) -anims/idle = SubResource( 1 ) +anims/fade = SubResource( 1 ) +anims/idle = SubResource( 2 ) diff --git a/src/CutScenes/ChallengeCutscene.gd b/src/CutScenes/ChallengeCutscene.gd index 0b2cbeb..44fc1d7 100644 --- a/src/CutScenes/ChallengeCutscene.gd +++ b/src/CutScenes/ChallengeCutscene.gd @@ -29,7 +29,8 @@ var _old_man_dialog2 = [ }, ] -func start_scene(camera:Camera2D): +func start_scene(camera:CameraGame = null): + _started = true; _main_camera_ref = camera position = camera.get_global_transform().get_origin() _camera = camera.duplicate() @@ -48,7 +49,6 @@ func start_scene(camera:Camera2D): yield($AnimationPlayer, "animation_finished") var dialog_bubble:DialogBubble = _dialog_bubble.instance() - dialog_bubble.allow_fast_skip = bool(GameState.get_statistics().total_time_played) dialog_bubble.dialog = _old_man_dialog $Overlay.add_child(dialog_bubble) dialog_bubble.start_dialog() @@ -89,6 +89,10 @@ func start_scene(camera:Camera2D): _on_scene_exited() pass +func _input(event: InputEvent) -> void: + if not _started: return + if Input.is_action_just_pressed("jump"): + if allow_skip: _on_scene_exited() func _on_scene_exited(): diff --git a/src/CutScenes/DialogBubble/DialogBubble.gd b/src/CutScenes/DialogBubble/DialogBubble.gd index 431507e..875beac 100644 --- a/src/CutScenes/DialogBubble/DialogBubble.gd +++ b/src/CutScenes/DialogBubble/DialogBubble.gd @@ -2,7 +2,6 @@ extends Control class_name DialogBubble signal dialog_finished -var allow_fast_skip := false var dialog = [] # Dictionary[] {text:string, callback:function}[] var _position := 0 @@ -33,12 +32,10 @@ func _show_text(): func _input(event: InputEvent) -> void: if not _started: return if Input.is_action_just_pressed("jump"): - if allow_fast_skip: dismiss() - else: - _position += 1 - $AnimationPlayer.play_backwards("show_text") - yield($AnimationPlayer, "animation_finished") - _show_text() + _position += 1 + $AnimationPlayer.play_backwards("show_text") + yield($AnimationPlayer, "animation_finished") + _show_text() diff --git a/src/CutScenes/IntroCutscene.gd b/src/CutScenes/IntroCutscene.gd index 5259f3b..6ceac37 100644 --- a/src/CutScenes/IntroCutscene.gd +++ b/src/CutScenes/IntroCutscene.gd @@ -3,8 +3,7 @@ extends CutScene func _ready() -> void: start_scene() -func start_scene(camera:Camera2D = null): - +func start_scene(camera:CameraGame = null): var text_show_delay = 2 var no_text_delay = 1 diff --git a/src/GameWorld/GameWorld.gd b/src/GameWorld/GameWorld.gd index f81a66c..1d04c5a 100644 --- a/src/GameWorld/GameWorld.gd +++ b/src/GameWorld/GameWorld.gd @@ -1,17 +1,99 @@ extends Node2D +signal level_ready +var _level_resources := { + + "pre_game": load("res://src/GameWorld/Levels/PreGame.tscn"), + "hub" : load("res://src/GameWorld/Levels/WorldHub.tscn"), + "zones": { + 1: [ + + ], + 2: [ + + ], + 3: [ + + ] + } +} + +var _levels = [ + [_level_resources.pre_game, _level_resources.hub], + [load("res://src/GameWorld/Levels/FirstLevels/TMP.tscn")], + [load("res://src/GameWorld/Levels/FirstLevels/TMP2.tscn")] +] + + +export var _current_zone_level: = Vector2(0,1) + +onready var _player:Player = (load("res://src/Actors/Player.tscn")).instance() func _ready() -> void: - $Player/Camera.limit_bottom = 250 - $Player/Camera.limit_left = -45 - $Player/Camera.limit_right = 700 + _player.connect("died", self, "_on_player_died") + _change_level(_current_zone_level) + yield(self, "level_ready") + -func _process(delta: float) -> void: - if $Player.global_position.x > 330: - $AmbiantLighting.change_light("NIGHT") +func _change_level( newLevel:Vector2 = Vector2.ZERO, oldLevel:Vector2 = Vector2(0,-1)): + if oldLevel.y != -1: + GameState.set_state(GameState.States.TRANSITIONING) + Stage.fade_out(.5) + yield(Stage, "fade_finished") + _levels[oldLevel.x][oldLevel.y].remove_player() + _levels[oldLevel.x][oldLevel.y].disconnect("level_exited", self, "_on_level_exited") + $Level.remove_child(_levels[oldLevel.x][oldLevel.y]) + if !_levels[newLevel.x][newLevel.y].is_class("Node2D"): + _levels[newLevel.x][newLevel.y] = _levels[newLevel.x][newLevel.y].instance() + + _levels[newLevel.x][newLevel.y].set_player(_player, _get_player_entering(oldLevel, newLevel)) + _levels[newLevel.x][newLevel.y].connect("level_exited", self, "_on_level_exited") + $Level.add_child(_levels[newLevel.x][newLevel.y]) + _levels[newLevel.x][newLevel.y]._set_active(true) + Stage.fade_in() + yield(Stage, "fade_finished") + GameState.set_state(_levels[newLevel.x][newLevel.y].game_state) + _current_zone_level = newLevel + emit_signal("level_ready") + +func _get_player_entering(oldLevel:Vector2, newLevel:Vector2) -> bool: + if oldLevel.y == -1: return true; + return oldLevel.x < newLevel.x || (oldLevel.x == newLevel.x && oldLevel.y < newLevel.y) + +func _on_player_died(): + var prev_state = _levels[_current_zone_level.x][_current_zone_level.y].game_state + GameState.set_state(GameState.States.TRANSITIONING) + Stage.fade_out(.8) + yield(Stage, "fade_finished") + Stage.fade_in(.8) + yield(Stage, "fade_finished") + GameState.set_state(prev_state) + +func _on_level_exited(next_level:bool = true, zone:int = -1): + print("current level: %s, next_level: %s zone: %s" % [_current_zone_level, next_level, zone]) + var next = Vector2.ZERO + if zone != -1: + next = Vector2( + zone, + 0 if next_level else len(_levels[zone]) -1 + ) else: - $AmbiantLighting.change_light("DAY") + next = Vector2( + _current_zone_level.x, + _current_zone_level.y + 1 if next_level else _current_zone_level.y - 1 + ) + if next.y < 0: + next.x -= 1 + next.y = len(_levels[next.x]) - 1 + if next.y > len(_levels[next.x]) - 1: + next.x += 1 + next.y = 0 + + + _change_level(next, _current_zone_level) + yield(self, "level_ready") + diff --git a/src/GameWorld/GameWorld.tscn b/src/GameWorld/GameWorld.tscn index dcbdce0..6580d60 100644 --- a/src/GameWorld/GameWorld.tscn +++ b/src/GameWorld/GameWorld.tscn @@ -1,10 +1,7 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://src/HUD/HUD.tscn" type="PackedScene" id=1] -[ext_resource path="res://src/GameWorld/PreGame.tscn" type="PackedScene" id=2] -[ext_resource path="res://src/Actors/Player.tscn" type="PackedScene" id=3] [ext_resource path="res://src/GameWorld/GameWorld.gd" type="Script" id=5] -[ext_resource path="res://src/GameWorld/AmbiantLighting.tscn" type="PackedScene" id=10] [node name="GameWorld" type="Node2D"] script = ExtResource( 5 ) @@ -12,17 +9,4 @@ script = ExtResource( 5 ) [node name="HUD" parent="." instance=ExtResource( 1 )] layer = 2 -[node name="PreGame" parent="." instance=ExtResource( 2 )] - -[node name="Player" parent="." instance=ExtResource( 3 )] -position = Vector2( 73, 222 ) -abilities = { -"attack": true, -"dash": true, -"light_beam": true, -"wall_jump": true -} - -[node name="AmbiantLighting" parent="." instance=ExtResource( 10 )] - -[editable path="AmbiantLighting"] +[node name="Level" type="Node2D" parent="."] diff --git a/src/GameWorld/Levels/FirstLevels/TMP.gd b/src/GameWorld/Levels/FirstLevels/TMP.gd new file mode 100644 index 0000000..3156b93 --- /dev/null +++ b/src/GameWorld/Levels/FirstLevels/TMP.gd @@ -0,0 +1,8 @@ +extends Level + + +func _ready() -> void: + print("TMP ready") + + + diff --git a/src/GameWorld/Levels/FirstLevels/TMP.tscn b/src/GameWorld/Levels/FirstLevels/TMP.tscn new file mode 100644 index 0000000..46f82a7 --- /dev/null +++ b/src/GameWorld/Levels/FirstLevels/TMP.tscn @@ -0,0 +1,39 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://src/GameWorld/Levels/FirstLevels/TMP.gd" type="Script" id=1] +[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/Actors/Goblin.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Scripts/SpawnPoint.tscn" type="PackedScene" id=4] +[ext_resource path="res://src/Scripts/WarpZone.tscn" type="PackedScene" id=5] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 10, 18 ) + +[node name="TMP" type="Node2D"] +script = ExtResource( 1 ) +level_entry_point = Vector2( 16, 240 ) +level_exit_point = Vector2( 675, 240 ) +camer_limits = { +"bottom": 240, +"left": 0, +"right": 700, +"top": 0 +} + +[node name="SolidsTileMap" parent="." instance=ExtResource( 2 )] +tile_data = PoolIntArray( -131072, 0, 0, -131071, 0, 131076, -131070, 0, 131076, -131069, 0, 131076, -131068, 0, 131076, -131067, 0, 1, -131066, 0, 1, -131065, 0, 1, -131064, 0, 1, -131063, 0, 1, -131062, 0, 1, -131061, 0, 131076, -131060, 0, 1, -131059, 0, 131076, -131058, 0, 1, -131057, 0, 131076, -131056, 0, 131076, -131055, 0, 1, -131054, 0, 1, -131053, 0, 131076, -131052, 0, 1, -131051, 0, 1, -131050, 0, 1, -131049, 0, 131076, -131048, 0, 131076, -131047, 0, 1, -131046, 0, 131076, -131045, 0, 1, -131044, 0, 131076, -131043, 0, 1, -131042, 0, 2, -65536, 0, 65536, -65535, 0, 3, -65534, 0, 131073, -65533, 0, 4, -65532, 0, 4, -65531, 0, 131073, -65530, 0, 131073, -65529, 0, 4, -65528, 0, 4, -65527, 0, 131073, -65526, 0, 4, -65525, 0, 4, -65524, 0, 4, -65523, 0, 131073, -65522, 0, 4, -65521, 0, 131073, -65520, 0, 4, -65519, 0, 4, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131073, -65515, 0, 4, -65514, 0, 4, -65513, 0, 131073, -65512, 0, 4, -65511, 0, 4, -65510, 0, 131073, -65509, 0, 131073, -65508, 0, 131073, -65507, 0, 5, -65506, 0, 65539, 65535, 0, 0, 0, 0, 131077, 1, 0, 65538, 29, 0, 65536, 30, 0, 65539, 131071, 0, 65536, 65536, 0, 65537, 65537, 0, 65539, 65565, 0, 65541, 65566, 0, 65538, 196607, 0, 65536, 131072, 0, 65537, 131073, 0, 65538, 131087, 0, 1, 131101, 0, 65541, 131102, 0, 65539, 262143, 0, 65536, 196608, 0, 65537, 196609, 0, 65538, 196622, 0, 1, 196623, 0, 1, 196637, 0, 65536, 196638, 0, 131075, 196639, 0, 1, 196640, 0, 131076, 196641, 0, 1, 196642, 0, 1, 196643, 0, 1, 196644, 0, 1, 196645, 0, 1, 196646, 0, 131076, 196647, 0, 1, 196648, 0, 131076, 196649, 0, 1, 196650, 0, 2, 327679, 0, 65541, 262144, 0, 65537, 262145, 0, 65538, 262157, 0, 1, 262159, 0, 1, 262173, 0, 65536, 262174, 0, 3, 262175, 0, 4, 262176, 0, 131073, 262177, 0, 4, 262178, 0, 131073, 262179, 0, 5, 262180, 0, 65537, 262181, 0, 65537, 262182, 0, 65537, 262183, 0, 65537, 262184, 0, 65537, 262185, 0, 65537, 262186, 0, 65538, 393215, 0, 65541, 327680, 0, 65537, 327681, 0, 65539, 327692, 0, 1, 327695, 0, 1, 327709, 0, 65536, 327710, 0, 65538, 327715, 0, 65541, 327716, 0, 65537, 327717, 0, 65537, 327718, 0, 65537, 327719, 0, 65537, 327720, 0, 65537, 327721, 0, 65537, 327722, 0, 65539, 458751, 0, 65541, 393216, 0, 65537, 393217, 0, 65538, 393228, 0, 1, 393230, 0, 1, 393245, 0, 65536, 393246, 0, 65538, 393251, 0, 65541, 393252, 0, 65537, 393253, 0, 65537, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 65537, 393257, 0, 65537, 393258, 0, 65538, 524287, 0, 65541, 458752, 0, 65537, 458753, 0, 65538, 458766, 0, 1, 458781, 0, 65541, 458782, 0, 65538, 458787, 0, 65541, 458788, 0, 65537, 458789, 0, 65537, 458790, 0, 65537, 458791, 0, 65537, 458792, 0, 65537, 458793, 0, 65537, 458794, 0, 65539, 589823, 0, 65536, 524288, 0, 65537, 524289, 0, 65538, 524302, 0, 1, 524317, 0, 65536, 524318, 0, 65538, 524323, 0, 65541, 524324, 0, 65537, 524325, 0, 65537, 524326, 0, 65537, 524327, 0, 65537, 524328, 0, 65537, 524329, 0, 65537, 524330, 0, 65538, 655359, 0, 65541, 589824, 0, 65537, 589825, 0, 65539, 589838, 0, 1, 589853, 0, 65541, 589854, 0, 65539, 589859, 0, 65541, 589860, 0, 65537, 589861, 0, 65537, 589862, 0, 65537, 589863, 0, 65537, 589864, 0, 65537, 589865, 0, 65537, 589866, 0, 65538, 720895, 0, 65541, 655360, 0, 65537, 655361, 0, 65539, 655372, 0, 1, 655373, 0, 1, 655374, 0, 1, 655375, 0, 1, 655376, 0, 1, 655389, 0, 65541, 655390, 0, 65538, 655395, 0, 131072, 655396, 0, 131073, 655397, 0, 131073, 655398, 0, 131073, 655399, 0, 131073, 655400, 0, 131073, 655401, 0, 5, 655402, 0, 65538, 786431, 0, 65541, 720896, 0, 65537, 720897, 0, 65539, 720925, 0, 65536, 720926, 0, 65538, 720937, 0, 65541, 720938, 0, 65539, 851967, 0, 131072, 786432, 0, 131073, 786433, 0, 131074, 786461, 0, 131072, 786462, 0, 131074, 786473, 0, 131072, 786474, 0, 131074, 852004, 0, 0, 852005, 0, 2, 917540, 0, 65541, 917541, 0, 65538, 1048573, 0, 0, 1048574, 0, 1, 1048575, 0, 131076, 983040, 0, 131076, 983041, 0, 1, 983042, 0, 131076, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 1, 983048, 0, 131076, 983049, 0, 1, 983050, 0, 131076, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 131076, 983057, 0, 1, 983058, 0, 1, 983059, 0, 131076, 983060, 0, 131076, 983061, 0, 131076, 983062, 0, 1, 983063, 0, 1, 983064, 0, 1, 983065, 0, 131076, 983066, 0, 1, 983067, 0, 131076, 983068, 0, 131076, 983069, 0, 131076, 983070, 0, 131076, 983071, 0, 1, 983072, 0, 1, 983073, 0, 131076, 983074, 0, 131076, 983075, 0, 131076, 983076, 0, 131077, 983077, 0, 131075, 983078, 0, 131076, 983079, 0, 1, 983080, 0, 131076, 983081, 0, 1, 983082, 0, 2, 1114109, 0, 131072, 1114110, 0, 4, 1114111, 0, 131073, 1048576, 0, 4, 1048577, 0, 4, 1048578, 0, 4, 1048579, 0, 4, 1048580, 0, 131073, 1048581, 0, 131073, 1048582, 0, 131073, 1048583, 0, 131073, 1048584, 0, 131073, 1048585, 0, 131073, 1048586, 0, 131073, 1048587, 0, 131073, 1048588, 0, 4, 1048589, 0, 131073, 1048590, 0, 131073, 1048591, 0, 131073, 1048592, 0, 4, 1048593, 0, 131073, 1048594, 0, 131073, 1048595, 0, 131073, 1048596, 0, 131073, 1048597, 0, 4, 1048598, 0, 131073, 1048599, 0, 4, 1048600, 0, 4, 1048601, 0, 4, 1048602, 0, 131073, 1048603, 0, 4, 1048604, 0, 4, 1048605, 0, 4, 1048606, 0, 4, 1048607, 0, 131073, 1048608, 0, 4, 1048609, 0, 4, 1048610, 0, 131073, 1048611, 0, 4, 1048612, 0, 131073, 1048613, 0, 131073, 1048614, 0, 131073, 1048615, 0, 131073, 1048616, 0, 131073, 1048617, 0, 4, 1048618, 0, 131074 ) + +[node name="ExitLevelArea" parent="." instance=ExtResource( 5 )] + +[node name="ExitLevelAreaNext" type="Area2D" parent="."] +position = Vector2( 694, 218 ) +collision_layer = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ExitLevelAreaNext"] +position = Vector2( 0, 6 ) +shape = SubResource( 1 ) + +[node name="SpawnPoint" parent="." instance=ExtResource( 4 )] +position = Vector2( 239, 240 ) +node = ExtResource( 3 ) +[connection signal="body_entered" from="ExitLevelAreaNext" to="." method="_on_ExitLevelAreaNext_body_entered"] diff --git a/src/GameWorld/Levels/FirstLevels/TMP2.gd b/src/GameWorld/Levels/FirstLevels/TMP2.gd new file mode 100644 index 0000000..9796b06 --- /dev/null +++ b/src/GameWorld/Levels/FirstLevels/TMP2.gd @@ -0,0 +1,21 @@ +extends Level + + +func _ready() -> void: + print("TMP ready") + + +func _on_ExitLevelArea_body_entered(body: Node) -> void: + if body == _player and is_active_level: + print("_on_ExitLevelArea_body_entered") + self.is_active_level = false; + emit_signal("level_exited", false) + pass # Replace with function body. + + +func _on_ExitLevelAreaNext_body_entered(body: Node) -> void: + if body == _player and is_active_level: + print("_on_ExitLevelAreaNext_body_entered") + self.is_active_level = false; + emit_signal("level_exited", true) + pass # Replace with function body. diff --git a/src/GameWorld/Levels/FirstLevels/TMP2.tscn b/src/GameWorld/Levels/FirstLevels/TMP2.tscn new file mode 100644 index 0000000..574ef58 --- /dev/null +++ b/src/GameWorld/Levels/FirstLevels/TMP2.tscn @@ -0,0 +1,45 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://src/GameWorld/Levels/FirstLevels/TMP2.gd" type="Script" id=1] +[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/Actors/Goblin.tscn" type="PackedScene" id=3] +[ext_resource path="res://src/Scripts/SpawnPoint.tscn" type="PackedScene" id=4] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 10, 18 ) + +[node name="TMP2" type="Node2D"] +script = ExtResource( 1 ) +level_entry_point = Vector2( 16, 240 ) +level_exit_point = Vector2( 675, 240 ) +camer_limits = { +"bottom": 240, +"left": 0, +"right": 700, +"top": 0 +} + +[node name="SolidsTileMap" parent="." instance=ExtResource( 2 )] +tile_data = PoolIntArray( -131072, 0, 0, -131071, 0, 131076, -131070, 0, 131076, -131069, 0, 131076, -131068, 0, 131076, -131067, 0, 1, -131066, 0, 1, -131065, 0, 1, -131064, 0, 1, -131063, 0, 1, -131062, 0, 1, -131061, 0, 131076, -131060, 0, 1, -131059, 0, 131076, -131058, 0, 1, -131057, 0, 131076, -131056, 0, 131076, -131055, 0, 1, -131054, 0, 1, -131053, 0, 131076, -131052, 0, 1, -131051, 0, 1, -131050, 0, 1, -131049, 0, 131076, -131048, 0, 131076, -131047, 0, 1, -131046, 0, 131076, -131045, 0, 1, -131044, 0, 131076, -131043, 0, 1, -131042, 0, 2, -65536, 0, 65536, -65535, 0, 3, -65534, 0, 131073, -65533, 0, 4, -65532, 0, 4, -65531, 0, 131073, -65530, 0, 131073, -65529, 0, 4, -65528, 0, 4, -65527, 0, 131073, -65526, 0, 4, -65525, 0, 4, -65524, 0, 4, -65523, 0, 131073, -65522, 0, 4, -65521, 0, 131073, -65520, 0, 4, -65519, 0, 4, -65518, 0, 131073, -65517, 0, 131073, -65516, 0, 131073, -65515, 0, 4, -65514, 0, 4, -65513, 0, 131073, -65512, 0, 4, -65511, 0, 4, -65510, 0, 131073, -65509, 0, 131073, -65508, 0, 131073, -65507, 0, 5, -65506, 0, 65539, 65535, 0, 0, 0, 0, 131077, 1, 0, 65538, 29, 0, 65536, 30, 0, 65539, 131071, 0, 65536, 65536, 0, 65537, 65537, 0, 65539, 65550, 0, 1, 65551, 0, 1, 65552, 0, 1, 65565, 0, 65541, 65566, 0, 65538, 196607, 0, 65536, 131072, 0, 65537, 131073, 0, 65538, 131084, 0, 1, 131085, 0, 1, 131088, 0, 1, 131089, 0, 1, 131101, 0, 65541, 131102, 0, 65539, 262143, 0, 65536, 196608, 0, 65537, 196609, 0, 65538, 196619, 0, 1, 196620, 0, 1, 196625, 0, 1, 196637, 0, 65536, 196638, 0, 131075, 196639, 0, 1, 196640, 0, 131076, 196641, 0, 1, 196642, 0, 1, 196643, 0, 1, 196644, 0, 1, 196645, 0, 1, 196646, 0, 131076, 196647, 0, 1, 196648, 0, 131076, 196649, 0, 1, 196650, 0, 2, 327679, 0, 65541, 262144, 0, 65537, 262145, 0, 65538, 262154, 0, 1, 262155, 0, 1, 262161, 0, 1, 262173, 0, 65536, 262174, 0, 3, 262175, 0, 4, 262176, 0, 131073, 262177, 0, 4, 262178, 0, 131073, 262179, 0, 5, 262180, 0, 65537, 262181, 0, 65537, 262182, 0, 65537, 262183, 0, 65537, 262184, 0, 65537, 262185, 0, 65537, 262186, 0, 65538, 393215, 0, 65541, 327680, 0, 65537, 327681, 0, 65539, 327696, 0, 1, 327697, 0, 1, 327709, 0, 65536, 327710, 0, 65538, 327715, 0, 65541, 327716, 0, 65537, 327717, 0, 65537, 327718, 0, 65537, 327719, 0, 65537, 327720, 0, 65537, 327721, 0, 65537, 327722, 0, 65539, 458751, 0, 65541, 393216, 0, 65537, 393217, 0, 65538, 393232, 0, 1, 393245, 0, 65536, 393246, 0, 65538, 393251, 0, 65541, 393252, 0, 65537, 393253, 0, 65537, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 65537, 393257, 0, 65537, 393258, 0, 65538, 524287, 0, 65541, 458752, 0, 65537, 458753, 0, 65538, 458767, 0, 1, 458768, 0, 1, 458781, 0, 65541, 458782, 0, 65538, 458787, 0, 65541, 458788, 0, 65537, 458789, 0, 65537, 458790, 0, 65537, 458791, 0, 65537, 458792, 0, 65537, 458793, 0, 65537, 458794, 0, 65539, 589823, 0, 65536, 524288, 0, 65537, 524289, 0, 65538, 524301, 0, 1, 524302, 0, 1, 524303, 0, 1, 524317, 0, 65536, 524318, 0, 65538, 524323, 0, 65541, 524324, 0, 65537, 524325, 0, 65537, 524326, 0, 65537, 524327, 0, 65537, 524328, 0, 65537, 524329, 0, 65537, 524330, 0, 65538, 655359, 0, 65541, 589824, 0, 65537, 589825, 0, 65539, 589835, 0, 1, 589836, 0, 1, 589837, 0, 1, 589853, 0, 65541, 589854, 0, 65539, 589859, 0, 65541, 589860, 0, 65537, 589861, 0, 65537, 589862, 0, 65537, 589863, 0, 65537, 589864, 0, 65537, 589865, 0, 65537, 589866, 0, 65538, 720895, 0, 65541, 655360, 0, 65537, 655361, 0, 65539, 655369, 0, 0, 655370, 0, 131076, 655371, 0, 2, 655389, 0, 65541, 655390, 0, 65538, 655395, 0, 131072, 655396, 0, 131073, 655397, 0, 131073, 655398, 0, 131073, 655399, 0, 131073, 655400, 0, 131073, 655401, 0, 5, 655402, 0, 65538, 786431, 0, 65541, 720896, 0, 65537, 720897, 0, 65539, 720905, 0, 131072, 720906, 0, 131073, 720907, 0, 131074, 720908, 0, 1, 720909, 0, 1, 720910, 0, 1, 720911, 0, 1, 720912, 0, 1, 720913, 0, 1, 720914, 0, 1, 720925, 0, 65536, 720926, 0, 65538, 720937, 0, 65541, 720938, 0, 65539, 851967, 0, 131072, 786432, 0, 131073, 786433, 0, 131074, 786461, 0, 131072, 786462, 0, 131074, 786473, 0, 131072, 786474, 0, 131074, 852004, 0, 0, 852005, 0, 2, 917540, 0, 65541, 917541, 0, 65538, 1048573, 0, 0, 1048574, 0, 1, 1048575, 0, 131076, 983040, 0, 131076, 983041, 0, 1, 983042, 0, 131076, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 1, 983048, 0, 131076, 983049, 0, 1, 983050, 0, 131076, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 131076, 983057, 0, 1, 983058, 0, 1, 983059, 0, 131076, 983060, 0, 131076, 983061, 0, 131076, 983062, 0, 1, 983063, 0, 1, 983064, 0, 1, 983065, 0, 131076, 983066, 0, 1, 983067, 0, 131076, 983068, 0, 131076, 983069, 0, 131076, 983070, 0, 131076, 983071, 0, 1, 983072, 0, 1, 983073, 0, 131076, 983074, 0, 131076, 983075, 0, 131076, 983076, 0, 131077, 983077, 0, 131075, 983078, 0, 131076, 983079, 0, 1, 983080, 0, 131076, 983081, 0, 1, 983082, 0, 2, 1114109, 0, 131072, 1114110, 0, 4, 1114111, 0, 131073, 1048576, 0, 4, 1048577, 0, 4, 1048578, 0, 4, 1048579, 0, 4, 1048580, 0, 131073, 1048581, 0, 131073, 1048582, 0, 131073, 1048583, 0, 131073, 1048584, 0, 131073, 1048585, 0, 131073, 1048586, 0, 131073, 1048587, 0, 131073, 1048588, 0, 4, 1048589, 0, 131073, 1048590, 0, 131073, 1048591, 0, 131073, 1048592, 0, 4, 1048593, 0, 131073, 1048594, 0, 131073, 1048595, 0, 131073, 1048596, 0, 131073, 1048597, 0, 4, 1048598, 0, 131073, 1048599, 0, 4, 1048600, 0, 4, 1048601, 0, 4, 1048602, 0, 131073, 1048603, 0, 4, 1048604, 0, 4, 1048605, 0, 4, 1048606, 0, 4, 1048607, 0, 131073, 1048608, 0, 4, 1048609, 0, 4, 1048610, 0, 131073, 1048611, 0, 4, 1048612, 0, 131073, 1048613, 0, 131073, 1048614, 0, 131073, 1048615, 0, 131073, 1048616, 0, 131073, 1048617, 0, 4, 1048618, 0, 131074 ) + +[node name="ExitLevelArea" type="Area2D" parent="."] +position = Vector2( -28, 218 ) +collision_layer = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ExitLevelArea"] +position = Vector2( 0, 6 ) +shape = SubResource( 1 ) + +[node name="ExitLevelAreaNext" type="Area2D" parent="."] +position = Vector2( 694, 218 ) +collision_layer = 0 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="ExitLevelAreaNext"] +position = Vector2( 0, 6 ) +shape = SubResource( 1 ) + +[node name="SpawnPoint" parent="." instance=ExtResource( 4 )] +position = Vector2( 239, 240 ) +node = ExtResource( 3 ) +[connection signal="body_entered" from="ExitLevelArea" to="." method="_on_ExitLevelArea_body_entered"] +[connection signal="body_entered" from="ExitLevelAreaNext" to="." method="_on_ExitLevelAreaNext_body_entered"] diff --git a/src/GameWorld/Levels/Level.gd b/src/GameWorld/Levels/Level.gd new file mode 100644 index 0000000..8d45b95 --- /dev/null +++ b/src/GameWorld/Levels/Level.gd @@ -0,0 +1,84 @@ +extends Node2D +class_name Level + +signal level_exited +signal level_ready + +var _player:Player +var _camera:CameraGame + +var is_active_level := false + +export var game_state = GameState.States.GAME + +export var level_entry_point := Vector2.ZERO +export var level_exit_point := Vector2.ZERO + +export var exit_area_2d_path : NodePath +export var enter_area_2d_path : NodePath + +var _exit_area_2d = null; +var _enter_area_2d = null; + +export var camer_limits := { + "top": 0, + "right": 400, + "bottom": 400, + "left": 0, +} + +func _ready(): + self._exit_area_2d = get_node(exit_area_2d_path) + self._enter_area_2d = get_node(enter_area_2d_path) + pass + + + +func _set_active(activated:bool = true): + is_active_level = activated; + if activated: + if _exit_area_2d != null: _exit_area_2d.connect("player_entered", self, "_on_ExitLevelAreaNext_player_entered") + if _enter_area_2d != null: _enter_area_2d.connect("player_entered", self, "_on_ExitLevelArea_player_entered") + emit_signal("level_ready") + +func set_player(player:Player, is_entering:bool): + _player = player + _camera = _player.get_camera() + _set_camera_limits() + _set_player_position(is_entering) + add_child(player) + +func remove_player(): + remove_child(_player) + _camera = null + _player = null + +func _set_camera_limits(): + _camera.limit_top = camer_limits.top + _camera.limit_right = camer_limits.right + _camera.limit_bottom = camer_limits.bottom + _camera.limit_left = camer_limits.left + +func _set_player_position(is_entering:bool): + _player.position = level_entry_point if is_entering else level_exit_point + _player.face_player(is_entering) + _player.respawn_position = _player.position + +func set_exit_area_enabled(enabled:bool=true): + if _exit_area_2d != null: _exit_area_2d.set_block_signals(enabled) + +func set_enter_area_enabled(enabled:bool=true): + if _enter_area_2d != null: _enter_area_2d.set_block_signals(enabled) + +func _on_ExitLevelArea_player_entered(is_exit, zone) -> void: + print("_on_ExitLevelArea_player_entered") + self.is_active_level = false; + emit_signal("level_exited", false) + pass # Replace with function body. + + +func _on_ExitLevelAreaNext_player_entered(is_exit, zone) -> void: + print("_on_ExitLevelAreaNext_player_entered") + self.is_active_level = false; + emit_signal("level_exited", true) + pass # Replace with function body. diff --git a/src/GameWorld/PreGame.gd b/src/GameWorld/Levels/PreGame.gd similarity index 53% rename from src/GameWorld/PreGame.gd rename to src/GameWorld/Levels/PreGame.gd index dec94e4..42cad79 100644 --- a/src/GameWorld/PreGame.gd +++ b/src/GameWorld/Levels/PreGame.gd @@ -1,27 +1,46 @@ -extends Node2D +extends Level var _Cutscenes = { "old_man_intro": "res://src/CutScenes/ChallengeCutscene.tscn" } var _played_old_man_cutscene = false +func _ready() -> void: + print("preGameReady") + _player.set_ability("dash", true) + _player.set_ability("wall_jump", true) + _player.set_ability("attack", true) + func _on_OldDudeIntroArea_body_entered(body: Node) -> void: if _played_old_man_cutscene: return if body.name == 'Player': + GameState.set_state(GameState.States.CUTSCENE) + AudioManager.play_music(AudioManager.Music.Abandon) var old_man_animation_palyer = $WiseOldDude/AnimationPlayer old_man_animation_palyer.play("fade") yield(old_man_animation_palyer, "animation_finished") old_man_animation_palyer.play("idle") _played_old_man_cutscene = true - AudioManager.play_music(AudioManager.Music.Abandon) - GameState.start_cutscene() - var scene = (load(_Cutscenes.old_man_intro)).instance() + var scene:CutScene = (load(_Cutscenes.old_man_intro)).instance() add_child(scene) + scene.allow_skip = !GameState.is_first_run scene.start_scene(body.get_node("Camera")) yield(scene, "cutscene_finished") old_man_animation_palyer.play_backwards("fade") yield(old_man_animation_palyer, "animation_finished") - GameState.end_cutscene(GameState.States.NEW_GAME) + GameState.set_state(GameState.States.NEW_GAME) pass # Replace with function body. + +func _process(delta: float) -> void: + if is_active_level: + if _player.position.x > 330: + $AmbiantLighting.change_light("NIGHT") + else: + $AmbiantLighting.change_light("DAY") + + if _player.position.x > 700: + print("exited") + is_active_level = false + emit_signal("level_exited", true) diff --git a/src/GameWorld/PreGame.tscn b/src/GameWorld/Levels/PreGame.tscn similarity index 62% rename from src/GameWorld/PreGame.tscn rename to src/GameWorld/Levels/PreGame.tscn index 0fadecb..965bcd5 100644 --- a/src/GameWorld/PreGame.tscn +++ b/src/GameWorld/Levels/PreGame.tscn @@ -1,21 +1,23 @@ -[gd_scene load_steps=21 format=2] +[gd_scene load_steps=23 format=2] -[ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=1] -[ext_resource path="res://assets/Tiles/background_1.png" type="Texture" id=2] -[ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=3] -[ext_resource path="res://assets/Tiles/background_2.png" type="Texture" id=4] -[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=5] -[ext_resource path="res://src/Actors/WiseOldDude/WiseOldDude.tscn" type="PackedScene" id=6] -[ext_resource path="res://assets/Tiles/SemiSolidsTileMap.tscn" type="PackedScene" id=7] -[ext_resource path="res://src/GameWorld/PreGame.gd" type="Script" id=8] -[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=9] -[ext_resource path="res://src/Scripts/SpawnPoint.tscn" type="PackedScene" id=10] -[ext_resource path="res://src/Actors/Goblin.tscn" type="PackedScene" id=11] -[ext_resource path="res://src/Items/Coin.tscn" type="PackedScene" id=12] +[ext_resource path="res://src/GameWorld/Levels/PreGame.gd" type="Script" id=1] +[ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=2] +[ext_resource path="res://assets/Tiles/background_2.png" type="Texture" id=3] +[ext_resource path="res://assets/Tiles/background_1.png" type="Texture" id=4] +[ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=5] +[ext_resource path="res://src/Actors/Goblin.tscn" type="PackedScene" id=6] +[ext_resource path="res://src/Scripts/SpawnPoint.tscn" type="PackedScene" id=7] +[ext_resource path="res://assets/Tiles/SemiSolidsTileMap.tscn" type="PackedScene" id=8] +[ext_resource path="res://src/Items/Coin.tscn" type="PackedScene" id=9] +[ext_resource path="res://assets/Tiles/TrapTiles.tscn" type="PackedScene" id=10] +[ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=11] +[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=12] +[ext_resource path="res://src/Actors/WiseOldDude/WiseOldDude.tscn" type="PackedScene" id=13] +[ext_resource path="res://src/GameWorld/AmbiantLighting.tscn" type="PackedScene" id=14] [sub_resource type="TileSet" id=1] 0/name = "tileset.png 0" -0/texture = ExtResource( 3 ) +0/texture = ExtResource( 11 ) 0/tex_offset = Vector2( 0, 0 ) 0/modulate = Color( 1, 1, 1, 1 ) 0/region = Rect2( 96, 0, 96, 48 ) @@ -38,7 +40,7 @@ 0/shapes = [ ] 0/z_index = 0 1/name = "tileset.png 1" -1/texture = ExtResource( 3 ) +1/texture = ExtResource( 11 ) 1/tex_offset = Vector2( 0, 0 ) 1/modulate = Color( 1, 1, 1, 1 ) 1/region = Rect2( 0, 48, 48, 48 ) @@ -61,22 +63,22 @@ 1/shapes = [ ] 1/z_index = 0 -[sub_resource type="RectangleShape2D" id=37] +[sub_resource type="RectangleShape2D" id=2] extents = Vector2( 7, 37 ) -[sub_resource type="Gradient" id=38] +[sub_resource type="Gradient" id=3] colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0.258824 ) -[sub_resource type="GradientTexture" id=39] -gradient = SubResource( 38 ) +[sub_resource type="GradientTexture" id=4] +gradient = SubResource( 3 ) -[sub_resource type="Curve" id=40] +[sub_resource type="Curve" id=5] _data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.756818 ), 0.0, 0.0, 0, 0 ] -[sub_resource type="CurveTexture" id=41] -curve = SubResource( 40 ) +[sub_resource type="CurveTexture" id=6] +curve = SubResource( 5 ) -[sub_resource type="ParticlesMaterial" id=42] +[sub_resource type="ParticlesMaterial" id=7] emission_shape = 2 emission_box_extents = Vector3( 1, 4, 1 ) flag_disable_z = true @@ -90,10 +92,10 @@ orbit_velocity = 0.0 orbit_velocity_random = 0.0 scale = 1.5 scale_random = 0.5 -scale_curve = SubResource( 41 ) -color_ramp = SubResource( 39 ) +scale_curve = SubResource( 6 ) +color_ramp = SubResource( 4 ) -[sub_resource type="Animation" id=43] +[sub_resource type="Animation" id=8] resource_name = "default" loop = true tracks/0/type = "value" @@ -110,7 +112,16 @@ tracks/0/keys = { } [node name="PreGame" type="Node2D"] -script = ExtResource( 8 ) +script = ExtResource( 1 ) +game_state = 6 +level_entry_point = Vector2( 80, 50 ) +level_exit_point = Vector2( 700, 224 ) +camer_limits = { +"bottom": 260, +"left": -16, +"right": 710, +"top": 0 +} [node name="ParallaxBackground" type="ParallaxBackground" parent="."] @@ -122,7 +133,7 @@ margin_left = -142.0 margin_top = -103.0 margin_right = 443.0 margin_bottom = 255.0 -texture = ExtResource( 1 ) +texture = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } @@ -132,7 +143,7 @@ margin_left = 443.0 margin_top = -103.0 margin_right = 1028.0 margin_bottom = 255.0 -texture = ExtResource( 1 ) +texture = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } @@ -145,7 +156,7 @@ margin_left = -142.0 margin_top = -103.0 margin_right = 443.0 margin_bottom = 255.0 -texture = ExtResource( 2 ) +texture = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } @@ -155,7 +166,7 @@ margin_left = 443.0 margin_top = -103.0 margin_right = 1028.0 margin_bottom = 255.0 -texture = ExtResource( 2 ) +texture = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } @@ -168,7 +179,7 @@ margin_left = -142.0 margin_top = -103.0 margin_right = 443.0 margin_bottom = 255.0 -texture = ExtResource( 4 ) +texture = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } @@ -178,25 +189,29 @@ margin_left = 443.0 margin_top = -103.0 margin_right = 1028.0 margin_bottom = 255.0 -texture = ExtResource( 4 ) +texture = ExtResource( 3 ) __meta__ = { "_edit_use_anchors_": false } [node name="SolidPlatforms" type="Node2D" parent="."] -[node name="SemiSolidsTileMap2" parent="SolidPlatforms" instance=ExtResource( 7 )] +[node name="SemiSolidsTileMap2" parent="SolidPlatforms" instance=ExtResource( 8 )] tile_set = SubResource( 1 ) tile_data = PoolIntArray( -65513, 0, 0, -65512, 0, 1, -65511, 0, 131076, -65510, 0, 131076, -65509, 0, 131076, -65508, 0, 131076, -65507, 0, 131076, -65506, 0, 1, -65505, 0, 1, -65504, 0, 131076, -65503, 0, 1, -65502, 0, 131076, -65501, 0, 131076, -65500, 0, 131076, -65499, 0, 2, 23, 0, 65541, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65538, 65559, 0, 65536, 65560, 0, 65537, 65561, 0, 65537, 65562, 0, 65537, 65563, 0, 65537, 65564, 0, 65537, 65565, 0, 65537, 65566, 0, 65537, 65567, 0, 65537, 65568, 0, 65537, 65569, 0, 65537, 65570, 0, 65537, 65571, 0, 65537, 65572, 0, 65537, 65573, 0, 131075, 65574, 0, 1, 65575, 0, 131076, 65576, 0, 131076, 65577, 0, 2, 131092, 0, 0, 131093, 0, 131076, 131094, 0, 131076, 131095, 0, 131077, 131096, 0, 65537, 131097, 0, 65537, 131098, 0, 65537, 131099, 0, 65537, 131100, 0, 65537, 131101, 0, 65537, 131102, 0, 65537, 131103, 0, 65537, 131104, 0, 65537, 131105, 0, 65537, 131106, 0, 65537, 131107, 0, 65537, 131108, 0, 65537, 131109, 0, 65537, 131110, 0, 65537, 131111, 0, 65537, 131112, 0, 65537, 131113, 0, 65538, 196628, 0, 65541, 196629, 0, 65537, 196630, 0, 65537, 196631, 0, 65537, 196632, 0, 65537, 196633, 0, 65537, 196634, 0, 65537, 196635, 0, 65537, 196636, 0, 65537, 196637, 0, 65537, 196638, 0, 65537, 196639, 0, 65537, 196640, 0, 65537, 196641, 0, 65537, 196642, 0, 65537, 196643, 0, 65537, 196644, 0, 65537, 196645, 0, 65537, 196646, 0, 65537, 196647, 0, 65537, 196648, 0, 65537, 196649, 0, 65539, 262161, 0, 0, 262162, 0, 131076, 262163, 0, 1, 262164, 0, 131077, 262165, 0, 65537, 262166, 0, 65537, 262167, 0, 65537, 262168, 0, 65537, 262169, 0, 65537, 262170, 0, 65537, 262171, 0, 65537, 262172, 0, 65537, 262173, 0, 65537, 262174, 0, 65537, 262175, 0, 65537, 262176, 0, 65537, 262177, 0, 65537, 262178, 0, 65537, 262179, 0, 65537, 262180, 0, 65537, 262181, 0, 65537, 262182, 0, 65537, 262183, 0, 65537, 262184, 0, 65537, 262185, 0, 65539, 327697, 0, 65536, 327698, 0, 65537, 327699, 0, 65537, 327700, 0, 65537, 327701, 0, 65537, 327702, 0, 65537, 327703, 0, 65537, 327704, 0, 65537, 327705, 0, 65537, 327706, 0, 65537, 327707, 0, 65537, 327708, 0, 65537, 327709, 0, 65537, 327710, 0, 65537, 327711, 0, 65537, 327712, 0, 65537, 327713, 0, 65537, 327714, 0, 65537, 327715, 0, 65537, 327716, 0, 65537, 327717, 0, 65537, 327718, 0, 65537, 327719, 0, 65537, 327720, 0, 65537, 327721, 0, 131075, 327722, 0, 131076, 327723, 0, 131076, 327724, 0, 2, 393232, 1, 0, 393233, 0, 65536, 393234, 0, 65537, 393235, 0, 65537, 393236, 0, 65537, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65537, 393242, 0, 65537, 393243, 0, 65537, 393244, 0, 65537, 393245, 0, 65537, 393246, 0, 65537, 393247, 0, 65537, 393248, 0, 65537, 393249, 0, 65537, 393250, 0, 65537, 393251, 0, 65537, 393252, 0, 65537, 393253, 0, 65537, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 65537, 393257, 0, 3, 393258, 0, 131073, 393259, 0, 131073, 393260, 0, 131074, 458768, 1, 0, 458769, 0, 65536, 458770, 0, 65537, 458771, 0, 65537, 458772, 0, 65537, 458773, 0, 65537, 458774, 0, 65537, 458775, 0, 65537, 458776, 0, 65537, 458777, 0, 65537, 458778, 0, 65537, 458779, 0, 65537, 458780, 0, 65537, 458781, 0, 65537, 458782, 0, 65537, 458783, 0, 65537, 458784, 0, 65537, 458785, 0, 65537, 458786, 0, 65537, 458787, 0, 65537, 458788, 0, 65537, 458789, 0, 65537, 458790, 0, 65537, 458791, 0, 65537, 458792, 0, 65537, 458793, 0, 65538, 458794, 1, 0, 458795, 1, 2, 458796, 0, 0, 524305, 0, 65536, 524306, 0, 65537, 524307, 0, 65537, 524308, 0, 65537, 524309, 0, 65537, 524310, 0, 65537, 524311, 0, 65537, 524312, 0, 65537, 524313, 0, 65537, 524314, 0, 65537, 524315, 0, 65537, 524316, 0, 65537, 524317, 0, 65537, 524318, 0, 65537, 524319, 0, 65537, 524320, 0, 65537, 524321, 0, 65537, 524322, 0, 65537, 524323, 0, 65537, 524324, 0, 65537, 524325, 0, 65537, 524326, 0, 65537, 524327, 0, 65537, 524328, 0, 65537, 524329, 0, 65538, 524330, 1, 65536, 524331, 1, 65538, 524332, 0, 0, 589841, 0, 65536, 589842, 0, 65537, 589843, 0, 65537, 589844, 0, 65537, 589845, 0, 65537, 589846, 0, 65537, 589847, 0, 65537, 589848, 0, 65537, 589849, 0, 65537, 589850, 0, 65537, 589851, 0, 65537, 589852, 0, 65537, 589853, 0, 65537, 589854, 0, 65537, 589855, 0, 65537, 589856, 0, 65537, 589857, 0, 65537, 589858, 0, 65537, 589859, 0, 65537, 589860, 0, 65537, 589861, 0, 65537, 589862, 0, 65537, 589863, 0, 65537, 589864, 0, 65537, 589865, 0, 65539, 589866, 1, 131072, 589867, 1, 131074, 589868, 0, 0, 655375, 0, 0, 655376, 0, 131076, 655377, 0, 131077, 655378, 0, 65537, 655379, 0, 65537, 655380, 0, 65537, 655381, 0, 65537, 655382, 0, 65537, 655383, 0, 65537, 655384, 0, 65537, 655385, 0, 65537, 655386, 0, 65537, 655387, 0, 65537, 655388, 0, 65537, 655389, 0, 65537, 655390, 0, 65537, 655391, 0, 65537, 655392, 0, 65537, 655393, 0, 65537, 655394, 0, 65537, 655395, 0, 65537, 655396, 0, 65537, 655397, 0, 65537, 655398, 0, 65537, 655399, 0, 65537, 655400, 0, 65537, 655401, 0, 131075, 655402, 0, 1, 655403, 0, 131076, 655404, 0, 2, 720911, 0, 65541, 720912, 0, 65537, 720913, 0, 65537, 720914, 0, 65537, 720915, 0, 65537, 720916, 0, 65537, 720917, 0, 65537, 720918, 0, 65537, 720919, 0, 65537, 720920, 0, 65537, 720921, 0, 65537, 720922, 0, 65537, 720923, 0, 65537, 720924, 0, 65537, 720925, 0, 65537, 720926, 0, 65537, 720927, 0, 65537, 720928, 0, 65537, 720929, 0, 65537, 720930, 0, 65537, 720931, 0, 65537, 720932, 0, 65537, 720933, 0, 65537, 720934, 0, 65537, 720935, 0, 65537, 720936, 0, 65537, 720937, 0, 65537, 720938, 0, 65537, 720939, 0, 65537, 720940, 0, 65538, 786447, 0, 65541, 786448, 0, 65537, 786449, 0, 65537, 786450, 0, 65537, 786451, 0, 65537, 786452, 0, 65537, 786453, 0, 65537, 786454, 0, 65537, 786455, 0, 65537, 786456, 0, 65537, 786457, 0, 65537, 786458, 0, 65537, 786459, 0, 65537, 786460, 0, 65537, 786461, 0, 65537, 786462, 0, 65537, 786463, 0, 65537, 786464, 0, 65537, 786465, 0, 65537, 786466, 0, 65537, 786467, 0, 65537, 786468, 0, 65537, 786469, 0, 65537, 786470, 0, 65537, 786471, 0, 65537, 786472, 0, 65537, 786473, 0, 65537, 786474, 0, 65537, 786475, 0, 65537, 786476, 0, 65539, 851983, 0, 65541, 851984, 0, 65537, 851985, 0, 65537, 851986, 0, 65537, 851987, 0, 65537, 851988, 0, 3, 851989, 0, 131073, 851990, 0, 4, 851991, 0, 4, 851992, 0, 131073, 851993, 0, 131073, 851994, 0, 4, 851995, 0, 131073, 851996, 0, 131073, 851997, 0, 4, 851998, 0, 5, 851999, 0, 65537, 852000, 0, 3, 852001, 0, 131073, 852002, 0, 4, 852003, 0, 4, 852004, 0, 131073, 852005, 0, 4, 852006, 0, 4, 852007, 0, 4, 852008, 0, 4, 852009, 0, 131073, 852010, 0, 4, 852011, 0, 4, 852012, 0, 131074, 917519, 0, 131072, 917520, 0, 4, 917521, 0, 131073, 917522, 0, 131073, 917523, 0, 4, 917524, 0, 131074, 917525, 1, 0, 917526, 1, 0, 917527, 1, 0, 917528, 0, 0, 917529, 1, 0, 917530, 1, 0, 917531, 1, 0, 917532, 1, 0, 917533, 1, 0, 917534, 0, 65541, 917535, 0, 65537, 917536, 0, 65538, 917537, 1, 0, 917538, 1, 0, 983070, 0, 131072, 983071, 0, 131073, 983072, 0, 131074 ) -[node name="SemiSolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 7 )] +[node name="SemiSolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 8 )] tile_set = SubResource( 1 ) tile_data = PoolIntArray( -65513, 0, 0, -65512, 0, 1, -65511, 0, 131076, -65510, 0, 131076, -65509, 0, 131076, -65508, 0, 131076, -65507, 0, 131076, -65506, 0, 1, -65505, 0, 1, -65504, 0, 131076, -65503, 0, 1, -65502, 0, 131076, -65501, 0, 131076, -65500, 0, 131076, -65499, 0, 2, 23, 0, 65541, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65538, 65559, 0, 65536, 65560, 0, 65537, 65561, 0, 65537, 65562, 0, 65537, 65563, 0, 65537, 65564, 0, 65537, 65565, 0, 65537, 65566, 0, 65537, 65567, 0, 65537, 65568, 0, 65537, 65569, 0, 65537, 65570, 0, 3, 65571, 0, 131073, 65572, 0, 4, 65573, 0, 131074, 131092, 0, 0, 131093, 0, 131076, 131094, 0, 131076, 131095, 0, 131077, 131096, 0, 65537, 131097, 0, 65537, 131098, 0, 65537, 131099, 0, 65537, 131100, 0, 3, 131101, 0, 131073, 131102, 0, 4, 131103, 0, 5, 131104, 0, 65537, 131105, 0, 65537, 131106, 0, 65539, 131107, 1, 0, 131108, 1, 1, 131109, 1, 1, 131110, 1, 2, 196628, 0, 65541, 196629, 0, 65537, 196630, 0, 65537, 196631, 0, 65537, 196632, 0, 65537, 196633, 0, 65537, 196634, 0, 65537, 196635, 0, 65537, 196636, 0, 65539, 196637, 1, 0, 196638, 1, 2, 196639, 0, 65541, 196640, 0, 65537, 196641, 0, 65537, 196642, 0, 65539, 196643, 1, 65536, 196644, 1, 65537, 196645, 1, 65537, 196646, 1, 65538, 262161, 0, 0, 262162, 0, 131076, 262163, 0, 1, 262164, 0, 131077, 262165, 0, 65537, 262166, 0, 65537, 262167, 0, 65537, 262168, 0, 65537, 262169, 0, 65537, 262170, 0, 65537, 262171, 0, 65537, 262172, 0, 65539, 262173, 1, 131072, 262174, 1, 131074, 262175, 0, 65541, 262176, 0, 65537, 262177, 0, 65537, 262178, 0, 65539, 262179, 1, 131072, 262180, 1, 131073, 262181, 1, 131073, 262182, 1, 131074, 327697, 0, 131072, 327698, 0, 5, 327699, 0, 65537, 327700, 0, 65537, 327701, 0, 65537, 327702, 0, 65537, 327703, 0, 65537, 327704, 0, 65537, 327705, 0, 65537, 327706, 0, 65537, 327707, 0, 65537, 327708, 0, 131075, 327709, 0, 131076, 327710, 0, 1, 327711, 0, 131077, 327712, 0, 65537, 327713, 0, 65537, 327714, 0, 131075, 327715, 0, 1, 327716, 0, 131076, 327717, 0, 1, 327718, 0, 1, 327719, 0, 131076, 327720, 0, 1, 327721, 0, 131076, 327722, 0, 1, 327723, 0, 131076, 327724, 0, 2, 393232, 1, 0, 393233, 1, 2, 393234, 0, 131072, 393235, 0, 131073, 393236, 0, 4, 393237, 0, 4, 393238, 0, 131073, 393239, 0, 131073, 393240, 0, 131073, 393241, 0, 131073, 393242, 0, 131073, 393243, 0, 131073, 393244, 0, 4, 393245, 0, 4, 393246, 0, 131073, 393247, 0, 4, 393248, 0, 5, 393249, 0, 65537, 393250, 0, 65537, 393251, 0, 65537, 393252, 0, 65537, 393253, 0, 65537, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 3, 393257, 0, 131073, 393258, 0, 131073, 393259, 0, 131073, 393260, 0, 131074, 458768, 1, 131072, 458769, 1, 131074, 458770, 0, 0, 458771, 1, 0, 458772, 1, 1, 458773, 1, 1, 458774, 1, 1, 458775, 1, 1, 458776, 1, 1, 458777, 1, 1, 458778, 1, 1, 458779, 1, 1, 458780, 1, 1, 458781, 1, 1, 458782, 1, 1, 458783, 1, 2, 458784, 0, 131072, 458785, 0, 4, 458786, 0, 4, 458787, 0, 5, 458788, 0, 65537, 458789, 0, 65537, 458790, 0, 65537, 458791, 0, 65537, 458792, 0, 65539, 458793, 1, 0, 458794, 1, 1, 458795, 1, 2, 458796, 0, 0, 524305, 0, 0, 524306, 0, 2, 524307, 1, 65536, 524308, 1, 65537, 524309, 1, 65537, 524310, 1, 65537, 524311, 1, 65537, 524312, 1, 65537, 524313, 1, 65537, 524314, 1, 65537, 524315, 1, 65537, 524316, 1, 65537, 524317, 1, 65537, 524318, 1, 65537, 524319, 1, 0, 524320, 1, 1, 524321, 1, 1, 524322, 1, 2, 524323, 0, 65541, 524324, 0, 65537, 524325, 0, 65537, 524326, 0, 65537, 524327, 0, 65537, 524328, 0, 65539, 524329, 1, 65536, 524330, 1, 65537, 524331, 1, 65538, 524332, 0, 0, 589841, 0, 65536, 589842, 0, 65539, 589843, 1, 131072, 589844, 1, 131073, 589845, 1, 131073, 589846, 1, 131073, 589847, 1, 131073, 589848, 1, 131073, 589849, 1, 131073, 589850, 1, 131073, 589851, 1, 131073, 589852, 1, 0, 589853, 1, 65537, 589854, 1, 65537, 589855, 1, 65537, 589856, 1, 65537, 589857, 1, 65537, 589858, 1, 65538, 589859, 0, 65541, 589860, 0, 65537, 589861, 0, 65537, 589862, 0, 65537, 589863, 0, 65537, 589864, 0, 65539, 589865, 1, 131072, 589866, 1, 131073, 589867, 1, 131074, 589868, 0, 0, 655375, 0, 0, 655376, 0, 131076, 655377, 0, 131077, 655378, 0, 131075, 655379, 0, 1, 655380, 0, 131076, 655381, 0, 1, 655382, 0, 1, 655383, 0, 1, 655384, 0, 131076, 655385, 0, 1, 655386, 0, 1, 655387, 0, 2, 655388, 1, 65536, 655389, 1, 65537, 655390, 1, 65537, 655391, 1, 65537, 655392, 1, 65537, 655393, 1, 65537, 655394, 1, 65538, 655395, 0, 65541, 655396, 0, 65537, 655397, 0, 65537, 655398, 0, 65537, 655399, 0, 65537, 655400, 0, 131075, 655401, 0, 1, 655402, 0, 1, 655403, 0, 131076, 655404, 0, 2, 720911, 0, 65541, 720912, 0, 65537, 720913, 0, 65537, 720914, 0, 65537, 720915, 0, 65537, 720916, 0, 3, 720917, 0, 131073, 720918, 0, 4, 720919, 0, 131073, 720920, 0, 4, 720921, 0, 131073, 720922, 0, 4, 720923, 0, 131074, 720924, 1, 65536, 720925, 1, 65537, 720926, 1, 65537, 720927, 1, 65537, 720928, 1, 65537, 720929, 1, 65537, 720930, 1, 65538, 720931, 0, 65536, 720932, 0, 65537, 720933, 0, 65537, 720934, 0, 65537, 720935, 0, 65537, 720936, 0, 65537, 720937, 0, 65537, 720938, 0, 65537, 720939, 0, 65537, 720940, 0, 65538, 786447, 0, 65541, 786448, 0, 65537, 786449, 0, 65537, 786450, 0, 65537, 786451, 0, 65537, 786452, 0, 65538, 786453, 1, 0, 786454, 1, 1, 786455, 1, 2, 786456, 0, 0, 786457, 1, 0, 786458, 1, 1, 786459, 1, 1, 786460, 1, 0, 786461, 1, 0, 786462, 1, 131073, 786463, 1, 131073, 786464, 1, 131073, 786465, 1, 0, 786466, 1, 65538, 786467, 0, 65541, 786468, 0, 65537, 786469, 0, 65537, 786470, 0, 65537, 786471, 0, 65537, 786472, 0, 65537, 786473, 0, 65537, 786474, 0, 65537, 786475, 0, 65537, 786476, 0, 65539, 851983, 0, 65541, 851984, 0, 65537, 851985, 0, 65537, 851986, 0, 65537, 851987, 0, 65537, 851988, 0, 65539, 851989, 1, 65536, 851990, 1, 65537, 851991, 1, 65538, 851992, 0, 0, 851993, 1, 65536, 851994, 1, 65537, 851995, 1, 65537, 851996, 1, 65537, 851997, 1, 65538, 851998, 0, 0, 851999, 0, 131076, 852000, 0, 2, 852001, 1, 65536, 852002, 1, 65538, 852003, 0, 131072, 852004, 0, 131073, 852005, 0, 4, 852006, 0, 4, 852007, 0, 4, 852008, 0, 4, 852009, 0, 131073, 852010, 0, 4, 852011, 0, 4, 852012, 0, 131074, 917519, 0, 131072, 917520, 0, 4, 917521, 0, 131073, 917522, 0, 131073, 917523, 0, 4, 917524, 0, 131074, 917525, 1, 131072, 917526, 1, 131073, 917527, 1, 131074, 917528, 0, 0, 917529, 1, 131072, 917530, 1, 131073, 917531, 1, 131073, 917532, 1, 131073, 917533, 1, 131074, 917534, 0, 65541, 917535, 0, 65537, 917536, 0, 65539, 917537, 1, 131072, 917538, 1, 131074, 983070, 0, 131072, 983071, 0, 131073, 983072, 0, 131074 ) -[node name="SolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 5 )] -tile_data = PoolIntArray( -131077, 0, 0, -131076, 0, 131076, -131075, 0, 1, -131074, 0, 1, -131073, 0, 2, -196608, 0, 1, -196607, 0, 1, -196606, 0, 1, -196605, 0, 1, -196604, 0, 1, -196603, 0, 1, -196602, 0, 1, -196601, 0, 1, -196600, 0, 1, -196599, 0, 1, -196598, 0, 1, -196597, 0, 1, -196596, 0, 1, -196595, 0, 1, -196594, 0, 1, -196593, 0, 1, -196592, 0, 1, -196591, 0, 1, -196590, 0, 0, -196589, 0, 1, -196588, 0, 131076, -196587, 0, 131076, -196586, 0, 1, -196585, 0, 131076, -196584, 0, 1, -196583, 0, 1, -196582, 0, 131076, -196581, 0, 131076, -196580, 0, 131076, -196579, 0, 131076, -196578, 0, 1, -196577, 0, 1, -196576, 0, 131076, -196575, 0, 131076, -196574, 0, 131076, -196573, 0, 131076, -196572, 0, 1, -196571, 0, 1, -196570, 0, 1, -196569, 0, 131076, -196568, 0, 131076, -196567, 0, 131076, -196566, 0, 131076, -196565, 0, 1, -196564, 0, 2, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 65538, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131074, 327688, 0, 0, 327689, 0, 2, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65539, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 65539, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65539, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65538, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 131075, 983040, 0, 1, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 1, 983057, 0, 131076, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 131074 ) +[node name="SolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 12 )] +collision_layer = 8 +tile_data = PoolIntArray( -196613, 0, 0, -196612, 0, 1, -196611, 0, 1, -196610, 0, 131076, -196609, 0, 1, -262144, 0, 1, -262143, 0, 131076, -262142, 0, 1, -262141, 0, 1, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 1, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 1, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 1, -262129, 0, 1, -262128, 0, 1, -262127, 0, 1, -262126, 0, 1, -262125, 0, 1, -262124, 0, 131076, -262123, 0, 131076, -262122, 0, 131076, -262121, 0, 131076, -262120, 0, 1, -262119, 0, 1, -262118, 0, 131076, -262117, 0, 131076, -262116, 0, 1, -262115, 0, 131076, -262114, 0, 1, -262113, 0, 1, -262112, 0, 1, -262111, 0, 1, -262110, 0, 1, -262109, 0, 131076, -262108, 0, 1, -262107, 0, 1, -262106, 0, 1, -262105, 0, 131076, -262104, 0, 1, -262103, 0, 131076, -262102, 0, 1, -262101, 0, 131076, -262100, 0, 2, -131077, 0, 65541, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 3, -196608, 0, 131073, -196607, 0, 4, -196606, 0, 4, -196605, 0, 131073, -196604, 0, 4, -196603, 0, 131073, -196602, 0, 4, -196601, 0, 4, -196600, 0, 4, -196599, 0, 4, -196598, 0, 131073, -196597, 0, 4, -196596, 0, 4, -196595, 0, 131073, -196594, 0, 131073, -196593, 0, 131073, -196592, 0, 131073, -196591, 0, 4, -196590, 0, 5, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65537, -196571, 0, 65537, -196570, 0, 65537, -196569, 0, 65537, -196568, 0, 65537, -196567, 0, 65537, -196566, 0, 65537, -196565, 0, 65537, -196564, 0, 65538, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 65538, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131074, 327688, 0, 0, 327689, 0, 2, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65539, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 65539, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65539, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65538, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 131076, 917549, 0, 131076, 917550, 0, 1, 917551, 0, 131076, 917552, 0, 131076, 917553, 0, 131076, 917554, 0, 131076, 917555, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 131075, 983040, 0, 1, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 1, 983057, 0, 131076, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65537, 983090, 0, 65537, 983091, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65537, 1048621, 0, 65537, 1048622, 0, 65537, 1048623, 0, 65537, 1048624, 0, 65537, 1048625, 0, 65537, 1048626, 0, 65537, 1048627, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 4, 1114157, 0, 131073, 1114158, 0, 4, 1114159, 0, 4, 1114160, 0, 4, 1114161, 0, 4, 1114162, 0, 131073, 1114163, 0, 131074 ) -[node name="WiseOldDude" parent="." instance=ExtResource( 6 )] +[node name="TrapTiles" parent="SolidPlatforms" instance=ExtResource( 10 )] +tile_data = PoolIntArray( 917517, 0, 0, 917518, 0, 0, 917519, 0, 0, 917530, 0, 0, 917531, 0, 0 ) + +[node name="WiseOldDude" parent="." instance=ExtResource( 13 )] position = Vector2( 643, 161 ) [node name="CutsceneAreas" type="Node2D" parent="."] @@ -207,40 +222,42 @@ collision_layer = 0 [node name="CollisionShape2D" type="CollisionShape2D" parent="CutsceneAreas/OldDudeIntroArea"] position = Vector2( 0, -27 ) -shape = SubResource( 37 ) +shape = SubResource( 2 ) [node name="LoreParticals" type="Particles2D" parent="."] -position = Vector2( 702, 214 ) +position = Vector2( 715, 212 ) amount = 20 lifetime = 3.0 preprocess = 1.0 explosiveness = 0.25 -process_material = SubResource( 42 ) +process_material = SubResource( 7 ) [node name="Light2D" type="Light2D" parent="LoreParticals"] position = Vector2( -4, -2 ) -texture = ExtResource( 9 ) +texture = ExtResource( 5 ) texture_scale = 5.63 color = Color( 0.980392, 0.554327, 0.0313726, 1 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="LoreParticals"] autoplay = "default" playback_speed = 0.2 -anims/default = SubResource( 43 ) +anims/default = SubResource( 8 ) -[node name="GoblinSpawn" parent="." instance=ExtResource( 10 )] -position = Vector2( 536, 231 ) -node = ExtResource( 11 ) +[node name="GoblinSpawn" parent="." instance=ExtResource( 7 )] +position = Vector2( 526, 238 ) +node = ExtResource( 6 ) -[node name="GoblinSpawn2" parent="." instance=ExtResource( 10 )] -position = Vector2( 212, 126 ) -node = ExtResource( 11 ) +[node name="GoblinSpawn2" parent="." instance=ExtResource( 7 )] +position = Vector2( 208, 126 ) +node = ExtResource( 6 ) [node name="Coins" type="Node" parent="."] -[node name="Coin" parent="Coins" instance=ExtResource( 12 )] -position = Vector2( 26, -6 ) +[node name="Coin" parent="Coins" instance=ExtResource( 9 )] +position = Vector2( 15, -12 ) -[node name="Coin2" parent="Coins" instance=ExtResource( 12 )] +[node name="Coin2" parent="Coins" instance=ExtResource( 9 )] position = Vector2( 535, 42 ) + +[node name="AmbiantLighting" parent="." instance=ExtResource( 14 )] [connection signal="body_entered" from="CutsceneAreas/OldDudeIntroArea" to="." method="_on_OldDudeIntroArea_body_entered"] diff --git a/src/GameWorld/Levels/WorldHub.gd b/src/GameWorld/Levels/WorldHub.gd new file mode 100644 index 0000000..e7500aa --- /dev/null +++ b/src/GameWorld/Levels/WorldHub.gd @@ -0,0 +1,12 @@ +extends Level + + +func _ready() -> void: + $AmbiantLighting.change_light("NIGHT") + +func _enter_tree() -> void: + AudioManager.play_music(AudioManager.Music.PreGame) + + +func _on_WarpZone_player_entered(is_exit, zone): + emit_signal("level_exited", is_exit, zone) diff --git a/src/GameWorld/Levels/WorldHub.tscn b/src/GameWorld/Levels/WorldHub.tscn new file mode 100644 index 0000000..40fecf5 --- /dev/null +++ b/src/GameWorld/Levels/WorldHub.tscn @@ -0,0 +1,78 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://src/GameWorld/Levels/WorldHub.gd" type="Script" id=1] +[ext_resource path="res://src/Scripts/WarpZone.tscn" type="PackedScene" id=2] +[ext_resource path="res://src/GameWorld/AmbiantLighting.tscn" type="PackedScene" id=3] +[ext_resource path="res://assets/Levels/Test/bg_0.png" type="Texture" id=4] +[ext_resource path="res://assets/Tiles/TrapTiles.tscn" type="PackedScene" id=5] +[ext_resource path="res://assets/Tiles/SolidsTileMap.tscn" type="PackedScene" id=6] +[ext_resource path="res://assets/Levels/Test/bg_2.png" type="Texture" id=7] +[ext_resource path="res://assets/Levels/Test/bg_1.png" type="Texture" id=8] + +[node name="WorldHub" type="Node2D"] +script = ExtResource( 1 ) +level_entry_point = Vector2( 20, 220 ) +enter_area_2d_path = NodePath("EnterLevelArea") +camer_limits = { +"bottom": 260, +"left": 0, +"right": 800, +"top": 0 +} + +[node name="World" type="Node2D" parent="."] + +[node name="ParallaxBackground" type="ParallaxBackground" parent="World"] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="World/ParallaxBackground"] +z_index = -1 +motion_scale = Vector2( 0.6, 1 ) +motion_mirroring = Vector2( 480, 0 ) + +[node name="Sprite" type="Sprite" parent="World/ParallaxBackground/ParallaxLayer"] +modulate = Color( 0.435294, 0.34902, 0.34902, 1 ) +light_mask = 16 +position = Vector2( 240, 115 ) +scale = Vector2( 2, 2 ) +texture = ExtResource( 4 ) + +[node name="ParallaxLayer2" type="ParallaxLayer" parent="World/ParallaxBackground"] +motion_scale = Vector2( 0.8, 1 ) +motion_mirroring = Vector2( 480, 0 ) + +[node name="Sprite" type="Sprite" parent="World/ParallaxBackground/ParallaxLayer2"] +modulate = Color( 0.47451, 0.498039, 0.47451, 1 ) +position = Vector2( 241, 110 ) +scale = Vector2( 2, 2 ) +texture = ExtResource( 8 ) + +[node name="ParallaxLayer3" type="ParallaxLayer" parent="World/ParallaxBackground"] +motion_scale = Vector2( 0.9, 1 ) +motion_mirroring = Vector2( 480, 0 ) + +[node name="Sprite" type="Sprite" parent="World/ParallaxBackground/ParallaxLayer3"] +modulate = Color( 0.631373, 0.627451, 0.623529, 1 ) +light_mask = 8 +position = Vector2( 239, 147 ) +scale = Vector2( 2, 2 ) +texture = ExtResource( 7 ) + +[node name="TrapTiles" parent="World" instance=ExtResource( 5 )] + +[node name="SolidsTileMap" parent="World" instance=ExtResource( 6 )] +tile_data = PoolIntArray( -327680, 0, 0, -327679, 0, 131076, -327678, 0, 1, -327677, 0, 131076, -327676, 0, 131076, -327675, 0, 131076, -327674, 0, 131076, -327673, 0, 131076, -327672, 0, 1, -327671, 0, 1, -327670, 0, 131076, -327669, 0, 1, -327668, 0, 131076, -327667, 0, 1, -327666, 0, 1, -327665, 0, 131076, -327664, 0, 131076, -327663, 0, 131076, -327662, 0, 1, -327661, 0, 131076, -327660, 0, 1, -327659, 0, 131076, -327658, 0, 1, -327657, 0, 1, -327656, 0, 1, -327655, 0, 1, -327654, 0, 1, -327653, 0, 131076, -327652, 0, 1, -327651, 0, 1, -327650, 0, 2, -262144, 0, 65536, -262143, 0, 3, -262142, 0, 4, -262141, 0, 4, -262140, 0, 131073, -262139, 0, 131073, -262138, 0, 131073, -262137, 0, 4, -262136, 0, 131073, -262135, 0, 4, -262134, 0, 4, -262133, 0, 4, -262132, 0, 131073, -262131, 0, 4, -262130, 0, 131073, -262129, 0, 131073, -262128, 0, 131073, -262127, 0, 131073, -262126, 0, 4, -262125, 0, 131073, -262124, 0, 4, -262123, 0, 131073, -262122, 0, 131073, -262121, 0, 4, -262120, 0, 131073, -262119, 0, 4, -262118, 0, 4, -262117, 0, 5, -262116, 0, 65537, -262115, 0, 3, -262114, 0, 131074, -196608, 0, 65541, -196607, 0, 65539, -196581, 0, 65541, -196580, 0, 65537, -196579, 0, 65538, -131072, 0, 65536, -131071, 0, 65538, -131045, 0, 65536, -131044, 0, 65537, -131043, 0, 65538, -65536, 0, 65541, -65535, 0, 65538, -65509, 0, 65536, -65508, 0, 65537, -65507, 0, 65538, 0, 0, 65536, 1, 0, 65538, 27, 0, 65536, 28, 0, 65537, 29, 0, 65539, 65536, 0, 65541, 65537, 0, 65539, 65563, 0, 65541, 65564, 0, 65537, 65565, 0, 65539, 131072, 0, 65536, 131073, 0, 65539, 131099, 0, 65536, 131100, 0, 65537, 131101, 0, 65539, 196608, 0, 65536, 196609, 0, 65539, 196614, 0, 0, 196615, 0, 131076, 196616, 0, 2, 196635, 0, 65536, 196636, 0, 65537, 196637, 0, 65539, 262144, 0, 65536, 262145, 0, 65539, 262150, 0, 65541, 262151, 0, 65537, 262152, 0, 65539, 262171, 0, 65541, 262172, 0, 65537, 262173, 0, 65538, 327680, 0, 65541, 327681, 0, 65539, 327686, 0, 65536, 327687, 0, 65537, 327688, 0, 65538, 327707, 0, 65536, 327708, 0, 65537, 327709, 0, 65539, 393216, 0, 65536, 393217, 0, 65538, 393222, 0, 65541, 393223, 0, 65537, 393224, 0, 65539, 393229, 0, 0, 393230, 0, 1, 393231, 0, 1, 393232, 0, 2, 393237, 0, 0, 393238, 0, 1, 393239, 0, 2, 393243, 0, 65536, 393244, 0, 65537, 393245, 0, 65538, 393254, 0, 0, 393255, 0, 131076, 393256, 0, 1, 393257, 0, 131076, 393258, 0, 1, 393259, 0, 131076, 393260, 0, 1, 393261, 0, 1, 393262, 0, 131076, 393263, 0, 131076, 393264, 0, 131076, 393265, 0, 2, 458752, 0, 65536, 458753, 0, 65538, 458758, 0, 131072, 458759, 0, 131073, 458760, 0, 131074, 458765, 0, 65536, 458766, 0, 65537, 458767, 0, 65537, 458768, 0, 65538, 458773, 0, 65541, 458774, 0, 65537, 458775, 0, 65538, 458779, 0, 65536, 458780, 0, 65537, 458781, 0, 65539, 458790, 0, 131072, 458791, 0, 4, 458792, 0, 4, 458793, 0, 5, 458794, 0, 65537, 458795, 0, 65537, 458796, 0, 65537, 458797, 0, 65537, 458798, 0, 65537, 458799, 0, 65537, 458800, 0, 65537, 458801, 0, 65539, 524288, 0, 65541, 524289, 0, 65538, 524301, 0, 131072, 524302, 0, 131073, 524303, 0, 4, 524304, 0, 131074, 524309, 0, 131072, 524310, 0, 4, 524311, 0, 131074, 524315, 0, 65536, 524316, 0, 65537, 524317, 0, 65538, 524329, 0, 65541, 524330, 0, 65537, 524331, 0, 65537, 524332, 0, 65537, 524333, 0, 65537, 524334, 0, 65537, 524335, 0, 65537, 524336, 0, 65537, 524337, 0, 65539, 589824, 0, 65541, 589825, 0, 65539, 589851, 0, 65541, 589852, 0, 65537, 589853, 0, 131075, 589854, 0, 1, 589855, 0, 131076, 589856, 0, 131076, 589857, 0, 131076, 589858, 0, 1, 589859, 0, 1, 589860, 0, 2, 589865, 0, 65536, 589866, 0, 65537, 589867, 0, 65537, 589868, 0, 65537, 589869, 0, 65537, 589870, 0, 65537, 589871, 0, 65537, 589872, 0, 65537, 589873, 0, 65539, 655360, 0, 65536, 655361, 0, 65539, 655377, 0, 0, 655378, 0, 131076, 655379, 0, 2, 655387, 0, 65541, 655388, 0, 65537, 655389, 0, 3, 655390, 0, 4, 655391, 0, 4, 655392, 0, 4, 655393, 0, 4, 655394, 0, 4, 655395, 0, 4, 655396, 0, 131074, 655401, 0, 65541, 655402, 0, 65537, 655403, 0, 65537, 655404, 0, 65537, 655405, 0, 65537, 655406, 0, 65537, 655407, 0, 65537, 655408, 0, 65537, 655409, 0, 65538, 720896, 0, 131072, 720897, 0, 131074, 720913, 0, 131072, 720914, 0, 4, 720915, 0, 131074, 720923, 0, 131072, 720924, 0, 4, 720925, 0, 131074, 720937, 0, 65536, 720938, 0, 65537, 720939, 0, 65537, 720940, 0, 65537, 720941, 0, 65537, 720942, 0, 65537, 720943, 0, 65537, 720944, 0, 65537, 720945, 0, 65539, 786470, 0, 0, 786471, 0, 1, 786472, 0, 1, 786473, 0, 131077, 786474, 0, 65537, 786475, 0, 65537, 786476, 0, 65537, 786477, 0, 65537, 786478, 0, 65537, 786479, 0, 65537, 786480, 0, 65537, 786481, 0, 65539, 852006, 0, 65536, 852007, 0, 65537, 852008, 0, 65537, 852009, 0, 65537, 852010, 0, 65537, 852011, 0, 65537, 852012, 0, 65537, 852013, 0, 65537, 852014, 0, 65537, 852015, 0, 65537, 852016, 0, 65537, 852017, 0, 65538, 917504, 0, 0, 917505, 0, 1, 917506, 0, 131076, 917507, 0, 131076, 917508, 0, 1, 917509, 0, 1, 917510, 0, 1, 917511, 0, 131076, 917512, 0, 131076, 917513, 0, 131076, 917514, 0, 131076, 917515, 0, 1, 917516, 0, 131076, 917517, 0, 131076, 917518, 0, 131076, 917519, 0, 131076, 917520, 0, 1, 917521, 0, 1, 917522, 0, 1, 917523, 0, 131076, 917524, 0, 131076, 917525, 0, 131076, 917526, 0, 131076, 917527, 0, 1, 917528, 0, 131076, 917529, 0, 131076, 917530, 0, 1, 917531, 0, 1, 917532, 0, 131076, 917533, 0, 131076, 917534, 0, 1, 917535, 0, 1, 917536, 0, 1, 917537, 0, 1, 917538, 0, 1, 917539, 0, 131076, 917540, 0, 131076, 917541, 0, 131076, 917542, 0, 131077, 917543, 0, 65537, 917544, 0, 65537, 917545, 0, 65537, 917546, 0, 65537, 917547, 0, 65537, 917548, 0, 65537, 917549, 0, 65537, 917550, 0, 65537, 917551, 0, 65537, 917552, 0, 65537, 917553, 0, 65539, 983040, 0, 65541, 983041, 0, 65537, 983042, 0, 65537, 983043, 0, 65537, 983044, 0, 65537, 983045, 0, 65537, 983046, 0, 65537, 983047, 0, 65537, 983048, 0, 65537, 983049, 0, 65537, 983050, 0, 65537, 983051, 0, 65537, 983052, 0, 65537, 983053, 0, 65537, 983054, 0, 65537, 983055, 0, 65537, 983056, 0, 65537, 983057, 0, 65537, 983058, 0, 65537, 983059, 0, 65537, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 65537, 983063, 0, 65537, 983064, 0, 65537, 983065, 0, 65537, 983066, 0, 65537, 983067, 0, 65537, 983068, 0, 65537, 983069, 0, 65537, 983070, 0, 65537, 983071, 0, 65537, 983072, 0, 65537, 983073, 0, 65537, 983074, 0, 65537, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65539, 1048576, 0, 131072, 1048577, 0, 4, 1048578, 0, 4, 1048579, 0, 131073, 1048580, 0, 4, 1048581, 0, 4, 1048582, 0, 4, 1048583, 0, 4, 1048584, 0, 131073, 1048585, 0, 4, 1048586, 0, 4, 1048587, 0, 131073, 1048588, 0, 131073, 1048589, 0, 131073, 1048590, 0, 4, 1048591, 0, 4, 1048592, 0, 131073, 1048593, 0, 131073, 1048594, 0, 131073, 1048595, 0, 4, 1048596, 0, 4, 1048597, 0, 131073, 1048598, 0, 4, 1048599, 0, 131073, 1048600, 0, 131073, 1048601, 0, 131073, 1048602, 0, 4, 1048603, 0, 131073, 1048604, 0, 4, 1048605, 0, 131073, 1048606, 0, 4, 1048607, 0, 4, 1048608, 0, 4, 1048609, 0, 4, 1048610, 0, 131073, 1048611, 0, 4, 1048612, 0, 4, 1048613, 0, 4, 1048614, 0, 4, 1048615, 0, 131073, 1048616, 0, 4, 1048617, 0, 131073, 1048618, 0, 4, 1048619, 0, 4, 1048620, 0, 4, 1048621, 0, 131073, 1048622, 0, 131073, 1048623, 0, 131073, 1048624, 0, 4, 1048625, 0, 131074 ) + +[node name="EnterLevelArea" parent="." instance=ExtResource( 2 )] +position = Vector2( -2, 224 ) + +[node name="AmbiantLighting" parent="." instance=ExtResource( 3 )] + +[node name="WarpZone" parent="." instance=ExtResource( 2 )] +position = Vector2( 360, 97 ) +zone = 1 + +[node name="WarpZone2" parent="." instance=ExtResource( 2 )] +position = Vector2( 240, 96 ) +zone = 2 +[connection signal="player_entered" from="WarpZone" to="." method="_on_WarpZone_player_entered"] +[connection signal="player_entered" from="WarpZone2" to="." method="_on_WarpZone_player_entered"] diff --git a/src/Intro/Intro.tscn b/src/Intro/Intro.tscn index 5022475..deb7d05 100644 --- a/src/Intro/Intro.tscn +++ b/src/Intro/Intro.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=10 format=2] -[ext_resource path="res://assets/SplashScreen/BLANK.png" type="Texture" id=1] -[ext_resource path="res://src/Intro/Intro.gd" type="Script" id=2] -[ext_resource path="res://assets/SplashScreen/SAGI.png" type="Texture" id=3] -[ext_resource path="res://sound/SAGI.ogg" type="AudioStream" id=4] -[ext_resource path="res://src/Menu/MainMenu.tscn" type="PackedScene" id=5] +[ext_resource path="res://src/Intro/Intro.gd" type="Script" id=1] +[ext_resource path="res://src/Menu/MainMenu.tscn" type="PackedScene" id=2] +[ext_resource path="res://assets/SplashScreen/BLANK.png" type="Texture" id=3] +[ext_resource path="res://assets/SplashScreen/SAGI.png" type="Texture" id=4] +[ext_resource path="res://sound/SAGI.ogg" type="AudioStream" id=5] [ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=6] [ext_resource path="res://assets/SplashScreen/Title.png" type="Texture" id=7] [ext_resource path="res://assets/Items/torch_ligt_texture.png" type="Texture" id=8] @@ -140,30 +140,29 @@ tracks/9/keys = { [node name="Intro" type="Node2D"] pause_mode = 2 -script = ExtResource( 2 ) -next_scene = ExtResource( 5 ) +script = ExtResource( 1 ) +next_scene = ExtResource( 2 ) [node name="AnimationPlayer" type="AnimationPlayer" parent="."] autoplay = "intro" anims/intro = SubResource( 1 ) [node name="BLANK" type="Sprite" parent="."] -texture = ExtResource( 1 ) +texture = ExtResource( 3 ) centered = false [node name="SAGI" type="Sprite" parent="."] self_modulate = Color( 1, 1, 1, 0.5 ) -position = Vector2( 2, 0 ) -texture = ExtResource( 3 ) +texture = ExtResource( 4 ) centered = false [node name="Light2D" type="Light2D" parent="SAGI"] position = Vector2( 239, 136 ) -texture = ExtResource( 3 ) +texture = ExtResource( 4 ) texture_scale = 2.0 [node name="SplashVoice" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 4 ) +stream = ExtResource( 5 ) autoplay = true [node name="Title" type="Node2D" parent="."] diff --git a/src/Scripts/CutScene.gd b/src/Scripts/CutScene.gd index b5033a1..0b644bd 100644 --- a/src/Scripts/CutScene.gd +++ b/src/Scripts/CutScene.gd @@ -6,14 +6,13 @@ signal cutscene_finished export var scene:PackedScene -var _main_camera_ref:Camera2D -var _camera:Camera2D +var _main_camera_ref:CameraGame +var _camera:CameraGame +var _started := false +var allow_skip := false -func start_scene(camera:Camera2D): - var scene_inst = scene.instance() - add_child(scene_inst) - scene_inst.connect("tree_exited", self, "_on_scene_exited") +func start_scene(camera:CameraGame = null): pass func end_scene(): diff --git a/src/Scripts/SpawnPoint.gd b/src/Scripts/SpawnPoint.gd index 27d7851..6ddaab8 100644 --- a/src/Scripts/SpawnPoint.gd +++ b/src/Scripts/SpawnPoint.gd @@ -1,17 +1,35 @@ extends Position2D tool export var node:PackedScene = null -onready var player_ref:Player = get_tree().current_scene.get_node("Player") +onready var player_ref:Player = get_parent().get_node("Player") func _ready() -> void: - if Engine.editor_hint: - _spawn() - else: - player_ref.connect("died", self, "_on_Player_died") + _spawn() + + + +func _exit_tree() -> void: + if not Engine.editor_hint: + player_ref.disconnect("died", self, "_on_Player_died") + despawn() + + func _on_VisibilityNotifier2D_screen_entered() -> void: + if not Engine.editor_hint: + player_ref.connect("died", self, "_on_Player_died") respawn() +func reset(): + despawn() + respawn() + + +func despawn(): + var current_node = get_node("node") + if current_node != null: + remove_child(current_node) + func respawn(): var current_node = get_node("node") if current_node == null and node != null: @@ -20,6 +38,8 @@ func respawn(): pass func _on_Player_died(): + yield(get_tree().create_timer(.7), "timeout") + despawn() if $VisibilityNotifier2D.is_on_screen(): respawn() diff --git a/src/Scripts/WarpZone.gd b/src/Scripts/WarpZone.gd new file mode 100644 index 0000000..cb3b1d1 --- /dev/null +++ b/src/Scripts/WarpZone.gd @@ -0,0 +1,12 @@ +extends Area2D + +class_name WarpZone + +signal player_entered + +export(int,-1, 3) var zone = -1; +export var is_exit:bool = true + +func _on_body_entered(body:Node): + if body.name == "Player" and get_parent().is_active_level: + emit_signal("player_entered", is_exit, zone) diff --git a/src/Scripts/WarpZone.tscn b/src/Scripts/WarpZone.tscn new file mode 100644 index 0000000..96bd049 --- /dev/null +++ b/src/Scripts/WarpZone.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/Scripts/WarpZone.gd" type="Script" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 16, 16 ) + +[node name="WarpZone" type="Area2D"] +collision_layer = 0 +script = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, -16 ) +shape = SubResource( 1 ) +[connection signal="body_entered" from="." to="." method="_on_body_entered"] diff --git a/src/Singletons/GameState.gd b/src/Singletons/GameState.gd index ae47d6b..0ff1f3a 100644 --- a/src/Singletons/GameState.gd +++ b/src/Singletons/GameState.gd @@ -18,7 +18,7 @@ enum States{ var _SAVE_FILE_PATH = "user://data" # Change key in release var _ENCRYPTION_KEY = "fas3uyf076HJsiUDs24dfI9" - +var is_first_run = false var _SCENES := { States.MAIN_MENU: "res://src/Menu/MainMenu.tscn", States.NEW_GAME: "res://src/GameWorld/GameWorld.tscn", @@ -66,7 +66,8 @@ var _state = States.INTRO func _ready() -> void: load_data() - print(_data) + for key in _data: + print("[%s]: %s" % [key, _data[key]]) func _physics_process(delta: float) -> void: if _state == States.GAME: @@ -78,6 +79,7 @@ func load_data(): var e = data_file.open_encrypted_with_pass(_SAVE_FILE_PATH, File.READ, _ENCRYPTION_KEY) if e != 0: data_file.close() + is_first_run = true save_data() else: var saved_data:Dictionary = data_file.get_var() @@ -93,8 +95,8 @@ func load_data(): func save_data(): var data_file = File.new() - print(data_file.open_encrypted_with_pass(_SAVE_FILE_PATH, File.WRITE, _ENCRYPTION_KEY)) - print(data_file.store_var(_data)) + data_file.open_encrypted_with_pass(_SAVE_FILE_PATH, File.WRITE, _ENCRYPTION_KEY) + data_file.store_var(_data) data_file.close() pass @@ -110,10 +112,10 @@ func start_new_game(from_main_menu:bool=false, change_music:bool=true): yield(self, "scene_changed") # get_tree().change_scene_to(load(_SCENES[_state])) -func start_cutscene(): - _state = States.CUTSCENE -func end_cutscene(state:int = States.GAME): + +func set_state(state:int = States.GAME): _state = state + func get_heigh_score(): return _data.heigh_score.duplicate() func get_statistics(): @@ -137,16 +139,10 @@ func _change_scene(state:int,duration:float=1): _state = state emit_signal("scene_changed") -func player_died(player:Player): +func player_died(): _run_data.deaths += 1 _data.statistics.deaths += 1 - var prev_state = _state - _state = States.TRANSITIONING - Stage.fade_out(.8) - yield(Stage, "fade_finished") - Stage.fade_in(.8) - yield(Stage, "fade_finished") - _state = prev_state + func coin_collected(): _run_data.coins += 10 diff --git a/src/Singletons/Stage.tscn b/src/Singletons/Stage.tscn index d20f903..7fb7336 100644 --- a/src/Singletons/Stage.tscn +++ b/src/Singletons/Stage.tscn @@ -14,5 +14,4 @@ color = Color( 0, 0, 0, 1 ) __meta__ = { "_edit_use_anchors_": false } -[connection signal="tween_completed" from="Tween" to="." method="_on_fade_finished"] [connection signal="tween_completed" from="Tween" to="." method="_on_Tween_tween_completed"]