diff --git a/addons/godot_state_charts/state_chart_debug.gd b/addons/godot_state_charts/state_chart_debug.gd index 60e126c..9873cfa 100644 --- a/addons/godot_state_charts/state_chart_debug.gd +++ b/addons/godot_state_charts/state_chart_debug.gd @@ -3,8 +3,11 @@ extends Tree var target: StateChart = null +func _init() -> void: + set("custom_styles/bg", StyleBoxEmpty.new()) + func _physics_process(delta: float) -> void: - if target is StateChart: + if target is StateChart and visible: clear() var root_state = target.get_child(0) if root_state is State: diff --git a/autoloads/debug.gd b/autoloads/debug.gd index 14bd343..82dd7ad 100644 --- a/autoloads/debug.gd +++ b/autoloads/debug.gd @@ -36,7 +36,7 @@ func _physics_process(delta): if Input.is_action_pressed("debug_move_player"): var nodes = get_tree().get_nodes_in_group("player") if not nodes.empty(): - var player = nodes[0].get_parent() + var player = nodes[0] var mouse_position = SceneManager.viewport.get_mouse_position() / SceneManager.viewport_container.rect_scale mouse_position.x = clamp(mouse_position.x, 8.0, Game.resolution.x - 8.0) mouse_position.y = clamp(mouse_position.y, 8.0, Game.resolution.y - 8.0) diff --git a/autoloads/game.gd b/autoloads/game.gd index 5312e86..5aad72b 100644 --- a/autoloads/game.gd +++ b/autoloads/game.gd @@ -126,3 +126,26 @@ func freeze_frame(time): #Check if 100%ed func has_collection_bonus(): return shards == 5 && golds == 50 + +# called when player dies +func _on_player_died() -> void: + if lives <= 0 and use_lives: + Audio.play_sound(Audio.a_gover, Audio.ac_die) + get_tree().get_nodes_in_group("player")[0].queue_free() + var time_tween = create_tween() + time_tween.tween_property(Engine, "time_scale", 0.1, 0.3) + Audio.ac_music.stream_paused = true + yield(time_tween, "finished") + yield(get_tree().create_timer(1.0 * 0.1), "timeout") + call_deferred("restart_level") + else: + # count death + lives -= 1 + deaths += 1 + # play death sound + Audio.play_sound(Audio.a_die, Audio.ac_die) + # death score penalty + if use_lives == false && lives < 0: + score = max(0, score - 500) + # freezeframe + Game.freeze_frame(0.3) diff --git a/graphics/particles/bullet_casing.png b/graphics/particles/bullet_casing.png new file mode 100644 index 0000000..6cb1c1d Binary files /dev/null and b/graphics/particles/bullet_casing.png differ diff --git a/graphics/particles/bullet_casing.png.import b/graphics/particles/bullet_casing.png.import new file mode 100644 index 0000000..56f415e --- /dev/null +++ b/graphics/particles/bullet_casing.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/bullet_casing.png-8bc5e58567bcb82b42eb851699be796d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/particles/bullet_casing.png" +dest_files=[ "res://.import/bullet_casing.png-8bc5e58567bcb82b42eb851699be796d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/abyss.tscn b/maps/abyss.tscn index 779295d..247e5ec 100644 --- a/maps/abyss.tscn +++ b/maps/abyss.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://audio/music/moon_trail.mp3" type="AudioStream" id=5] [ext_resource path="res://graphics/tiles/abyss.png" type="Texture" id=6] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=7] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=8] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=8] [ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=9] [ext_resource path="res://graphics/particles/bubble.png" type="Texture" id=10] [ext_resource path="res://objects/enemy/mine.tscn" type="PackedScene" id=11] @@ -190,11 +190,7 @@ color_initial_ramp = SubResource( 11 ) song_name = "@Moon Trail" [node name="Player" parent="." instance=ExtResource( 8 )] -position = Vector2( 16, 48 ) -gravity = 2 -max_fall_speed = 60.0 -jump_force = 80 -doublejump_force = 60 +position = Vector2( 16, 56 ) [node name="LevelBorders" type="StaticBody2D" parent="."] diff --git a/maps/canopy.tscn b/maps/canopy.tscn index 89d8266..8de6dfc 100644 --- a/maps/canopy.tscn +++ b/maps/canopy.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://graphics/backgrounds/canopy.png" type="Texture" id=3] [ext_resource path="res://tilesets/t_canopy.tres" type="TileSet" id=4] [ext_resource path="res://objects/enemy/skelarcher.tscn" type="PackedScene" id=5] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=6] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=6] [ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=7] [ext_resource path="res://scripts/delete_on_game_running.gd" type="Script" id=8] [ext_resource path="res://objects/enemy/spider.tscn" type="PackedScene" id=9] @@ -50,7 +50,7 @@ format = 1 tile_data = PoolIntArray( 9, 0, 65537, 65545, 0, 1, 131081, 0, 1, 196617, -1610612736, 65538, 262161, 0, 65536, 262162, 0, 65537, 262163, 0, 65537, 262164, 0, 65537, 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, 65538, 262189, 0, 65536, 262190, 0, 65537, 262191, 0, 65537, 262192, 0, 65537, 262193, 0, 65537, 262194, 0, 65537, 262195, 0, 65537, 262196, 0, 65537, 262197, 0, 65538, 393216, 0, 65537, 393217, 0, 65537, 393218, 0, 65537, 393219, 0, 65537, 393220, 0, 65537, 393221, 0, 65537, 393222, 0, 65538, 393306, -1610612736, 2, 393307, 0, 65537, 393308, 0, 65537, 393309, 0, 65537, 393310, 0, 65537, 393311, 0, 65538, 458774, 0, 65536, 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, 65538, 458790, 0, 65536, 458791, 0, 65537, 458792, 0, 65537, 458793, 0, 65537, 458794, 0, 65537, 458795, 0, 65538, 458842, 0, 1, 524297, 0, 65536, 524298, 0, 65537, 524299, 0, 65537, 524300, 1610612736, 2, 524361, -1610612736, 2, 524362, 0, 65537, 524363, 0, 65537, 524364, 0, 65537, 524365, 0, 65537, 524366, 0, 65537, 524367, 0, 65537, 524368, 0, 65537, 524369, 1610612736, 3, 524378, 0, 1, 589836, 0, 1, 589870, -1610612736, 2, 589871, 0, 65537, 589872, 0, 65537, 589873, 0, 65537, 589874, 0, 65537, 589875, 0, 65537, 589876, 0, 65537, 589877, 0, 65537, 589878, 0, 65537, 589879, 0, 65537, 589880, 0, 65537, 589881, 0, 65538, 589889, -1610612736, 2, 589890, 0, 65537, 589891, 1610612736, 3, 589897, 0, 1, 589905, 0, 3, 589906, 0, 65537, 589907, 1610612736, 2, 589914, 0, 1, 655372, 0, 3, 655373, 0, 65537, 655374, 0, 65538, 655406, 0, 1, 655423, -1610612736, 2, 655424, 0, 65537, 655425, 536870912, 3, 655427, 0, 2, 655428, 0, 65537, 655429, 0, 65537, 655430, 0, 65537, 655431, 0, 65537, 655432, 0, 65537, 655433, 536870912, 3, 655443, 0, 1, 655450, 0, 1, 720942, 0, 1, 720958, -1610612736, 2, 720959, 536870912, 3, 720979, 0, 3, 720980, 0, 65537, 720981, 1610612736, 3, 720986, 0, 1, 786433, 0, 65536, 786434, 0, 65537, 786435, 0, 65537, 786436, 0, 65538, 786449, 0, 65536, 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, 65537, 786477, 0, 65537, 786478, 536870912, 2, 786480, 0, 65536, 786481, 0, 65537, 786482, 0, 65537, 786483, 0, 65537, 786484, 0, 65537, 786485, 0, 65537, 786486, 0, 65537, 786487, 0, 65537, 786488, 0, 65537, 786489, 0, 65537, 786490, 0, 65538, 786493, 0, 65536, 786494, 536870912, 3, 786517, 536870912, 1, 786522, 0, 1, 852053, 536870912, 1, 852058, 0, 1, 917585, 1073741824, 3, 917586, 0, 65537, 917587, 0, 65538, 917589, -1073741824, 65536, 917593, 0, 65536, 917594, 536870912, 3, 983065, -1610612736, 2, 983066, 0, 65537, 983067, 0, 65537, 983068, 0, 65538, 983107, -1610612736, 2, 983108, 0, 65537, 983109, 0, 65537, 983110, 0, 65537, 983111, 0, 65537, 983112, 0, 65537, 983113, 0, 65537, 983114, 0, 65537, 983115, 0, 65537, 983116, 0, 65537, 983117, 0, 65537, 983118, 0, 65537, 983119, 0, 65537, 983120, 0, 65537, 983121, 536870912, 3, 1048586, -1610612736, 65536, 1048601, 536870912, 1, 1048606, -1610612736, 2, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65538, 1048635, 0, 65536, 1048636, 0, 65537, 1048637, 0, 65537, 1048638, 0, 65537, 1048639, 0, 65537, 1048640, 0, 65537, 1048641, 0, 65537, 1048642, 0, 65537, 1048643, 536870912, 3, 1114112, 0, 65537, 1114113, 0, 65537, 1114114, 0, 65537, 1114115, 0, 65537, 1114116, 0, 65537, 1114117, 0, 65537, 1114118, 0, 65537, 1114119, 0, 65537, 1114120, 0, 65537, 1114121, 0, 65537, 1114122, 536870912, 2, 1114137, 536870912, 1, 1114142, 0, 1, 1179662, 0, 65536, 1179663, 0, 65537, 1179664, 0, 65537, 1179665, 0, 65537, 1179666, 0, 65537, 1179667, 0, 65537, 1179668, 0, 65538, 1179672, 0, 65536, 1179673, 536870912, 3, 1179678, 0, 1, 1179692, 0, 65536, 1179693, 0, 65537, 1179694, 0, 65537, 1179695, 0, 65538, 1179701, 0, 65536, 1179702, 1610612736, 3, 1179717, -1610612736, 2, 1179718, 0, 65537, 1179719, 0, 65537, 1179720, 0, 65537, 1179721, 0, 65537, 1179722, 0, 65537, 1179723, 0, 65537, 1179724, 0, 65537, 1179725, 0, 65537, 1179726, 0, 65537, 1179727, 0, 65537, 1179728, 0, 65537, 1179729, 0, 65537, 1179730, 0, 65537, 1179731, 1610612736, 2, 1245214, 0, 1, 1245238, 0, 2, 1245239, 0, 65537, 1245240, 0, 65538, 1245243, 0, 65536, 1245244, 0, 65537, 1245245, 0, 65537, 1245246, 0, 65537, 1245247, 0, 65537, 1245248, 0, 65537, 1245249, 0, 65537, 1245250, 0, 65537, 1245251, 0, 65537, 1245252, 0, 65537, 1245253, 536870912, 3, 1245267, 0, 1, 1310750, 0, 1, 1310803, 0, 1, 1376286, -1610612736, 65538, 1376339, -1610612736, 65538, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1441836, 0, 0, 1441837, 0, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 0, 0, 1441846, 0, 0, 1441847, 0, 0, 1441848, 0, 0, 1441849, 0, 0, 1441850, 0, 0, 1441851, 0, 0, 1441852, 0, 0, 1441853, 0, 0, 1441854, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441857, 0, 0, 1441858, 0, 0, 1441859, 0, 0, 1441860, 0, 0, 1441861, 0, 0, 1441862, 0, 0, 1441863, 0, 0, 1441867, 0, 0, 1441868, 0, 0, 1441872, 0, 0, 1441873, 0, 0, 1441874, 0, 0, 1441875, 0, 0, 1441876, 0, 0, 1441877, 0, 0, 1441878, 0, 0, 1441879, 0, 0, 1441880, 0, 0, 1441881, 0, 0, 1441882, 0, 0, 1507328, 0, 65537, 1507329, 0, 65537, 1507330, 0, 65537, 1507331, 0, 65537, 1507332, 0, 65537, 1507333, 0, 65537, 1507334, 0, 65537, 1507335, 0, 65537, 1507336, 0, 65537, 1507337, 0, 65537, 1507338, 0, 65537, 1507339, 0, 65537, 1507340, 0, 65537, 1507341, 0, 65537, 1507342, 0, 65537, 1507343, 0, 65537, 1507344, 0, 65537, 1507345, 0, 65537, 1507346, 0, 65537, 1507347, 0, 65537, 1507348, 0, 65537, 1507349, 0, 65537, 1507350, 0, 65537, 1507351, 0, 65537, 1507352, 0, 65537, 1507353, 0, 65537, 1507354, 0, 65537, 1507355, 0, 65537, 1507356, 0, 65537, 1507357, 0, 65537, 1507358, 0, 65537, 1507359, 0, 65537, 1507372, 0, 65537, 1507373, 0, 65537, 1507374, 0, 65537, 1507375, 0, 65537, 1507376, 0, 65537, 1507377, 0, 65537, 1507378, 0, 65537, 1507379, 0, 65537, 1507380, 0, 65537, 1507381, 0, 65537, 1507382, 0, 65537, 1507383, 0, 65537, 1507384, 0, 65537, 1507385, 0, 65537, 1507386, 0, 65537, 1507387, 0, 65537, 1507388, 0, 65537, 1507389, 0, 65537, 1507390, 0, 65537, 1507391, 0, 65537, 1507392, 0, 65537, 1507393, 0, 65537, 1507394, 0, 65537, 1507395, 0, 65537, 1507396, 0, 65537, 1507397, 0, 65537, 1507398, 0, 65537, 1507399, 0, 65537, 1507403, 0, 65537, 1507404, 0, 65537, 1507408, 0, 65537, 1507409, 0, 65537, 1507410, 0, 65537, 1507411, 0, 65537, 1507412, 0, 65537, 1507413, 0, 65537, 1507414, 0, 65537, 1507415, 0, 65537, 1507416, 0, 65537, 1507417, 0, 65537, 1507418, 0, 65537 ) [node name="Player" parent="." instance=ExtResource( 6 )] -position = Vector2( 24, 166 ) +position = Vector2( 24, 176 ) [node name="Ladder" type="TileMap" parent="."] tile_set = ExtResource( 19 ) diff --git a/maps/cave.tscn b/maps/cave.tscn index 87323e7..2366035 100644 --- a/maps/cave.tscn +++ b/maps/cave.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=26 format=2] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=1] [ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2] [ext_resource path="res://objects/environment/rock/rock.tscn" type="PackedScene" id=3] [ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=4] @@ -56,7 +56,7 @@ format = 1 tile_data = PoolIntArray( 36, 0, 0, 65572, 0, 0, 131108, 0, 0, 131155, 0, 65537, 131156, 0, 65537, 196644, 0, 65537, 196645, 0, 65537, 196646, 0, 65537, 196697, 0, 262145, 262153, 0, 65537, 262154, 0, 65537, 262155, 0, 65537, 262156, 0, 0, 262159, 0, 65537, 262160, 0, 65537, 262161, 0, 65537, 262162, 0, 65537, 262163, 0, 65537, 262164, 0, 65537, 262165, 0, 65537, 262216, 0, 65537, 262217, 0, 65537, 262218, 0, 65537, 262229, 0, 65537, 262230, 0, 65537, 262231, 0, 65537, 262232, 0, 65537, 262233, 0, 65537, 262234, 0, 65537, 327685, 0, 65537, 327686, 0, 65537, 327687, 0, 65537, 327692, 0, 0, 327727, 0, 65537, 327728, 0, 65537, 327729, 0, 65537, 327734, 0, 262144, 327738, 0, 262145, 327748, 0, 262145, 327771, 0, 65537, 327772, 0, 65537, 327773, 0, 65537, 393228, 0, 0, 393240, 0, 262145, 393249, 0, 262145, 393258, 0, 65537, 393259, 0, 65537, 393260, 0, 65537, 393269, 0, 65537, 393270, 0, 65537, 393271, 0, 65537, 393272, 0, 65537, 393273, 0, 65537, 393274, 0, 65537, 393275, 0, 65537, 393276, 0, 65537, 393277, 0, 65537, 393279, 0, 0, 393280, 0, 65537, 393281, 0, 65537, 393282, 0, 65537, 393283, 0, 65537, 393284, 0, 65537, 393285, 0, 65537, 393292, 0, 65537, 458763, 0, 65537, 458764, 0, 65537, 458774, 0, 65537, 458775, 0, 65537, 458776, 0, 65537, 458777, 0, 65537, 458778, 0, 65537, 458779, 0, 65537, 458782, 0, 65537, 458783, 0, 65537, 458784, 0, 65537, 458785, 0, 65537, 458786, 0, 65537, 458787, 0, 65537, 458815, 0, 0, 524351, 0, 0, 655365, 0, 262145, 720896, 0, 65537, 720897, 0, 65537, 720898, 0, 65537, 720899, 0, 65537, 720900, 0, 65537, 720901, 0, 65537, 720902, 0, 65537, 720903, 0, 65537, 720904, 0, 65537, 720905, 0, 65537, 720919, 0, 0, 720931, 0, 262145, 720954, 0, 262144, 720972, 0, 262145, 720982, 0, 262145, 786448, 0, 262144, 786452, 0, 262145, 786455, 0, 65537, 786456, 0, 65537, 786457, 0, 65537, 786458, 0, 0, 786464, 0, 65537, 786465, 0, 65537, 786466, 0, 65537, 786467, 0, 65537, 786468, 0, 65537, 786469, 0, 65537, 786477, 0, 65537, 786478, 0, 65537, 786479, 0, 65537, 786480, 0, 65537, 786481, 0, 65537, 786485, 0, 65537, 786486, 0, 65537, 786487, 0, 65537, 786488, 0, 65537, 786489, 0, 65537, 786490, 0, 65537, 786491, 0, 65537, 786494, 0, 0, 786495, 0, 0, 786496, 0, 65537, 786497, 0, 65537, 786498, 0, 65537, 786499, 0, 65537, 786500, 0, 65537, 786501, 0, 65537, 786502, 0, 65537, 786503, 0, 65537, 786504, 0, 65537, 786505, 0, 65537, 786506, 0, 65537, 786507, 0, 65537, 786508, 0, 65537, 786509, 0, 65537, 786510, 0, 65537, 786511, 0, 65537, 786512, 0, 65537, 786513, 0, 65537, 786514, 0, 65537, 786515, 0, 65537, 786516, 0, 65537, 786517, 0, 65537, 786518, 0, 65537, 786519, 0, 65537, 786520, 0, 65537, 786521, 0, 0, 786526, 0, 65537, 786527, 0, 65537, 851984, 0, 65537, 851985, 0, 65537, 851986, 0, 65537, 851987, 0, 65537, 851988, 0, 65537, 851989, 0, 65537, 851994, 0, 0, 852030, 0, 0, 852031, 0, 0, 852057, 0, 0, 917509, 0, 262144, 917530, 0, 0, 917566, 0, 0, 917567, 0, 0, 917593, 0, 0, 983040, 0, 65537, 983043, 0, 0, 983044, 0, 65537, 983045, 0, 65537, 983046, 0, 65537, 983047, 0, 65537, 983048, 0, 65537, 983049, 0, 65537, 983050, 0, 65537, 983051, 0, 65537, 983066, 0, 0, 983084, 0, 262145, 983102, 0, 0, 983103, 0, 0, 983113, 0, 262144, 983129, 0, 0, 1048579, 0, 0, 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, 1048607, 0, 131072, 1048608, 0, 0, 1048609, 0, 0, 1048610, 0, 0, 1048611, 0, 0, 1048612, 0, 0, 1048613, 0, 131073, 1048617, 0, 131072, 1048618, 0, 0, 1048619, 0, 0, 1048620, 0, 0, 1048621, 0, 0, 1048622, 0, 0, 1048623, 0, 0, 1048624, 0, 0, 1048625, 0, 0, 1048626, 0, 0, 1048627, 0, 0, 1048628, 0, 0, 1048629, 0, 0, 1048630, 0, 0, 1048631, 0, 131073, 1048638, 0, 0, 1048639, 0, 0, 1048648, 0, 65537, 1048649, 0, 65537, 1048650, 0, 65537, 1048651, 0, 65537, 1048665, 0, 65537, 1048666, 0, 65537, 1048667, 0, 65537, 1048668, 0, 65537, 1048669, 0, 65537, 1048670, 0, 65537, 1048671, 0, 65537, 1114115, 0, 0, 1114143, 0, 0, 1114144, 0, 0, 1114145, 0, 0, 1114146, 0, 0, 1114147, 0, 0, 1114148, 0, 0, 1114149, 0, 0, 1114153, 0, 0, 1114154, 0, 0, 1114155, 0, 0, 1114156, 0, 0, 1114157, 0, 0, 1114158, 0, 0, 1114159, 0, 65537, 1114160, 0, 65537, 1114161, 0, 0, 1114162, 0, 0, 1114163, 0, 0, 1114164, 0, 65537, 1114165, 0, 65537, 1114166, 0, 0, 1114167, 0, 0, 1114168, 0, 131073, 1114174, 0, 0, 1114175, 0, 0, 1114190, 0, 65537, 1114191, 0, 65537, 1114192, 0, 65537, 1114197, 0, 65537, 1114198, 0, 0, 1179649, 0, 65537, 1179650, 0, 65537, 1179651, 0, 65537, 1179678, 0, 131072, 1179679, 0, 0, 1179680, 0, 0, 1179681, 0, 0, 1179682, 0, 0, 1179683, 0, 0, 1179684, 0, 0, 1179685, 0, 0, 1179689, 0, 0, 1179690, 0, 0, 1179691, 0, 0, 1179692, 0, 0, 1179693, 0, 0, 1179694, 0, 0, 1179697, 0, 0, 1179698, 0, 0, 1179699, 0, 0, 1179702, 0, 0, 1179703, 0, 0, 1179704, 0, 0, 1179710, 0, 0, 1179711, 0, 0, 1179734, 0, 0, 1179741, 0, 262145, 1245192, 0, 65537, 1245193, 0, 65537, 1245194, 0, 65537, 1245195, 0, 65537, 1245213, 0, 131072, 1245214, 0, 0, 1245215, 0, 0, 1245216, 0, 0, 1245217, 0, 0, 1245218, 0, 0, 1245219, 0, 0, 1245220, 0, 0, 1245221, 0, 0, 1245225, 0, 65537, 1245226, 0, 65537, 1245227, 0, 65537, 1245228, 0, 65537, 1245229, 0, 65537, 1245230, 0, 65537, 1245233, 0, 65537, 1245234, 0, 65537, 1245235, 0, 65537, 1245238, 0, 0, 1245239, 0, 0, 1245240, 0, 0, 1245270, 0, 65537, 1245271, 0, 65537, 1245272, 0, 65537, 1245273, 0, 65537, 1245274, 0, 65537, 1245275, 0, 65537, 1245276, 0, 65537, 1245277, 0, 65537, 1245278, 0, 65537, 1245279, 0, 65537, 1310749, 0, 0, 1310750, 0, 0, 1310751, 0, 0, 1310752, 0, 0, 1310753, 0, 0, 1310754, 0, 0, 1310755, 0, 0, 1310756, 0, 0, 1310757, 0, 0, 1310774, 0, 0, 1310775, 0, 0, 1310776, 0, 0, 1376268, 0, 262144, 1376274, 0, 262144, 1376284, 0, 262144, 1376285, 0, 0, 1376286, 0, 0, 1376287, 0, 0, 1376288, 0, 0, 1376289, 0, 0, 1376290, 0, 0, 1376291, 0, 0, 1376292, 0, 0, 1376293, 0, 0, 1376298, 0, 262145, 1376303, 0, 262144, 1376310, 0, 0, 1376311, 0, 0, 1376312, 0, 0, 1376325, 0, 262144, 1376332, 0, 262144, 1376340, 0, 262144, 1376345, 0, 262145, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 0, 1441808, 0, 0, 1441809, 0, 0, 1441810, 0, 0, 1441811, 0, 0, 1441812, 0, 0, 1441813, 0, 0, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 0, 1441833, 0, 0, 1441834, 0, 0, 1441835, 0, 0, 1441836, 0, 0, 1441837, 0, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 0, 0, 1441846, 0, 0, 1441847, 0, 0, 1441848, 0, 0, 1441849, 0, 0, 1441850, 0, 0, 1441851, 0, 0, 1441852, 0, 0, 1441853, 0, 0, 1441854, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441857, 0, 0, 1441858, 0, 0, 1441859, 0, 0, 1441860, 0, 0, 1441861, 0, 0, 1441862, 0, 0, 1441863, 0, 0, 1441864, 0, 0, 1441865, 0, 0, 1441866, 0, 0, 1441867, 0, 0, 1441868, 0, 0, 1441869, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441872, 0, 0, 1441873, 0, 0, 1441874, 0, 0, 1441875, 0, 0, 1441876, 0, 0, 1441877, 0, 0, 1441878, 0, 0, 1441879, 0, 0, 1441880, 0, 0, 1441881, 0, 0, 1441882, 0, 0, 1441883, 0, 0, 1441884, 0, 0, 1441885, 0, 0, 1441886, 0, 0, 1441887, 0, 0, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0, 1507360, 0, 0, 1507361, 0, 0, 1507362, 0, 0, 1507363, 0, 0, 1507364, 0, 0, 1507365, 0, 0, 1507366, 0, 0, 1507367, 0, 0, 1507368, 0, 0, 1507369, 0, 0, 1507370, 0, 0, 1507371, 0, 0, 1507372, 0, 0, 1507373, 0, 0, 1507374, 0, 0, 1507375, 0, 0, 1507376, 0, 0, 1507377, 0, 0, 1507378, 0, 0, 1507379, 0, 0, 1507380, 0, 0, 1507381, 0, 0, 1507382, 0, 0, 1507383, 0, 0, 1507384, 0, 0, 1507385, 0, 0, 1507386, 0, 0, 1507387, 0, 0, 1507388, 0, 0, 1507389, 0, 0, 1507390, 0, 0, 1507391, 0, 0, 1507392, 0, 0, 1507393, 0, 0, 1507394, 0, 0, 1507395, 0, 0, 1507396, 0, 0, 1507397, 0, 0, 1507398, 0, 0, 1507399, 0, 0, 1507400, 0, 0, 1507401, 0, 0, 1507402, 0, 0, 1507403, 0, 0, 1507404, 0, 0, 1507405, 0, 0, 1507406, 0, 0, 1507407, 0, 0, 1507408, 0, 0, 1507409, 0, 0, 1507410, 0, 0, 1507411, 0, 0, 1507412, 0, 0, 1507413, 0, 0, 1507414, 0, 0, 1507415, 0, 0, 1507416, 0, 0, 1507417, 0, 0, 1507418, 0, 0, 1507419, 0, 0, 1507420, 0, 0, 1507421, 0, 0, 1507422, 0, 0, 1507423, 0, 0 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 32, 166 ) +position = Vector2( 32, 176 ) [node name="Ladder" type="TileMap" parent="."] tile_set = ExtResource( 22 ) @@ -118,18 +118,15 @@ position = Vector2( 248, 96 ) [node name="FallingBlock7" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 352, 96 ) -fall_speed = 1.0 [node name="FallingBlock8" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 344, 96 ) -fall_speed = 1.0 [node name="FallingBlock11" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 536, 144 ) [node name="FallingBlock17" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 552, 128 ) -fall_speed = 1.0 [node name="FallingBlock9" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 312, 72 ) @@ -139,22 +136,18 @@ position = Vector2( 328, 56 ) [node name="FallingBlock12" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 616, 32 ) -fall_speed = 1.0 [node name="FallingBlock13" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 624, 32 ) -fall_speed = 1.0 [node name="FallingBlock18" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 576, 80 ) [node name="FallingBlock14" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 632, 32 ) -fall_speed = 1.0 [node name="FallingBlock22" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 648, 24 ) -fall_speed = 1.0 [node name="FallingBlock20" parent="Platforms" instance=ExtResource( 18 )] position = Vector2( 728, 64 ) diff --git a/maps/factory.tscn b/maps/factory.tscn index d6b4c01..1e7a01c 100644 --- a/maps/factory.tscn +++ b/maps/factory.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://maps/map.gd" type="Script" id=1] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=2] [ext_resource path="res://graphics/backgrounds/factory.png" type="Texture" id=3] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=4] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=4] [ext_resource path="res://tilesets/t_factory.tres" type="TileSet" id=5] [ext_resource path="res://objects/environment/tube/tube_entrance.tscn" type="PackedScene" id=6] [ext_resource path="res://objects/environment/tube/tube_exit.tscn" type="PackedScene" id=7] @@ -63,18 +63,15 @@ centered = false [node name="Camera2D" parent="." instance=ExtResource( 2 )] scroll_v = true -[node name="Player" parent="." instance=ExtResource( 4 )] -position = Vector2( 24, 136 ) -__meta__ = { -"_edit_group_": true -} - [node name="Ground" type="TileMap" parent="."] tile_set = ExtResource( 5 ) cell_size = Vector2( 8, 8 ) format = 1 tile_data = PoolIntArray( -65523, 1610612739, 0, -65512, 1610612738, 0, -65509, 1610612737, 0, -65508, 1610612737, 0, -65507, 1610612737, 0, -65506, 1610612737, 0, -65505, 1610612737, 0, -65504, 1610612737, 0, -65503, 1610612737, 0, -65502, 1610612737, 0, 13, 1610612739, 0, 65549, 1610612739, 0, 65554, 0, 0, 65555, 0, 2, 65556, 0, 0, 131085, 1610612739, 0, 131090, -1073741824, 2, 131091, 0, 65536, 131092, -1073741824, 2, 131096, 3, 0, 196621, 1610612739, 0, 196626, 0, 0, 196627, 0, 2, 196628, 0, 0, 196632, 3, 0, 262145, 1610612738, 0, 262148, 1, 0, 262149, 1, 0, 262150, 1, 0, 262151, 1, 0, 262152, 1, 0, 262153, 1, 0, 262154, 1, 0, 262155, 1, 0, 262156, 1, 0, 262157, 2, 0, 262168, 3, 0, 327696, 1610612738, 0, 327699, 1, 0, 327700, 1, 0, 327701, 1, 0, 327702, 1, 0, 327703, 1, 0, 327704, 2, 0, 393233, 0, 65536, 393241, 0, 0, 458753, 1610612739, 0, 524289, 1610612739, 0, 524292, 1610612738, 0, 524295, 1, 0, 524296, 1, 0, 524297, 1, 0, 524298, 1, 0, 524299, 1, 0, 524300, 1, 0, 524301, 1, 0, 524302, 1, 0, 524303, 1, 0, 524304, 1, 0, 524305, 1, 0, 524306, 1, 0, 524307, 1, 0, 524308, 1, 0, 524309, -1073741822, 0, 589825, 1610612739, 0, 655361, 1610612739, 0, 720897, 1610612739, 0, 720900, 3, 0, 720917, 3, 0, 786433, 1610612739, 0, 786436, 3, 0, 786453, 3, 0, 851969, 1610612739, 0, 851989, 3, 0, 917517, 1, 0, 917518, 1, 0, 917519, 1, 0, 917520, 1, 0, 917521, 1, 0, 917522, 1, 0, 917523, 1, 0, 917524, 1, 0, 917525, 2, 0, 1114122, 0, 0, 1114123, 0, 2, 1114124, 0, 2, 1114125, 0, 0, 1179658, -1073741824, 2, 1179659, 0, 65536, 1179660, 0, 65536, 1179661, -1073741824, 2, 1245194, 0, 0, 1245195, 0, 2, 1245196, 0, 2, 1245197, 0, 0, 1310721, 0, 1, 1310722, 0, 2, 1310723, 0, 2, 1310724, 0, 2, 1310725, 0, 2, 1310726, 0, 2, 1310727, 0, 2, 1310728, 0, 2, 1310729, 0, 3 ) +[node name="Player" parent="." instance=ExtResource( 4 )] +position = Vector2( 40, 160 ) + [node name="Ladder2" type="TileMap" parent="."] tile_set = ExtResource( 8 ) cell_size = Vector2( 8, 8 ) diff --git a/maps/graveyard.tscn b/maps/graveyard.tscn index 300824e..a021b3a 100644 --- a/maps/graveyard.tscn +++ b/maps/graveyard.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=20 format=2] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=1] [ext_resource path="res://maps/map.gd" type="Script" id=2] [ext_resource path="res://graphics/backgrounds/night.png" type="Texture" id=3] [ext_resource path="res://tilesets/t_horror.tres" type="TileSet" id=4] @@ -42,7 +42,7 @@ format = 1 tile_data = PoolIntArray( -65537, 1, 0, -130976, 1, 0, -1, 1, 65536, -65493, 0, 0, -65440, 1, 65536, 65535, 1, 65536, 31, 0, 0, 43, 0, 65536, 96, 1, 65536, 131071, 1, 65536, 65567, 0, 65536, 65579, 0, 65536, 65632, 1, 65536, 196607, 1, 65536, 131103, 0, 65536, 131115, 0, 65536, 131168, 1, 65536, 262143, 1, 65536, 196610, 0, 196609, 196611, 0, 196610, 196612, 0, 196610, 196613, 0, 196610, 196614, 0, 196610, 196615, 0, 196610, 196616, 0, 196610, 196617, 0, 196610, 196618, 0, 196610, 196619, 0, 196610, 196620, 0, 196611, 196639, 0, 65536, 196651, 0, 65536, 196668, 1, 1, 196669, 1, 2, 196670, 1, 2, 196671, 1, 2, 196672, 1, 2, 196673, 1, 3, 196695, 1, 196608, 196699, 1, 196609, 196700, 1, 196610, 196701, 1, 196610, 196702, 1, 196611, 196704, 1, 65536, 327679, 1, 131072, 262159, 0, 196609, 262160, 0, 196610, 262161, 0, 196611, 262164, 0, 196609, 262165, 0, 196610, 262166, 0, 196610, 262167, 0, 196610, 262168, 0, 196610, 262169, 0, 196610, 262170, 0, 196611, 262175, 0, 131072, 262187, 0, 65536, 262189, 1, 196609, 262190, 1, 196610, 262191, 1, 196610, 262192, 1, 196610, 262193, 1, 196610, 262194, 1, 196610, 262195, 1, 196610, 262196, 1, 196610, 262197, 1, 196610, 262198, 1, 196610, 262199, 1, 196610, 262200, 1, 196610, 262201, 1, 196610, 262202, 1, 196610, 262203, 1, 196610, 262204, 1, 131074, 262205, 1, 131074, 262206, 1, 131074, 262207, 1, 131074, 262208, 1, 131074, 262209, 1, 131075, 262224, 1, 196609, 262225, 1, 196610, 262226, 1, 196610, 262227, 1, 196611, 262240, 1, 65536, 393215, 0, 196609, 327680, 0, 196611, 327723, 0, 65536, 327752, 1, 196609, 327753, 1, 196610, 327754, 1, 196610, 327755, 1, 196610, 327756, 1, 196611, 327776, 1, 65536, 458751, 1, 0, 393255, 0, 1, 393256, 0, 196610, 393257, 0, 196610, 393258, 0, 196610, 393259, 0, 131075, 393312, 1, 65536, 524287, 1, 65536, 458752, 0, 196609, 458753, 0, 196610, 458754, 0, 196611, 458757, 0, 196609, 458758, 0, 196610, 458759, 0, 196611, 458788, 0, 1, 458789, 0, 196610, 458790, 0, 196610, 458791, 0, 131075, 458813, 1, 1, 458814, 1, 196610, 458815, 1, 196610, 458816, 1, 196610, 458817, 1, 196610, 458818, 1, 196611, 458848, 1, 65536, 589823, 1, 65536, 524321, 0, 1, 524322, 0, 196610, 524323, 0, 196610, 524324, 0, 131075, 524346, 1, 196609, 524347, 1, 196610, 524348, 1, 196610, 524349, 1, 131075, 524379, 1, 1, 524380, 1, 2, 524381, 1, 2, 524382, 1, 2, 524383, 1, 2, 524384, 1, 65539, 655359, 1, 65536, 589854, 0, 1, 589855, 0, 196610, 589856, 0, 196610, 589857, 0, 131075, 589900, 1, 1, 589901, 1, 3, 589915, 1, 131073, 589916, 1, 131074, 589917, 1, 131074, 589918, 1, 131074, 589919, 1, 131074, 589920, 1, 65539, 720895, 1, 65536, 655374, 0, 196609, 655375, 0, 196610, 655376, 0, 196610, 655377, 0, 196610, 655378, 0, 196610, 655379, 0, 196610, 655380, 0, 196610, 655381, 0, 196610, 655382, 0, 196610, 655383, 0, 196610, 655384, 0, 196610, 655385, 0, 196610, 655386, 0, 196611, 655389, 0, 196609, 655390, 0, 131075, 655436, 1, 65537, 655437, 1, 65539, 655442, 1, 196609, 655443, 1, 196611, 655456, 1, 65536, 786431, 1, 65536, 720939, 1, 1, 720940, 1, 2, 720941, 1, 2, 720942, 1, 2, 720943, 1, 2, 720944, 1, 2, 720945, 1, 2, 720946, 1, 2, 720947, 1, 2, 720948, 1, 2, 720949, 1, 3, 720967, 1, 1, 720968, 1, 3, 720972, 1, 131073, 720973, 1, 131075, 720992, 1, 65536, 851967, 1, 65536, 786442, 0, 196609, 786443, 0, 196610, 786444, 0, 196611, 786475, 1, 131073, 786476, 1, 131074, 786477, 1, 131074, 786478, 1, 131074, 786479, 1, 131074, 786480, 1, 65538, 786481, 1, 65538, 786482, 1, 131074, 786483, 1, 131074, 786484, 1, 131074, 786485, 1, 131075, 786490, 1, 196609, 786491, 1, 196610, 786492, 1, 196610, 786493, 1, 196610, 786494, 1, 196610, 786495, 1, 2, 786496, 1, 2, 786497, 1, 3, 786503, 1, 131073, 786504, 1, 131075, 786517, 1, 1, 786518, 1, 3, 786528, 1, 65536, 917503, 1, 65536, 852007, 1, 1, 852008, 1, 3, 852016, 1, 65537, 852017, 1, 65539, 852031, 1, 65537, 852032, 1, 65538, 852033, 1, 65538, 852034, 1, 3, 852040, 0, 0, 852053, 1, 131073, 852054, 1, 131074, 852055, 1, 196610, 852056, 1, 196610, 852057, 1, 196610, 852058, 1, 196610, 852059, 1, 196610, 852060, 1, 196610, 852061, 1, 196610, 852062, 1, 196610, 852063, 1, 196610, 852064, 1, 65539, 983039, 1, 65536, 917528, 0, 196609, 917529, 0, 196610, 917530, 0, 196611, 917543, 1, 131073, 917544, 1, 131075, 917552, 1, 65537, 917553, 1, 65539, 917567, 1, 65537, 917568, 1, 65538, 917569, 1, 131074, 917570, 1, 131075, 917576, 0, 131073, 917577, 0, 196610, 917578, 0, 196610, 917579, 0, 196610, 917580, 0, 3, 917600, 1, 65536, 1048575, 1, 65536, 983048, 1, 1, 983049, 1, 2, 983050, 1, 2, 983051, 1, 2, 983052, 1, 2, 983053, 1, 2, 983054, 1, 3, 983075, 1, 1, 983076, 1, 3, 983088, 1, 65537, 983089, 1, 65539, 983103, 1, 65537, 983104, 1, 65539, 983116, 0, 131073, 983117, 0, 196610, 983118, 0, 196610, 983119, 0, 196611, 983136, 1, 65536, 1114111, 1, 65536, 1048584, 1, 131073, 1048585, 1, 131074, 1048586, 1, 131074, 1048587, 1, 131074, 1048588, 1, 131074, 1048589, 1, 131074, 1048590, 1, 131075, 1048611, 1, 65537, 1048612, 1, 65539, 1048624, 1, 131073, 1048625, 1, 131075, 1048627, 1, 196609, 1048628, 1, 196610, 1048629, 1, 196610, 1048630, 1, 196610, 1048631, 1, 196610, 1048632, 1, 196610, 1048633, 1, 196610, 1048634, 1, 196610, 1048635, 1, 196610, 1048636, 1, 196610, 1048637, 1, 196610, 1048638, 1, 196610, 1048639, 1, 131074, 1048640, 1, 65539, 1048672, 1, 65536, 1179647, 1, 65536, 1114141, 1, 1, 1114142, 1, 2, 1114143, 1, 2, 1114144, 1, 2, 1114145, 1, 2, 1114146, 1, 2, 1114147, 1, 65538, 1114148, 1, 65539, 1114176, 1, 131073, 1114177, 1, 196610, 1114178, 1, 196611, 1114208, 1, 65536, 1245183, 1, 65536, 1179652, 0, 196609, 1179653, 0, 196610, 1179654, 0, 196611, 1179675, 1, 196609, 1179676, 1, 196610, 1179677, 1, 131074, 1179678, 1, 131074, 1179679, 1, 131074, 1179680, 1, 131074, 1179681, 1, 131074, 1179682, 1, 131074, 1179683, 1, 131074, 1179684, 1, 131075, 1179732, 1, 196609, 1179733, 1, 196610, 1179734, 1, 196610, 1179735, 1, 196610, 1179736, 1, 196610, 1179737, 1, 196610, 1179738, 1, 196610, 1179739, 1, 196610, 1179740, 1, 196610, 1179741, 1, 196610, 1179742, 1, 196610, 1179743, 1, 196610, 1179744, 1, 65539, 1310719, 1, 65536, 1245280, 1, 65536, 1376255, 1, 65536, 1310720, 0, 196609, 1310721, 0, 196611, 1310816, 1, 65536, 1441791, 1, 65536, 1376266, 1, 1, 1376267, 1, 2, 1376268, 1, 2, 1376269, 1, 2, 1376270, 1, 2, 1376271, 1, 2, 1376272, 1, 2, 1376273, 1, 2, 1376274, 1, 2, 1376275, 1, 2, 1376276, 1, 2, 1376277, 1, 2, 1376278, 1, 3, 1376281, 3, 1, 1376287, 2, 65537, 1376289, 2, 65536, 1376290, 2, 65536, 1376291, 2, 65536, 1376292, 1, 1, 1376293, 1, 2, 1376294, 1, 3, 1376352, 1, 65536, 1507327, 1, 65537, 1441792, 1, 2, 1441793, 1, 2, 1441794, 1, 2, 1441795, 1, 2, 1441796, 1, 2, 1441797, 1, 2, 1441798, 1, 2, 1441799, 1, 2, 1441800, 1, 2, 1441801, 1, 2, 1441802, 1, 65538, 1441803, 1, 65538, 1441804, 1, 65538, 1441805, 1, 65538, 1441806, 1, 65538, 1441807, 1, 65538, 1441808, 1, 65538, 1441809, 1, 65538, 1441810, 1, 65538, 1441811, 1, 65538, 1441812, 1, 65538, 1441813, 1, 65538, 1441814, 1, 65538, 1441815, 1, 2, 1441816, 1, 2, 1441817, 1, 2, 1441818, 1, 2, 1441819, 1, 2, 1441820, 1, 2, 1441821, 1, 2, 1441822, 1, 2, 1441823, 1, 2, 1441824, 1, 2, 1441825, 1, 2, 1441826, 1, 2, 1441827, 1, 2, 1441828, 1, 65538, 1441829, 1, 65538, 1441830, 1, 65539, 1441836, 1, 1, 1441837, 1, 2, 1441838, 1, 2, 1441839, 1, 2, 1441840, 1, 2, 1441841, 1, 2, 1441842, 1, 2, 1441843, 1, 2, 1441844, 1, 2, 1441845, 1, 3, 1441851, 1, 1, 1441852, 1, 2, 1441853, 1, 2, 1441854, 1, 2, 1441855, 1, 2, 1441856, 1, 2, 1441857, 1, 2, 1441858, 1, 2, 1441859, 1, 2, 1441860, 1, 2, 1441861, 1, 2, 1441862, 1, 2, 1441863, 1, 2, 1441864, 1, 3, 1441870, 1, 1, 1441871, 1, 2, 1441872, 1, 2, 1441873, 1, 2, 1441874, 1, 2, 1441875, 1, 2, 1441876, 1, 2, 1441877, 1, 2, 1441878, 1, 2, 1441879, 1, 2, 1441880, 1, 2, 1441881, 1, 2, 1441882, 1, 2, 1441883, 1, 2, 1441884, 1, 2, 1441885, 1, 2, 1441886, 1, 2, 1441887, 1, 2, 1441888, 1, 65539, 1572863, 1, 65537, 1507328, 1, 65538, 1507329, 1, 65538, 1507330, 1, 65538, 1507331, 1, 65538, 1507332, 1, 65538, 1507333, 1, 65538, 1507334, 1, 65538, 1507335, 1, 65538, 1507336, 1, 65538, 1507337, 1, 65538, 1507338, 1, 65538, 1507339, 1, 65538, 1507340, 1, 65538, 1507341, 1, 65538, 1507342, 1, 65538, 1507343, 1, 65538, 1507344, 1, 65538, 1507345, 1, 65538, 1507346, 1, 65538, 1507347, 1, 65538, 1507348, 1, 65538, 1507349, 1, 65538, 1507350, 1, 65538, 1507351, 1, 65538, 1507352, 1, 65538, 1507353, 1, 65538, 1507354, 1, 65538, 1507355, 1, 65538, 1507356, 1, 65538, 1507357, 1, 65538, 1507358, 1, 65538, 1507359, 1, 65538, 1507360, 1, 65538, 1507361, 1, 65538, 1507362, 1, 65538, 1507363, 1, 65538, 1507364, 1, 65538, 1507365, 1, 65538, 1507366, 1, 65539, 1507372, 1, 65537, 1507373, 1, 65538, 1507374, 1, 65538, 1507375, 1, 65538, 1507376, 1, 65538, 1507377, 1, 65538, 1507378, 1, 65538, 1507379, 1, 65538, 1507380, 1, 65538, 1507381, 1, 65539, 1507387, 1, 65537, 1507388, 1, 65538, 1507389, 1, 65538, 1507390, 1, 65538, 1507391, 1, 65538, 1507392, 1, 65538, 1507393, 1, 65538, 1507394, 1, 65538, 1507395, 1, 65538, 1507396, 1, 65538, 1507397, 1, 65538, 1507398, 1, 65538, 1507399, 1, 65538, 1507400, 1, 65539, 1507406, 1, 65537, 1507407, 1, 65538, 1507408, 1, 65538, 1507409, 1, 65538, 1507410, 1, 65538, 1507411, 1, 65538, 1507412, 1, 65538, 1507413, 1, 65538, 1507414, 1, 65538, 1507415, 1, 65538, 1507416, 1, 65538, 1507417, 1, 65538, 1507418, 1, 65538, 1507419, 1, 65538, 1507420, 1, 65538, 1507421, 1, 65538, 1507422, 1, 65538, 1507423, 1, 65538, 1507424, 1, 65539, 1638399, 1, 131073, 1572864, 1, 131074, 1572865, 1, 131074, 1572866, 1, 131074, 1572867, 1, 131074, 1572868, 1, 131074, 1572869, 1, 131074, 1572870, 1, 131074, 1572871, 1, 131074, 1572872, 1, 131074, 1572873, 1, 131074, 1572874, 1, 131074, 1572875, 1, 131074, 1572876, 1, 131074, 1572877, 1, 131074, 1572878, 1, 131074, 1572879, 1, 131074, 1572880, 1, 131074, 1572881, 1, 131074, 1572882, 1, 131074, 1572883, 1, 131074, 1572884, 1, 131074, 1572885, 1, 131074, 1572886, 1, 131074, 1572887, 1, 131074, 1572888, 1, 131074, 1572889, 1, 131074, 1572890, 1, 131074, 1572891, 1, 131074, 1572892, 1, 131074, 1572893, 1, 131074, 1572894, 1, 131074, 1572895, 1, 131074, 1572896, 1, 131074, 1572897, 1, 131074, 1572898, 1, 131074, 1572899, 1, 131074, 1572900, 1, 131074, 1572901, 1, 131074, 1572902, 1, 131075, 1572908, 1, 131073, 1572909, 1, 131074, 1572910, 1, 131074, 1572911, 1, 131074, 1572912, 1, 131074, 1572913, 1, 131074, 1572914, 1, 131074, 1572915, 1, 131074, 1572916, 1, 131074, 1572917, 1, 131075, 1572923, 1, 131073, 1572924, 1, 131074, 1572925, 1, 131074, 1572926, 1, 131074, 1572927, 1, 131074, 1572928, 1, 131074, 1572929, 1, 131074, 1572930, 1, 131074, 1572931, 1, 131074, 1572932, 1, 131074, 1572933, 1, 131074, 1572934, 1, 131074, 1572935, 1, 131074, 1572936, 1, 131075, 1572942, 1, 131073, 1572943, 1, 131074, 1572944, 1, 131074, 1572945, 1, 131074, 1572946, 1, 131074, 1572947, 1, 131074, 1572948, 1, 131074, 1572949, 1, 131074, 1572950, 1, 131074, 1572951, 1, 131074, 1572952, 1, 131074, 1572953, 1, 131074, 1572954, 1, 131074, 1572955, 1, 131074, 1572956, 1, 131074, 1572957, 1, 131074, 1572958, 1, 131074, 1572959, 1, 131074, 1572960, 1, 131075 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 32, 166 ) +position = Vector2( 32, 176 ) [node name="Camera2D" parent="." instance=ExtResource( 17 )] diff --git a/maps/hills.tscn b/maps/hills.tscn index daff9ab..f066ee2 100644 --- a/maps/hills.tscn +++ b/maps/hills.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=1] [ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=2] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=3] [ext_resource path="res://objects/collectibles/star.tscn" type="PackedScene" id=4] [ext_resource path="res://objects/collectibles/key.tscn" type="PackedScene" id=5] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=6] @@ -25,6 +24,7 @@ [ext_resource path="res://objects/lore/hills/catbat.tscn" type="PackedScene" id=23] [ext_resource path="res://objects/lore/hills/eviscerator.tscn" type="PackedScene" id=24] [ext_resource path="res://objects/lore/hills/verdant_hills.tscn" type="PackedScene" id=25] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=26] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 8, 128 ) @@ -62,8 +62,8 @@ cell_size = Vector2( 8, 8 ) format = 1 tile_data = PoolIntArray( 196660, 2, 2, 196661, 2, 2, 196668, 0, 0, 196669, 0, 0, 196670, 0, 0, 196671, 0, 0, 196672, 0, 0, 196673, 0, 131073, 196675, 2, 3, 262194, 0, 65536, 262195, 0, 65537, 262196, 0, 65537, 262197, 0, 65537, 262198, 0, 65537, 262199, 0, 65538, 262204, 0, 3, 262205, 0, 3, 262206, 0, 3, 262207, 0, 3, 262208, 0, 1, 262209, 0, 131074, 262210, 0, 0, 262211, 0, 0, 262212, 0, 131073, 327683, 0, 65536, 327684, 0, 65537, 327685, 0, 65537, 327686, 0, 65537, 327687, 0, 65537, 327688, 0, 65537, 327689, 0, 65537, 327690, 0, 65537, 327691, 0, 65538, 327696, 2, 2, 327702, 2, 3, 327703, 2, 3, 327715, 2, 2, 327719, 2, 1, 327740, 0, 3, 327741, 0, 3, 327742, 0, 3, 327743, 0, 3, 327744, 0, 3, 327745, 0, 3, 327746, 0, 3, 327747, 0, 3, 327748, 0, 131074, 327749, 0, 131073, 327755, 2, 2, 327763, 2, 1, 327765, 2, 0, 327769, 2, 1, 327771, 2, 0, 393231, 0, 65536, 393232, 0, 65537, 393233, 0, 65538, 393236, 0, 65536, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65538, 393244, 0, 65536, 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, 65537, 393258, 0, 65537, 393259, 0, 65538, 393276, 0, 3, 393277, 0, 3, 393278, 0, 3, 393279, 0, 3, 393280, 0, 3, 393281, 0, 3, 393282, 0, 3, 393283, 0, 3, 393284, 0, 3, 393285, 0, 3, 393290, 0, 65536, 393291, 0, 65537, 393292, 0, 65538, 393299, 0, 65536, 393300, 0, 65537, 393301, 0, 65537, 393302, 0, 65537, 393303, 0, 65537, 393304, 0, 65537, 393305, 0, 65537, 393306, 0, 65537, 393307, 0, 65537, 393308, 0, 65537, 393309, 0, 65537, 393310, 0, 65537, 393311, 0, 65537, 458812, 0, 3, 458813, 0, 3, 458814, 0, 3, 458815, 0, 3, 458816, 0, 3, 458817, 0, 3, 458818, 0, 3, 458819, 0, 3, 458820, 0, 3, 458821, 0, 3, 524348, 0, 3, 524349, 0, 3, 524350, 0, 3, 524351, 0, 3, 524352, 0, 3, 524353, 0, 3, 524354, 0, 3, 524355, 0, 3, 524356, 0, 3, 524357, 0, 3, 589844, 0, 65536, 589845, 0, 65537, 589846, 0, 65537, 589847, 0, 65537, 589848, 0, 65537, 589849, 0, 65538, 589854, 0, 65536, 589855, 0, 65537, 589856, 0, 65537, 589857, 0, 65537, 589858, 0, 65538, 589884, 0, 3, 589885, 0, 3, 589886, 0, 3, 589887, 0, 3, 589888, 0, 3, 589889, 0, 3, 589890, 0, 3, 589891, 0, 3, 589892, 0, 3, 589893, 0, 3, 655367, 0, 65536, 655368, 0, 65537, 655369, 0, 65537, 655370, 0, 65537, 655371, 0, 65537, 655372, 0, 65537, 655373, 0, 65538, 655407, 2, 1, 655410, 2, 3, 655413, 2, 2, 655416, 2, 0, 655420, 0, 3, 655421, 0, 3, 655422, 0, 3, 655423, 0, 3, 655424, 0, 3, 655425, 0, 3, 655426, 0, 3, 655427, 0, 3, 655428, 0, 3, 655429, 0, 3, 655431, 2, 2, 655443, 0, 65536, 655444, 0, 65537, 655445, 0, 65538, 720906, 0, 196611, 720942, 0, 131072, 720943, 0, 0, 720944, 0, 0, 720945, 0, 0, 720946, 0, 0, 720947, 0, 0, 720948, 0, 0, 720949, 0, 0, 720950, 0, 0, 720951, 0, 0, 720952, 0, 0, 720953, 0, 0, 720954, 0, 0, 720955, 0, 0, 720956, 0, 0, 720957, 0, 0, 720958, 0, 0, 720959, 0, 0, 720960, 0, 0, 720961, 0, 0, 720962, 0, 0, 720963, 0, 0, 720964, 0, 0, 720965, 0, 0, 720966, 0, 0, 720967, 0, 0, 720968, 0, 0, 720979, 2, 3, 720981, 2, 3, 720990, 2, 0, 786442, 0, 196610, 786477, 0, 131072, 786478, 0, 131075, 786479, 0, 3, 786480, 0, 3, 786481, 0, 3, 786482, 0, 3, 786483, 0, 3, 786484, 0, 3, 786485, 0, 3, 786486, 0, 3, 786487, 0, 3, 786488, 0, 3, 786489, 0, 3, 786490, 0, 3, 786491, 0, 3, 786492, 0, 3, 786493, 0, 3, 786494, 0, 3, 786495, 0, 3, 786496, 0, 3, 786497, 0, 3, 786498, 0, 3, 786499, 0, 3, 786500, 0, 3, 786501, 0, 3, 786502, 0, 3, 786513, 0, 65536, 786514, 0, 65537, 786515, 0, 65537, 786516, 0, 65537, 786517, 0, 65537, 786518, 0, 65537, 786519, 0, 65538, 786524, 0, 65536, 786525, 0, 65537, 786526, 0, 65537, 786527, 0, 65537, 851968, 0, 65537, 851969, 0, 65537, 851970, 0, 65537, 851971, 0, 65537, 851972, 0, 65537, 851973, 0, 65538, 851978, 0, 65539, 851989, 2, 2, 852006, 2, 1, 852008, 2, 1, 852010, 2, 1, 852012, 0, 131072, 852013, 0, 131075, 852014, 0, 3, 852015, 0, 3, 852016, 0, 3, 852017, 0, 3, 852018, 0, 3, 852019, 0, 3, 852020, 0, 3, 852021, 0, 3, 852022, 0, 3, 852023, 0, 3, 852024, 0, 3, 852025, 0, 3, 852026, 0, 3, 852027, 0, 3, 852028, 0, 3, 852029, 0, 3, 852030, 0, 3, 852031, 0, 3, 852032, 0, 3, 852033, 0, 3, 852034, 0, 3, 852035, 0, 3, 852036, 0, 3, 852037, 0, 3, 852038, 0, 3, 917514, 0, 65536, 917515, 0, 65537, 917516, 0, 65537, 917517, 0, 65537, 917518, 0, 65537, 917519, 0, 65537, 917520, 0, 65537, 917521, 0, 65538, 917525, 0, 65536, 917526, 0, 65537, 917527, 0, 65537, 917528, 0, 65537, 917529, 0, 65537, 917530, 0, 65537, 917531, 0, 65537, 917532, 0, 65537, 917533, 0, 65537, 917534, 0, 65537, 917535, 0, 65537, 917536, 0, 65537, 917537, 0, 65537, 917538, 0, 65538, 917541, 0, 65536, 917542, 0, 65537, 917543, 0, 65537, 917544, 0, 65537, 917545, 0, 65537, 917546, 0, 65537, 917547, 0, 65537, 917548, 0, 131075, 917549, 0, 3, 917550, 0, 3, 917551, 0, 3, 917552, 0, 3, 917553, 0, 3, 917554, 0, 3, 917555, 0, 3, 917556, 0, 3, 917557, 0, 3, 917558, 0, 3, 917559, 0, 3, 917560, 0, 3, 917561, 0, 3, 917562, 0, 3, 917563, 0, 3, 917564, 0, 3, 917565, 0, 3, 917566, 0, 3, 917567, 0, 3, 917568, 0, 3, 917569, 0, 3, 917570, 0, 3, 917571, 0, 3, 917573, 0, 131072, 917574, 0, 131073, 983084, 0, 3, 983085, 0, 3, 983086, 0, 3, 983087, 0, 3, 983088, 0, 3, 983089, 0, 3, 983090, 0, 3, 983091, 0, 3, 983092, 0, 3, 983093, 0, 3, 983094, 0, 3, 983095, 0, 3, 983096, 0, 3, 983097, 0, 3, 983098, 0, 3, 983099, 0, 3, 983100, 0, 3, 983101, 0, 3, 983102, 0, 3, 983103, 0, 3, 983104, 0, 3, 983105, 0, 3, 983106, 0, 3, 983107, 0, 3, 983108, 0, 131072, 983109, 0, 131075, 983110, 536870912, 2, 1048598, 2, 0, 1048600, 2, 1, 1048603, 2, 3, 1048606, 2, 2, 1048620, 0, 3, 1048621, 0, 3, 1048622, 0, 3, 1048623, 0, 3, 1048624, 0, 3, 1048625, 0, 3, 1048626, 0, 3, 1048627, 0, 3, 1048628, 0, 3, 1048629, 0, 3, 1048630, 0, 3, 1048631, 0, 3, 1048632, 0, 3, 1048633, 0, 3, 1048634, 0, 3, 1048635, 0, 3, 1048636, 0, 3, 1048637, 0, 3, 1048638, 0, 3, 1048639, 0, 3, 1048640, 0, 3, 1048641, 0, 3, 1048642, 0, 3, 1048643, 0, 131072, 1048644, 0, 131075, 1048645, 0, 1, 1048646, 536870912, 2, 1048657, 2, 2, 1048658, 2, 2, 1048660, 2, 2, 1048661, 2, 2, 1048669, 2, 2, 1114133, 0, 65536, 1114134, 0, 65537, 1114135, 0, 65537, 1114136, 0, 65537, 1114137, 0, 65537, 1114138, 0, 65537, 1114139, 0, 65537, 1114140, 0, 65537, 1114141, 0, 65537, 1114142, 0, 65537, 1114143, 0, 65537, 1114144, 0, 65537, 1114145, 0, 65537, 1114146, 0, 65538, 1114154, 2, 2, 1114156, 0, 3, 1114157, 0, 3, 1114158, 0, 3, 1114159, 0, 3, 1114160, 0, 3, 1114161, 0, 3, 1114162, 0, 3, 1114163, 0, 3, 1114165, 0, 65536, 1114166, 0, 0, 1114167, 0, 0, 1114168, 0, 0, 1114169, 0, 0, 1114170, 0, 0, 1114171, 0, 0, 1114172, 0, 0, 1114173, 0, 0, 1114174, 0, 0, 1114175, 0, 0, 1114176, 536870912, 0, 1114177, 536870912, 0, 1114178, 536870912, 0, 1114179, 0, 131075, 1114180, 0, 1, 1114181, 0, 1, 1114182, 0, 131074, 1114183, 0, 0, 1114184, 536870912, 0, 1114193, 0, 65536, 1114194, 0, 65537, 1114195, 0, 65537, 1114196, 0, 65537, 1114197, 0, 65538, 1114204, 0, 65536, 1114205, 0, 65537, 1114206, 0, 65537, 1114207, 0, 65537, 1179649, 0, 65536, 1179650, 0, 65537, 1179651, 0, 65538, 1179654, 0, 65536, 1179655, 0, 65537, 1179656, 0, 65537, 1179657, 0, 65537, 1179658, 0, 65537, 1179659, 0, 65537, 1179660, 0, 65537, 1179661, 0, 65537, 1179662, 0, 65538, 1179688, 0, 131072, 1179689, 0, 0, 1179690, 0, 0, 1179691, 0, 0, 1179692, 0, 131073, 1179693, 0, 3, 1179694, 0, 3, 1179695, 0, 3, 1179696, 0, 3, 1179697, 0, 3, 1179698, 0, 3, 1179699, 0, 3, 1179700, 0, 3, 1179701, 0, 3, 1179702, 0, 3, 1179703, 0, 3, 1179704, 0, 3, 1179705, 0, 3, 1179706, 0, 3, 1179707, 0, 3, 1179708, 0, 3, 1179709, 0, 3, 1179710, 0, 3, 1179711, 536870912, 1, 1179712, 0, 1, 1179713, 536870912, 3, 1179714, 536870912, 3, 1179715, 536870912, 3, 1179716, 536870912, 3, 1179717, 536870912, 3, 1179718, 536870912, 3, 1179719, 536870912, 3, 1179720, 536870912, 3, 1245202, 2, 2, 1245224, 0, 2, 1245225, 0, 1, 1245226, 0, 1, 1245227, 0, 1, 1245228, 536870912, 2, 1245229, 0, 3, 1245230, 0, 3, 1245231, 0, 3, 1245232, 0, 3, 1245233, 0, 3, 1245234, 0, 3, 1245235, 0, 3, 1245236, 0, 3, 1245237, 0, 3, 1245238, 0, 3, 1245239, 0, 3, 1245240, 0, 3, 1245241, 0, 3, 1245242, 0, 3, 1245243, 0, 3, 1245244, 0, 3, 1245245, 0, 3, 1245246, 0, 3, 1245247, 536870912, 1, 1245248, 0, 1, 1245249, 536870912, 3, 1245250, 536870912, 3, 1245251, 536870912, 3, 1245252, 536870912, 3, 1245253, 536870912, 3, 1245254, 536870912, 3, 1245255, 536870912, 3, 1245256, 536870912, 3, 1310736, 0, 131072, 1310737, 536870912, 0, 1310738, 536870912, 0, 1310739, 536870912, 0, 1310740, 0, 131073, 1310760, 0, 2, 1310761, 0, 1, 1310762, 0, 1, 1310763, 0, 1, 1310764, 536870912, 2, 1310765, 0, 3, 1310766, 0, 3, 1310767, 0, 3, 1310768, 0, 3, 1310769, 0, 3, 1310770, 0, 3, 1310772, 0, 3, 1310773, 0, 3, 1310774, 0, 3, 1310775, 0, 3, 1310776, 0, 3, 1310777, 0, 3, 1310778, 0, 3, 1310779, 0, 3, 1310780, 0, 3, 1310781, 0, 3, 1310782, 0, 3, 1310783, 536870912, 1, 1310784, 0, 1, 1310785, 536870912, 3, 1310786, 536870912, 3, 1310787, 536870912, 3, 1310788, 536870912, 3, 1310789, 536870912, 3, 1310790, 536870912, 3, 1310791, 536870912, 3, 1310792, 536870912, 3, 1376257, 2, 0, 1376261, 2, 1, 1376263, 2, 2, 1376266, 2, 2, 1376269, 2, 3, 1376271, 0, 131072, 1376272, 0, 131075, 1376273, 536870912, 1, 1376274, 536870912, 1, 1376275, 536870912, 1, 1376276, 0, 131074, 1376277, 0, 131073, 1376279, 2, 3, 1376281, 2, 1, 1376283, 2, 3, 1376285, 2, 0, 1376296, 0, 2, 1376297, 0, 1, 1376298, 0, 1, 1376299, 0, 1, 1376300, 536870912, 2, 1376301, 0, 3, 1376302, 0, 3, 1376303, 0, 3, 1376304, 0, 3, 1376305, 0, 3, 1376306, 0, 3, 1376307, 0, 3, 1376308, 0, 3, 1376309, 0, 3, 1376310, 0, 3, 1376311, 0, 3, 1376312, 0, 3, 1376313, 0, 3, 1376314, 0, 3, 1376315, 0, 3, 1376316, 0, 3, 1376317, 0, 3, 1376318, 0, 3, 1376319, 536870912, 1, 1376320, 0, 1, 1376321, 536870912, 3, 1376322, 536870912, 3, 1376323, 536870912, 3, 1376324, 536870912, 3, 1376325, 536870912, 3, 1376326, 536870912, 3, 1376327, 536870912, 3, 1376328, 536870912, 3, 1376331, 2, 2, 1376333, 2, 0, 1376336, 2, 3, 1376338, 2, 2, 1376340, 2, 1, 1376342, 2, 0, 1376344, 2, 2, 1376346, 2, 3, 1376349, 2, 0, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 131075, 1441808, 0, 1, 1441809, 0, 1, 1441810, 0, 1, 1441811, 0, 1, 1441812, 0, 1, 1441813, 0, 131074, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 131075, 1441833, 0, 1, 1441834, 0, 1, 1441835, 0, 1, 1441836, 0, 131074, 1441837, 0, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 0, 0, 1441846, 0, 0, 1441847, 0, 0, 1441848, 0, 0, 1441849, 0, 0, 1441850, 0, 0, 1441851, 0, 0, 1441852, 0, 0, 1441853, 0, 0, 1441854, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441857, 0, 0, 1441858, 0, 0, 1441859, 0, 0, 1441860, 0, 0, 1441861, 0, 0, 1441862, 0, 0, 1441863, 0, 0, 1441864, 0, 0, 1441865, 0, 0, 1441866, 0, 0, 1441867, 0, 0, 1441868, 0, 0, 1441869, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441872, 0, 0, 1441873, 0, 0, 1441874, 0, 0, 1441875, 0, 0, 1441876, 0, 0, 1441877, 0, 0, 1441878, 0, 0, 1441879, 0, 0, 1441880, 0, 0, 1441881, 0, 0, 1441882, 0, 0, 1441883, 0, 0, 1441884, 0, 0, 1441885, 0, 0, 1441886, 0, 0, 1441887, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507335, 0, 1, 1507336, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507352, 0, 1, 1507353, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1, 1507360, 0, 1, 1507361, 0, 1, 1507362, 0, 1, 1507363, 0, 1, 1507364, 0, 1, 1507365, 0, 1, 1507366, 0, 1, 1507367, 0, 1, 1507368, 0, 1, 1507369, 0, 1, 1507370, 0, 1, 1507371, 0, 1, 1507372, 0, 1, 1507373, 0, 1, 1507374, 0, 1, 1507375, 0, 1, 1507376, 0, 1, 1507377, 0, 1, 1507378, 0, 1, 1507379, 0, 1, 1507380, 0, 1, 1507381, 0, 1, 1507382, 0, 1, 1507383, 0, 1, 1507384, 0, 1, 1507385, 0, 1, 1507386, 0, 1, 1507387, 0, 1, 1507388, 0, 1, 1507389, 0, 1, 1507390, 0, 1, 1507391, 0, 1, 1507392, 0, 1, 1507393, 0, 1, 1507394, 0, 1, 1507395, 0, 1, 1507396, 0, 1, 1507397, 0, 1, 1507398, 0, 1, 1507399, 0, 1, 1507400, 0, 1, 1507401, 0, 1, 1507402, 0, 1, 1507403, 0, 1, 1507404, 0, 1, 1507405, 0, 1, 1507406, 0, 1, 1507407, 0, 1, 1507408, 0, 1, 1507409, 0, 1, 1507410, 0, 1, 1507411, 0, 1, 1507412, 0, 1, 1507413, 0, 1, 1507414, 0, 1, 1507415, 0, 1, 1507416, 0, 1, 1507417, 0, 1, 1507418, 0, 1, 1507419, 0, 1, 1507420, 0, 1, 1507421, 0, 1, 1507422, 0, 1, 1507423, 0, 1 ) -[node name="Player" parent="." instance=ExtResource( 3 )] -position = Vector2( 32, 166 ) +[node name="Player" parent="." instance=ExtResource( 26 )] +position = Vector2( 32, 176 ) [node name="Death" type="TileMap" parent="."] tile_set = ExtResource( 9 ) diff --git a/maps/level_select.gd b/maps/level_select.gd index cf793aa..1c18907 100644 --- a/maps/level_select.gd +++ b/maps/level_select.gd @@ -11,7 +11,7 @@ onready var levelarrow_up = $LevelArrowUp onready var levelarrow_down = $LevelArrowDown onready var lives_mode_text = $LivesModeText onready var easy_mode_text = $EasyModeText - #Shards +#Shards onready var shards = [ $ShardGraphics/Shard, $ShardGraphics/Shard2, diff --git a/maps/mountain.tscn b/maps/mountain.tscn index 367fa2d..4289614 100644 --- a/maps/mountain.tscn +++ b/maps/mountain.tscn @@ -5,7 +5,7 @@ [ext_resource path="res://graphics/backgrounds/mountain_mountain.png" type="Texture" id=3] [ext_resource path="res://graphics/backgrounds/mountain_clouds.png" type="Texture" id=4] [ext_resource path="res://graphics/backgrounds/mountain_sunset.png" type="Texture" id=5] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=6] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=6] [ext_resource path="res://tilesets/t_mountain.tres" type="TileSet" id=7] [ext_resource path="res://objects/enemy/rolling_fiend.tscn" type="PackedScene" id=8] [ext_resource path="res://objects/environment/moving_platform/moving_platform.tscn" type="PackedScene" id=9] @@ -125,7 +125,7 @@ scroll_v = true respawn_h = false [node name="Player" parent="." instance=ExtResource( 6 )] -position = Vector2( 28, 166 ) +position = Vector2( 24, 176 ) [node name="Ladder" type="TileMap" parent="."] tile_set = ExtResource( 23 ) diff --git a/maps/rust.tscn b/maps/rust.tscn index fc606bb..7630c0a 100644 --- a/maps/rust.tscn +++ b/maps/rust.tscn @@ -4,7 +4,7 @@ [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=2] [ext_resource path="res://graphics/backgrounds/rust.png" type="Texture" id=3] [ext_resource path="res://tilesets/t_rust.tres" type="TileSet" id=4] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=5] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=5] [ext_resource path="res://scripts/delete_on_game_running.gd" type="Script" id=6] [ext_resource path="res://objects/enemy/steam.tscn" type="PackedScene" id=7] [ext_resource path="res://objects/environment/rock/crate.tscn" type="PackedScene" id=8] @@ -53,7 +53,7 @@ format = 1 tile_data = PoolIntArray( 48, 0, 0, 65584, 0, 0, 131120, 0, 0, 196614, 0, 0, 196656, 0, 0, 196671, 0, 0, 196672, 0, 0, 196673, 0, 0, 196674, 0, 0, 262173, 0, 131072, 262174, 0, 65537, 262175, 0, 65537, 262176, 0, 65537, 262177, 0, 65537, 262178, 0, 65537, 262179, 0, 65537, 262180, 0, 65537, 262181, -1610612736, 131072, 262192, 0, 0, 327691, 0, 131072, 327692, 0, 65537, 327693, 0, 65537, 327694, 0, 65537, 327695, 0, 65537, 327696, 0, 65537, 327697, 0, 65537, 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, 1610612736, 131072, 327717, -1073741824, 65537, 327733, 0, 0, 327734, 0, 0, 327735, 536870912, 196609, 327736, 536870912, 196609, 327737, 0, 65536, 327738, 0, 65538, 327739, 0, 65538, 327740, 536870912, 65536, 327760, 0, 131072, 327761, 0, 65537, 327762, 1610612736, 65538, 327763, 0, 65537, 327764, 0, 131073, 327765, 0, 65537, 327766, 0, 65537, 327767, 0, 65537, 327768, 0, 65537, 327769, 0, 65537, 327770, 0, 65537, 327771, 0, 65538, 327772, 0, 65537, 327773, 0, 65537, 327774, 0, 65537, 327775, 0, 65537, 393227, -2147483648, 65537, 393253, -1073741824, 65537, 393268, 0, 0, 393269, 0, 0, 393288, 0, 65536, 393289, 0, 65537, 393290, 0, 131075, 393296, -1073741824, 65537, 458763, -2147483648, 65537, 458789, -1073741824, 131072, 458790, 0, 65537, 458791, 0, 65537, 458792, 0, 65537, 458793, 0, 65537, 458794, 0, 65537, 458795, 0, 65537, 458796, 0, 65537, 458797, 0, 65537, 458798, 0, 65537, 458799, 536870912, 65536, 458805, 0, 0, 458832, -1073741824, 65538, 524299, -2147483648, 65537, 524315, 0, 131072, 524316, 0, 65537, 524317, 0, 65537, 524318, 0, 65537, 524319, 0, 65537, 524320, 0, 65537, 524321, 0, 65537, 524322, 536870912, 131072, 524338, 0, 0, 524341, 0, 0, 524342, 0, 0, 524343, 0, 0, 524344, 0, 0, 524368, -1073741824, 65537, 589830, -2147483648, 65536, 589831, 0, 196609, 589832, 0, 196609, 589833, 0, 65536, 589834, 0, 65537, 589835, -536870912, 131072, 589851, -1073741824, 65537, 589858, -1073741824, 65537, 589898, 0, 65536, 589899, 0, 65537, 589900, 536870912, 65536, 589904, -1073741824, 65536, 589906, 0, 0, 589907, 0, 0, 589908, 0, 0, 589910, 0, 0, 589911, 0, 0, 589913, 0, 0, 589914, 0, 0, 655366, -1073741824, 65537, 655376, 0, 65536, 655377, 0, 65537, 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, 1610612736, 131072, 655394, -1073741824, 131072, 655395, 0, 65537, 655396, 0, 65537, 655397, 0, 65538, 655398, 0, 65537, 655399, 0, 65537, 655400, 0, 65537, 655401, 536870912, 65536, 655418, 0, 0, 655419, 0, 0, 655420, 0, 0, 720902, -1073741824, 65537, 720903, 0, 196609, 720904, 0, 196609, 720962, 0, 0, 720963, 0, 0, 720964, 0, 0, 720966, 0, 0, 720967, 0, 0, 720968, 0, 0, 786438, -1073741824, 65538, 851974, -1073741824, 65537, 851975, 0, 196609, 851976, 0, 196609, 851989, 0, 0, 852021, 0, 0, 852042, 0, 0, 917510, -1073741824, 65537, 917550, 0, 65536, 917551, 0, 65537, 917552, 0, 65537, 917553, 0, 65537, 917554, 0, 65537, 917555, 0, 65537, 917556, 0, 65537, 917557, 0, 65537, 917558, 0, 65537, 917559, 0, 65537, 917560, 0, 65537, 917561, -1610612736, 131072, 917565, 0, 65536, 917566, 0, 65537, 917567, 0, 65537, 917568, 0, 65537, 917569, 0, 65537, 917570, 0, 65537, 917571, 0, 65537, 917572, 0, 65537, 917573, 0, 65537, 917574, 536870912, 131072, 917590, 0, 0, 917591, 0, 0, 917592, 0, 0, 917593, 0, 0, 917594, 0, 0, 917595, 0, 0, 917596, 0, 0, 917597, 0, 0, 917599, 0, 0, 983046, -1073741824, 131072, 983047, 0, 65537, 983048, 0, 65537, 983049, 0, 65537, 983050, 0, 65537, 983051, 0, 65537, 983052, 0, 65537, 983053, 0, 65537, 983054, 0, 65538, 983055, 0, 65537, 983056, 0, 65537, 983057, 0, 65537, 983058, 0, 131075, 983078, 0, 0, 983079, 0, 0, 983080, 0, 0, 983081, 0, 0, 983097, -1073741824, 131072, 983098, -1610612736, 131072, 983110, -1073741824, 65537, 983113, 536870912, 0, 983121, 0, 0, 983122, 0, 0, 983123, 0, 0, 1048634, -1073741824, 65537, 1048646, -1073741824, 65537, 1114135, 0, 131072, 1114136, 0, 65537, 1114137, 0, 65537, 1114138, 0, 65537, 1114139, 0, 65537, 1114140, 0, 65537, 1114141, 0, 65538, 1114142, 0, 65537, 1114143, 0, 65537, 1114144, 0, 65537, 1114145, 0, 65537, 1114146, 0, 262144, 1114147, 0, 262145, 1114148, -1610612736, 131072, 1114170, -1073741824, 131072, 1114171, 0, 65537, 1114172, 0, 65537, 1114173, 0, 65537, 1114174, 536870912, 65537, 1114175, 0, 65537, 1114176, 0, 65537, 1114177, 0, 65537, 1114178, 0, 131075, 1114182, -1073741824, 65537, 1114191, 0, 0, 1179661, 0, 65536, 1179662, 0, 65537, 1179663, 0, 131074, 1179664, 0, 131074, 1179665, 0, 65537, 1179666, 0, 65537, 1179667, 0, 65537, 1179668, 0, 131074, 1179669, 0, 131074, 1179670, 0, 65537, 1179671, 1610612736, 131072, 1179684, -1073741824, 65537, 1179718, -1073741824, 65537, 1179723, 0, 0, 1179724, 0, 0, 1179725, 0, 0, 1179741, 0, 0, 1179742, 0, 0, 1245220, -1073741824, 131072, 1245221, 0, 65537, 1245222, 0, 65537, 1245223, 0, 131075, 1245254, -1073741824, 131072, 1245255, 0, 65537, 1245256, 536870912, 65536, 1310720, 0, 0, 1310721, 0, 0, 1376256, 0, 0, 1376257, 0, 0, 1376261, 0, 0, 1376286, 0, 0, 1376304, 0, 0, 1376312, 0, 65536, 1376313, 536870912, 65538, 1376314, 536870912, 65537, 1376315, 536870912, 65536, 1376333, 0, 0, 1376334, 0, 0, 1376335, 0, 0, 1376341, 0, 0, 1376342, 0, 0, 1376343, 0, 0, 1441792, 0, 1, 1441793, 0, 2, 1441794, 0, 2, 1441795, 0, 2, 1441796, 0, 2, 1441797, 0, 2, 1441798, 0, 2, 1441799, 0, 2, 1441800, 0, 2, 1441801, 0, 2, 1441802, 0, 2, 1441803, 0, 2, 1441804, 0, 2, 1441805, 0, 2, 1441806, 0, 2, 1441807, 0, 2, 1441808, 0, 2, 1441809, 0, 2, 1441810, 0, 2, 1441811, 0, 2, 1441812, 0, 2, 1441813, 0, 2, 1441814, 0, 2, 1441815, 0, 2, 1441816, 0, 2, 1441817, 0, 2, 1441818, 0, 2, 1441819, 0, 2, 1441820, 0, 2, 1441821, 0, 2, 1441822, 0, 2, 1441823, 0, 2, 1441824, 0, 2, 1441825, 0, 2, 1441826, 0, 2, 1441827, 0, 2, 1441828, 0, 2, 1441829, 0, 2, 1441830, 0, 2, 1441831, 0, 2, 1441832, 0, 2, 1441833, 0, 2, 1441834, 0, 2, 1441835, 0, 2, 1441836, 0, 2, 1441837, 0, 3, 1441843, 0, 1, 1441844, 0, 2, 1441845, 0, 2, 1441846, 0, 2, 1441853, 0, 2, 1441854, 0, 2, 1441855, 0, 2, 1441856, 0, 2, 1441857, 0, 2, 1441858, 0, 2, 1441859, 0, 2, 1441860, 0, 2, 1441861, 0, 2, 1441862, 0, 2, 1441863, 0, 2, 1441864, 0, 2, 1441865, 0, 2, 1441866, 0, 2, 1441867, 0, 3, 1441882, 0, 1, 1441883, 0, 2, 1441884, 0, 2, 1441885, 0, 2, 1441886, 0, 2, 1441887, 0, 3, 1507328, 0, 0, 1507329, 0, 0, 1507330, 0, 0, 1507331, 0, 0, 1507332, 0, 0, 1507333, 0, 0, 1507334, 0, 0, 1507335, 0, 0, 1507336, 0, 0, 1507337, 0, 0, 1507338, 0, 0, 1507339, 0, 0, 1507340, 0, 0, 1507341, 0, 0, 1507342, 0, 0, 1507343, 0, 0, 1507344, 0, 0, 1507345, 0, 0, 1507346, 0, 0, 1507347, 0, 0, 1507348, 0, 0, 1507349, 0, 0, 1507350, 0, 0, 1507351, 0, 0, 1507352, 0, 0, 1507353, 0, 0, 1507354, 0, 0, 1507355, 0, 0, 1507356, 0, 0, 1507357, 0, 0, 1507358, 0, 0, 1507359, 0, 0, 1507360, 0, 0, 1507361, 0, 0, 1507362, 0, 0, 1507363, 0, 0, 1507364, 0, 0, 1507365, 0, 0, 1507366, 0, 0, 1507367, 0, 0, 1507368, 0, 0, 1507369, 0, 0, 1507370, 0, 0, 1507371, 0, 0, 1507372, 0, 0, 1507373, 0, 0, 1507379, 0, 0, 1507380, 0, 0, 1507381, 0, 0, 1507382, 0, 0, 1507389, 0, 0, 1507390, 0, 0, 1507391, 0, 0, 1507392, 0, 0, 1507393, 0, 0, 1507394, 0, 0, 1507395, 0, 0, 1507396, 0, 0, 1507397, 0, 0, 1507398, 0, 0, 1507399, 0, 0, 1507400, 0, 0, 1507401, 0, 0, 1507402, 0, 0, 1507403, 0, 0, 1507418, 0, 0, 1507419, 0, 0, 1507420, 0, 0, 1507421, 0, 0, 1507422, 0, 0, 1507423, 0, 0 ) [node name="Player" parent="." instance=ExtResource( 5 )] -position = Vector2( 24, 160 ) +position = Vector2( 24, 176 ) [node name="Death" type="TileMap" parent="." groups=["death"]] tile_set = ExtResource( 16 ) diff --git a/maps/station.tscn b/maps/station.tscn index c798901..b922ad8 100644 --- a/maps/station.tscn +++ b/maps/station.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=23 format=2] [ext_resource path="res://maps/station.gd" type="Script" id=1] -[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=2] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=2] [ext_resource path="res://tilesets/t_station.tres" type="TileSet" id=3] [ext_resource path="res://graphics/backgrounds/night.png" type="Texture" id=4] [ext_resource path="res://objects/environment/exit/exit.tscn" type="PackedScene" id=5] @@ -58,7 +58,7 @@ format = 1 tile_data = PoolIntArray( -65485, 1, 196609, -65484, 1, 196610, -65483, 1, 196610, -65482, 1, 196611, -65480, 1, 196609, -65479, 1, 196611, -65476, 1, 196608, 63, 1, 1, 64, 1, 3, 65599, 1, 65537, 65600, 1, 65539, 131135, 1, 65537, 131136, 1, 65539, 131168, 1, 196608, 196625, 0, 131072, 196626, 0, 131073, 196627, 0, 131073, 196628, 0, 131073, 196629, 0, 131073, 196630, 0, 131073, 196631, 0, 131073, 196642, 0, 131073, 196643, 0, 131073, 196644, 0, 131073, 196645, 0, 131073, 196646, 0, 131073, 196647, 0, 131073, 196648, 0, 131073, 196649, 0, 131073, 196650, 0, 131073, 196651, 0, 131073, 196652, 0, 131073, 196653, 0, 131073, 196654, 0, 131073, 196655, 0, 131073, 196656, 0, 131073, 196657, 0, 131073, 196658, 0, 131073, 196659, 0, 131073, 196662, 0, 131073, 196663, 0, 131073, 196666, 0, 131073, 196667, 0, 131073, 196671, 1, 65537, 196672, 1, 65539, 196673, 0, 131073, 196676, 0, 131073, 196677, 0, 131073, 196678, 0, 131073, 196679, 0, 131073, 196680, 0, 131073, 196681, 0, 131073, 196682, 0, 131073, 196683, 0, 131073, 196684, 0, 131073, 196685, 0, 131073, 196686, 0, 131073, 196687, 0, 131073, 196688, 0, 131073, 196689, 0, 131073, 196690, 0, 131073, 196691, 0, 131073, 196692, 0, 131073, 196698, 0, 131073, 196699, 0, 131073, 196700, 0, 131073, 196701, 0, 131073, 196702, 0, 131073, 196703, 0, 131073, 262162, 1, 1, 262163, 1, 196610, 262164, 1, 196610, 262165, 1, 196610, 262166, 1, 196610, 262167, 1, 196611, 262178, 1, 196609, 262179, 1, 196610, 262180, 1, 196610, 262181, 1, 196610, 262182, 1, 196610, 262183, 1, 196610, 262184, 1, 196610, 262185, 1, 196610, 262186, 1, 196610, 262187, 1, 196610, 262188, 1, 196610, 262189, 1, 196610, 262190, 1, 196610, 262191, 1, 196610, 262192, 1, 196610, 262193, 1, 196610, 262194, 1, 196610, 262195, 1, 196611, 262198, 1, 196609, 262199, 1, 196611, 262202, 1, 196609, 262203, 1, 196611, 262207, 1, 131073, 262208, 1, 131074, 262209, 1, 196611, 262212, 1, 196609, 262213, 1, 196610, 262214, 1, 196610, 262215, 1, 196610, 262216, 1, 196610, 262217, 1, 196610, 262218, 1, 196610, 262219, 1, 196610, 262220, 1, 196610, 262221, 1, 196610, 262222, 1, 196610, 262223, 1, 196610, 262224, 1, 196610, 262225, 1, 196610, 262226, 1, 196610, 262227, 1, 196610, 262228, 1, 196611, 262234, 1, 196609, 262235, 1, 196610, 262236, 1, 196610, 262237, 1, 196610, 262238, 1, 196610, 262239, 1, 3, 327693, 1, 196609, 327694, 1, 196610, 327695, 1, 196611, 327698, 1, 65536, 327767, 1, 0, 327775, 1, 65536, 393234, 1, 65536, 393303, 1, 65536, 393311, 1, 65536, 458770, 1, 65536, 458813, 1, 196609, 458814, 1, 196610, 458815, 1, 2, 458816, 1, 196610, 458817, 1, 196610, 458818, 1, 196610, 458819, 1, 196610, 458820, 1, 3, 458830, 1, 196609, 458831, 1, 196610, 458832, 1, 196610, 458833, 1, 196610, 458834, 1, 196610, 458835, 1, 196610, 458836, 1, 2, 458837, 1, 196610, 458838, 1, 196610, 458839, 1, 131074, 458840, 1, 3, 458847, 1, 65536, 524306, 1, 65537, 524307, 536870913, 196610, 524308, 536870913, 196610, 524309, 536870913, 196610, 524310, 536870913, 196610, 524311, 536870913, 196610, 524312, 536870913, 196610, 524313, 536870913, 196610, 524314, 536870913, 196610, 524315, 1, 196611, 524324, 1, 196609, 524325, 1, 196610, 524326, 1, 196610, 524327, 1, 196610, 524328, 1, 196610, 524329, 1, 196610, 524330, 1, 196610, 524331, 1, 196610, 524332, 1, 196610, 524333, 1, 196610, 524334, 1, 196610, 524335, 1, 2, 524336, 1, 196610, 524337, 1, 196610, 524338, 1, 196611, 524351, 1, 65536, 524356, 1, 65536, 524365, 1, 196608, 524372, 1, 131072, 524376, 1, 131073, 524377, 1, 196610, 524378, 1, 196610, 524379, 1, 196610, 524380, 1, 196611, 524383, 1, 65536, 589842, 1, 65536, 589871, 1, 65536, 589878, 1, 196609, 589879, 1, 196611, 589881, 1, 196609, 589882, 1, 196611, 589887, 1, 65536, 589892, 1, 65536, 589919, 1, 65536, 655368, 1, 196609, 655369, 1, 196610, 655370, 1, 196610, 655371, 1, 196610, 655372, 1, 196610, 655373, 1, 196611, 655378, 1, 65536, 655391, 1, 196609, 655392, 1, 196610, 655393, 1, 196611, 655407, 1, 65536, 655423, 1, 65536, 655428, 1, 131073, 655429, 1, 196610, 655430, 1, 2, 655431, 1, 196610, 655432, 1, 196610, 655433, 1, 196610, 655434, 1, 196610, 655435, 1, 196610, 655436, 1, 196611, 655444, 1, 0, 655453, 1, 196608, 655455, 1, 65536, 720914, 1, 65536, 720943, 1, 65536, 720949, 1, 1, 720950, 1, 196610, 720951, 1, 196610, 720952, 1, 196610, 720953, 1, 196610, 720954, 1, 196610, 720955, 1, 3, 720959, 1, 65536, 720966, 1, 65536, 720978, 1, 196609, 720979, 1, 196610, 720980, 1, 65539, 720991, 1, 65536, 786450, 1, 65536, 786468, 1, 196609, 786469, 1, 196611, 786475, 1, 196609, 786476, 1, 196610, 786477, 1, 196611, 786479, 1, 131072, 786485, 1, 65536, 786491, 1, 65536, 786495, 1, 65536, 786499, 1, 196608, 786502, 1, 65536, 786511, 1, 196608, 786516, 1, 65537, 786517, 1, 196611, 786520, 1, 196609, 786521, 1, 196611, 786527, 1, 65536, 851986, 1, 65537, 851987, 1, 196610, 851988, 1, 196610, 851989, 1, 196611, 852008, 1, 196608, 852017, 1, 196609, 852018, 1, 196611, 852021, 1, 131072, 852027, 1, 65536, 852030, 1, 196609, 852031, 1, 65539, 852038, 1, 131072, 852052, 1, 65536, 852063, 1, 65536, 917522, 1, 65536, 917563, 1, 65536, 917567, 1, 131072, 917580, 1, 0, 917583, 1, 0, 917588, 1, 65536, 917596, 1, 196609, 917597, 1, 196610, 917598, 1, 196610, 917599, 1, 65539, 983047, 1, 196609, 983048, 1, 196610, 983049, 536870913, 196610, 983050, 536870913, 196610, 983051, 536870913, 196610, 983052, 536870913, 196610, 983053, 536870913, 196610, 983054, 536870913, 196610, 983055, 536870913, 196610, 983056, 536870913, 196610, 983057, 1, 196610, 983058, 1, 65539, 983063, 1, 196609, 983064, 1, 196610, 983065, 1, 196611, 983099, 1, 65537, 983100, 1, 196611, 983114, 1, 0, 983116, 1, 65536, 983119, 1, 65536, 983124, 1, 65536, 983135, 1, 65536, 1048594, 1, 65536, 1048635, 1, 65536, 1048650, 1, 131073, 1048651, 1, 196610, 1048652, 1, 131074, 1048653, 1, 196610, 1048654, 1, 196610, 1048655, 1, 131075, 1048660, 1, 131072, 1048671, 1, 65536, 1114117, 1, 196609, 1114118, 1, 196611, 1114130, 1, 131072, 1114140, 1, 196609, 1114141, 1, 196610, 1114142, 1, 196610, 1114143, 1, 196610, 1114144, 1, 196610, 1114145, 1, 196610, 1114146, 1, 196610, 1114147, 1, 196610, 1114148, 1, 196610, 1114149, 1, 196610, 1114150, 1, 196610, 1114151, 1, 196610, 1114152, 1, 196610, 1114153, 1, 196611, 1114157, 1, 196609, 1114158, 1, 196610, 1114159, 1, 196610, 1114160, 1, 196610, 1114161, 1, 196610, 1114162, 1, 196611, 1114164, 1, 196609, 1114165, 1, 196610, 1114166, 1, 196610, 1114167, 1, 196610, 1114168, 1, 196610, 1114169, 1, 196610, 1114170, 1, 196610, 1114171, 1, 131074, 1114172, 1, 196610, 1114173, 1, 196610, 1114174, 1, 196610, 1114175, 1, 196610, 1114176, 1, 196610, 1114177, 1, 196610, 1114178, 1, 196610, 1114179, 1, 196610, 1114180, 1, 196610, 1114181, 1, 196610, 1114182, 1, 196611, 1114201, 1, 1, 1114202, 1, 196610, 1114203, 1, 196610, 1114204, 1, 196610, 1114205, 1, 196610, 1114206, 1, 196610, 1114207, 1, 65539, 1179737, 1, 131072, 1179743, 1, 65536, 1245184, 1, 196609, 1245185, 1, 196611, 1245279, 1, 65536, 1310815, 1, 65536, 1376269, 0, 65538, 1376270, 0, 65539, 1376271, 1, 1, 1376272, 1, 2, 1376273, 1, 2, 1376274, 1, 2, 1376275, 1, 2, 1376276, 536870913, 2, 1376277, 536870913, 2, 1376278, 536870913, 2, 1376279, 536870913, 2, 1376280, 1, 2, 1376281, 1, 2, 1376282, 536870913, 2, 1376283, 1, 2, 1376284, 1, 2, 1376285, 1, 2, 1376286, 1, 2, 1376287, 1, 2, 1376288, 1, 2, 1376289, 1, 2, 1376290, 1, 2, 1376291, 1, 2, 1376292, 1, 2, 1376293, 1, 2, 1376294, 1, 2, 1376295, 1, 2, 1376296, 1, 2, 1376297, 1, 2, 1376298, 1, 2, 1376299, 1, 2, 1376300, 1, 2, 1376301, 1, 2, 1376302, 1, 2, 1376303, 1, 2, 1376304, 1, 2, 1376305, 1, 2, 1376306, 1, 2, 1376307, 1, 2, 1376308, 1, 2, 1376309, 1, 2, 1376310, 1, 2, 1376311, 1, 2, 1376312, 1, 2, 1376313, 1, 2, 1376314, 1, 2, 1376315, 1, 2, 1376316, 1, 2, 1376317, 1, 2, 1376318, 1, 2, 1376319, 1, 2, 1376320, 1, 2, 1376321, 1, 2, 1376322, 1, 2, 1376323, 1, 2, 1376324, 1, 2, 1376325, 1, 2, 1376326, 1, 2, 1376327, 1, 2, 1376328, 1, 2, 1376329, 1, 2, 1376330, 1, 2, 1376331, 1, 2, 1376332, 1, 2, 1376333, 1, 2, 1376334, 1, 2, 1376335, 1, 2, 1376336, 1, 2, 1376337, 1, 2, 1376338, 1, 2, 1376339, 1, 2, 1376340, 1, 2, 1376341, 1, 2, 1376342, 1, 2, 1376343, 1, 2, 1376344, 1, 2, 1376345, 1, 2, 1376346, 1, 2, 1376347, 1, 2, 1376348, 1, 2, 1376349, 1, 2, 1376350, 1, 2, 1376351, 1, 65539, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 1, 1, 1441806, 1, 2, 1441807, 1, 65538, 1441808, 1, 65538, 1441809, 1, 65538, 1441810, 1, 65538, 1441811, 1, 65538, 1441812, 536870913, 65538, 1441813, 536870913, 65538, 1441814, 536870913, 65538, 1441815, 536870913, 65538, 1441816, 1, 65538, 1441817, 1, 65538, 1441818, 536870913, 65538, 1441819, 1, 65538, 1441820, 1, 65538, 1441821, 1, 65538, 1441822, 1, 65538, 1441823, 1, 65538, 1441824, 1, 65538, 1441825, 1, 65538, 1441826, 1, 65538, 1441827, 1, 65538, 1441828, 1, 65538, 1441829, 1, 65538, 1441830, 1, 65538, 1441831, 1, 65538, 1441832, 1, 65538, 1441833, 1, 65538, 1441834, 1, 65538, 1441835, 1, 65538, 1441836, 1, 65538, 1441837, 1, 65538, 1441838, 1, 65538, 1441839, 1, 65538, 1441840, 1, 65538, 1441841, 1, 65538, 1441842, 1, 65538, 1441843, 1, 65538, 1441844, 1, 65538, 1441845, 1, 65538, 1441846, 1, 65538, 1441847, 1, 65538, 1441848, 1, 65538, 1441849, 1, 65538, 1441850, 1, 65538, 1441851, 1, 65538, 1441852, 1, 65538, 1441853, 1, 65538, 1441854, 1, 65538, 1441855, 1, 65538, 1441856, 1, 65538, 1441857, 1, 65538, 1441858, 1, 65538, 1441859, 1, 65538, 1441860, 1, 65538, 1441861, 1, 65538, 1441862, 1, 65538, 1441863, 1, 65538, 1441864, 1, 65538, 1441865, 1, 65538, 1441866, 1, 65538, 1441867, 1, 65538, 1441868, 1, 65538, 1441869, 1, 65538, 1441870, 1, 65538, 1441871, 1, 65538, 1441872, 1, 65538, 1441873, 1, 65538, 1441874, 1, 65538, 1441875, 1, 65538, 1441876, 1, 65538, 1441877, 1, 65538, 1441878, 1, 65538, 1441879, 1, 65538, 1441880, 1, 65538, 1441881, 1, 65538, 1441882, 1, 65538, 1441883, 1, 65538, 1441884, 1, 65538, 1441885, 1, 65538, 1441886, 1, 65538, 1441887, 1, 65539, 1507328, 536870913, 196609, 1507329, 536870913, 196610, 1507330, 536870913, 196610, 1507331, 536870913, 196610, 1507332, 536870913, 196610, 1507333, 536870913, 196610, 1507334, 536870913, 196610, 1507335, 536870913, 196610, 1507336, 536870913, 196610, 1507337, 536870913, 196610, 1507338, 536870913, 196610, 1507339, 536870913, 196610, 1507340, 536870913, 196610, 1507341, 536870913, 131074, 1507342, 536870913, 131074, 1507343, 1, 131074, 1507344, 1, 131074, 1507345, 1, 131074, 1507346, 1, 131074, 1507347, 536870913, 131074, 1507348, 536870913, 131074, 1507349, 536870913, 131074, 1507350, 536870913, 131074, 1507351, 536870913, 131074, 1507352, 536870913, 131074, 1507353, 536870913, 131074, 1507354, 536870913, 131074, 1507355, 536870913, 131074, 1507356, 1, 131074, 1507357, 1, 131074, 1507358, 1, 131074, 1507359, 1, 131074, 1507360, 1, 131074, 1507361, 1, 131074, 1507362, 1, 131074, 1507363, 1, 131074, 1507364, 1, 131074, 1507365, 1, 131074, 1507366, 1, 131074, 1507367, 1, 131074, 1507368, 1, 131074, 1507369, 1, 131074, 1507370, 1, 131074, 1507371, 1, 131074, 1507372, 1, 131074, 1507373, 1, 131074, 1507374, 1, 131074, 1507375, 1, 131074, 1507376, 1, 131074, 1507377, 1, 131074, 1507378, 1, 131074, 1507379, 1, 131074, 1507380, 1, 131074, 1507381, 1, 131074, 1507382, 1, 131074, 1507383, 1, 131074, 1507384, 1, 131074, 1507385, 1, 131074, 1507386, 1, 131074, 1507387, 1, 131074, 1507388, 1, 131074, 1507389, 1, 131074, 1507390, 1, 131074, 1507391, 1, 131074, 1507392, 1, 131074, 1507393, 1, 131074, 1507394, 1, 131074, 1507395, 1, 131074, 1507396, 1, 131074, 1507397, 1, 131074, 1507398, 1, 131074, 1507399, 1, 131074, 1507400, 1, 131074, 1507401, 1, 131074, 1507402, 1, 131074, 1507403, 1, 131074, 1507404, 1, 131074, 1507405, 1, 131074, 1507406, 1, 131074, 1507407, 1, 131074, 1507408, 1, 131074, 1507409, 1, 131074, 1507410, 1, 131074, 1507411, 1, 131074, 1507412, 1, 131074, 1507413, 1, 131074, 1507414, 1, 131074, 1507415, 1, 131074, 1507416, 1, 131074, 1507417, 1, 131074, 1507418, 1, 131074, 1507419, 1, 131074, 1507420, 1, 131074, 1507421, 1, 131074, 1507422, 1, 131074, 1507423, 1, 131075 ) [node name="Player" parent="." instance=ExtResource( 2 )] -position = Vector2( 39.0418, 166 ) +position = Vector2( 40, 176 ) [node name="Ladder" type="TileMap" parent="."] tile_set = ExtResource( 14 ) diff --git a/maps/test_room.tscn b/maps/test_room.tscn index c7196f6..308cde1 100644 --- a/maps/test_room.tscn +++ b/maps/test_room.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=32 format=2] +[gd_scene load_steps=33 format=2] [ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] [ext_resource path="res://tilesets/t_cave.tres" type="TileSet" id=2] @@ -26,6 +26,7 @@ [ext_resource path="res://objects/enemy/laser_wall.tscn" type="PackedScene" id=24] [ext_resource path="res://objects/enemy/cop.tscn" type="PackedScene" id=25] [ext_resource path="res://objects/environment/turret/turret_bullet.tscn" type="PackedScene" id=26] +[ext_resource path="res://objects/player/player_scholar.tscn" type="PackedScene" id=27] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 16, 20 ) @@ -179,7 +180,6 @@ position = Vector2( 48, 120 ) [node name="AnimatedSprite" parent="RollingFiend" index="0"] visible = false -frame = 1 [node name="SawTest2" type="AnimatedSprite" parent="RollingFiend"] material = SubResource( 4 ) @@ -222,4 +222,7 @@ turn_time = inf [node name="TurretBullet" parent="." instance=ExtResource( 26 )] position = Vector2( 152, 72 ) +[node name="Player2" parent="." instance=ExtResource( 27 )] +position = Vector2( 136, 160 ) + [editable path="RollingFiend"] diff --git a/objects/camera.gd b/objects/camera.gd index 6d72e06..b7283a7 100644 --- a/objects/camera.gd +++ b/objects/camera.gd @@ -1,7 +1,7 @@ extends Camera2D -onready var player = get_parent().get_node("Player") -onready var last_sector = Game.get_sector(player.position) +onready var player = get_tree().get_nodes_in_group("player").front() +onready var last_sector = Game.get_sector(player.global_position) #Scroll direction export var scroll_h = true export var scroll_v = false @@ -12,14 +12,18 @@ func _ready(): Game.current_sector = last_sector func _process(delta): - var current_sector = Game.get_sector(player.position) - if scroll_h && current_sector.x != last_sector.x: - position.x = current_sector.x * Game.resolution.x - if respawn_h: - var offset = Vector2(8.0 * sign(current_sector.x - last_sector.x), 0.0) - Game.respawn_point = player.global_position - last_sector.x = current_sector.x - if scroll_v && current_sector.y != last_sector.y: - position.y = current_sector.y * Game.resolution.y - last_sector.y = current_sector.y - Game.current_sector = last_sector + # use pop_front() instead of [0] so that will not crash without player + if not is_instance_valid(player): + player = get_tree().get_nodes_in_group("player").pop_front() + else: + var current_sector = Game.get_sector(player.global_position) + if scroll_h && current_sector.x != last_sector.x: + position.x = current_sector.x * Game.resolution.x + if respawn_h: + var offset = Vector2(8.0 * sign(current_sector.x - last_sector.x), 0.0) + Game.respawn_point = player.global_position + last_sector.x = current_sector.x + if scroll_v && current_sector.y != last_sector.y: + position.y = current_sector.y * Game.resolution.y + last_sector.y = current_sector.y + Game.current_sector = last_sector diff --git a/objects/collectibles/arrow.gd b/objects/collectibles/arrow.gd index dbd1b0f..9cd0b02 100644 --- a/objects/collectibles/arrow.gd +++ b/objects/collectibles/arrow.gd @@ -4,7 +4,7 @@ export var value = 1 func _on_Area2D_area_entered(area): #Collect - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): Game.arrows += value Game.score += 25 Audio.play_sound(Audio.a_arrow,Audio.ac_collectible) diff --git a/objects/collectibles/key.gd b/objects/collectibles/key.gd index 6f099e7..99470af 100644 --- a/objects/collectibles/key.gd +++ b/objects/collectibles/key.gd @@ -8,7 +8,7 @@ func _ready(): func _on_Area2D_area_entered(area): #Collect - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): Game.golds += value Game.score += 5 Audio.play_sound(Audio.a_gold,Audio.ac_collectible) diff --git a/objects/collectibles/shard.gd b/objects/collectibles/shard.gd index 94caebf..617fa09 100644 --- a/objects/collectibles/shard.gd +++ b/objects/collectibles/shard.gd @@ -8,7 +8,7 @@ func _ready(): func _on_Area2D_area_entered(area): #Collect - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): Audio.play_shard_sound() Game.score += 500 Game.shards += value diff --git a/objects/collectibles/star.gd b/objects/collectibles/star.gd index bb3c96b..8744898 100644 --- a/objects/collectibles/star.gd +++ b/objects/collectibles/star.gd @@ -28,7 +28,7 @@ func _set_color(value): func _on_Area2D_area_entered(area): #Collect - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): Audio.play_sound(Audio.a_star,Audio.ac_collectible) Game.score += 100 Game.stars[color] = true diff --git a/objects/enemy/antlion.gd b/objects/enemy/antlion.gd index 4366e2c..29f51cd 100644 --- a/objects/enemy/antlion.gd +++ b/objects/enemy/antlion.gd @@ -4,7 +4,7 @@ onready var raycast = $Rotation/RayCast2D onready var anims = $AnimationPlayer func _on_Sight_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): anims.play("lunge") func _on_AnimationPlayer_animation_finished(anim_name): diff --git a/objects/enemy/bullet_casing.tscn b/objects/enemy/bullet_casing.tscn new file mode 100644 index 0000000..40007dd --- /dev/null +++ b/objects/enemy/bullet_casing.tscn @@ -0,0 +1,23 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://graphics/particles/bullet_casing.png" type="Texture" id=1] + +[sub_resource type="PhysicsMaterial" id=4] +bounce = 0.75 + +[sub_resource type="RectangleShape2D" id=3] +extents = Vector2( 1, 1.5 ) + +[node name="BoneParticle" type="RigidBody2D"] +collision_layer = 16 +physics_material_override = SubResource( 4 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0, 0.5 ) +shape = SubResource( 3 ) +__meta__ = { +"_edit_group_": true +} diff --git a/objects/enemy/cop.gd b/objects/enemy/cop.gd index e14edf7..1703492 100644 --- a/objects/enemy/cop.gd +++ b/objects/enemy/cop.gd @@ -25,6 +25,7 @@ var turns = 0 const BoneParticle = preload("res://objects/enemy/bone_particle.tscn") const EasyBullet = preload("res://objects/enemy/roboturret_proj.tscn") +const BulletCasing = preload("res://objects/enemy/bullet_casing.tscn") func _ready(): if Engine.editor_hint: @@ -44,7 +45,7 @@ func _physics_process(delta): if !shooting: # check for player in raycast var collider = shoot_cast.get_collider() - if collider != null && (collider.is_in_group("player") or collider.is_in_group("msx")): + if collider != null && (collider.is_in_group("player_hitbox") or collider.is_in_group("msx")): if Game.get_sector(global_position) == Game.get_sector(collider.global_position): if Game.is_easy_mode: var easy_bullet = EasyBullet.instance() @@ -56,13 +57,16 @@ func _physics_process(delta): else: # kill player and enter shooting state temporarily collider.get_parent().die() + # play sound Audio.play_sound(Audio.a_die_robot, Audio.ac_boss) + # muzzle flash muzzle_flash.emitting = true shooting = true get_tree().create_timer(0.5, false).connect("timeout", self, "_stop_shoot") sprite.play("shoot") + # check other raycast to find collision passing through player graphics_cast.force_raycast_update() var hit_position = graphics_cast.to_global(Vector2(256.0, 0.0)) @@ -76,6 +80,16 @@ func _physics_process(delta): # move and play sparks sparks.global_position = hit_position sparks.emitting = true + + # spawn a bullet casing + var casing = BulletCasing.instance() + casing.rotation = rand_range(0.0, 2.0*PI) # random rotation + casing.global_position = shoot_position.global_position + casing.linear_velocity = Vector2(45.0 * rand_range(0.5, 1.5), 0.0).rotated(rand_range(-PI, 0.0)) + casing.angular_velocity = rand_range(-PI*2.0, PI*2.0) + var timer = get_tree().create_timer(3.0 + rand_range(0.0, 1.0), false) + timer.connect("timeout", casing, "queue_free") + get_parent().call_deferred("add_child", casing) return # if there aren't turns, walk around diff --git a/objects/enemy/enemy.gd b/objects/enemy/enemy.gd index bd02c9e..b2042e9 100644 --- a/objects/enemy/enemy.gd +++ b/objects/enemy/enemy.gd @@ -26,7 +26,7 @@ var death_blood_offset = Vector2.ZERO func _on_Hitbox_area_entered(area): #Kill player - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): area.get_parent().die() func die(): diff --git a/objects/enemy/enemy_speedup_in_range.gd b/objects/enemy/enemy_speedup_in_range.gd index c133ef4..6541c08 100644 --- a/objects/enemy/enemy_speedup_in_range.gd +++ b/objects/enemy/enemy_speedup_in_range.gd @@ -32,7 +32,7 @@ func _physics_process(delta): else: move_up_and_down(delta) #Speed up if in raycast if raycast.get_collider() != null: - if raycast.get_collider().is_in_group("player"): + if raycast.get_collider().is_in_group("player_hitbox"): go_fast = true timer.set_wait_time(0.5) timer.start() diff --git a/objects/enemy/laser_wall.gd b/objects/enemy/laser_wall.gd index cd508cb..a214f34 100644 --- a/objects/enemy/laser_wall.gd +++ b/objects/enemy/laser_wall.gd @@ -25,7 +25,7 @@ func _physics_process(delta): sparks.emitting = true var collider = cast.get_collider() - if collider.is_in_group("player") or collider.is_in_group("msx"): + if collider.is_in_group("player_hitbox") or collider.is_in_group("msx"): collider.get_parent().die() else: line.visible = false diff --git a/objects/enemy/mine.gd b/objects/enemy/mine.gd index 62b53d4..934af7e 100644 --- a/objects/enemy/mine.gd +++ b/objects/enemy/mine.gd @@ -18,7 +18,7 @@ func _on_Hitbox_area_entered(area): if area.is_in_group("explosion"): var timer = get_tree().create_timer(0.2, false) timer.connect("timeout", self, "die") - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): die() func die(): diff --git a/objects/environment/bubble/bubble.gd b/objects/environment/bubble/bubble.gd index 2e6a1d4..c027b7d 100644 --- a/objects/environment/bubble/bubble.gd +++ b/objects/environment/bubble/bubble.gd @@ -16,7 +16,7 @@ func _physics_process(delta): position.y -= speed * delta func _on_area_entered(area): - if area.is_in_group("player") or area.is_in_group("arrow"): + if area.is_in_group("player_hitbox") or area.is_in_group("arrow"): sprite.frame_coords.y = 1 speed = 0.0 get_tree().create_timer(0.5, false).connect("timeout", self, "queue_free") diff --git a/objects/environment/death tile/death_tile.gd b/objects/environment/death tile/death_tile.gd index 5d335b2..f654002 100644 --- a/objects/environment/death tile/death_tile.gd +++ b/objects/environment/death tile/death_tile.gd @@ -2,5 +2,5 @@ extends Area2D func _on_Area2D_area_entered(area): #Kill player - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): area.get_parent().die() diff --git a/objects/environment/exit/exit.gd b/objects/environment/exit/exit.gd index defad45..16044c0 100644 --- a/objects/environment/exit/exit.gd +++ b/objects/environment/exit/exit.gd @@ -15,7 +15,7 @@ func _physics_process(delta): anims.play("open") func _on_Area2D_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): if Game.score > Game.high_score: Game.high_score = Game.score #BONUSES #Collection bonus diff --git a/objects/environment/falling_block/falling_block.gd b/objects/environment/falling_block/falling_block.gd index 80c4589..d8b7027 100644 --- a/objects/environment/falling_block/falling_block.gd +++ b/objects/environment/falling_block/falling_block.gd @@ -22,7 +22,7 @@ func _physics_process(delta): position.y += fall_speed #Crush the player for area in crush_area.get_overlapping_areas(): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): var player = area.get_parent() if player.is_on_floor(): player.die() @@ -31,7 +31,7 @@ func _physics_process(delta): anims.play("disappear") func _on_Area2D_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): fall_timer.start() sprite.frame = 1 @@ -59,5 +59,5 @@ func _on_FallTimer_timeout(): #func _on_Area2D_area_exited(area): -# if area.is_in_group("player") && graphic == Graphics.GRAVEYARD: +# if area.is_in_group("player_hitbox") && graphic == Graphics.GRAVEYARD: # sprite.frame = 0 diff --git a/objects/environment/ladder/ladder.gd b/objects/environment/ladder/ladder.gd index 4b2fd1c..51af051 100644 --- a/objects/environment/ladder/ladder.gd +++ b/objects/environment/ladder/ladder.gd @@ -1,4 +1,5 @@ -extends Node2D -onready var left_snap = $LeftSnap -onready var right_snap = $RightSnap -onready var middle = position.x + 4 +extends Area2D + +onready var left_snap: float = $LeftSnap.global_position.x +onready var right_snap: float = $RightSnap.global_position.x +onready var middle: float = global_position.x + 4.0 diff --git a/objects/environment/ladder/ladder.tscn b/objects/environment/ladder/ladder.tscn index 4ee3d65..5b8985c 100644 --- a/objects/environment/ladder/ladder.tscn +++ b/objects/environment/ladder/ladder.tscn @@ -5,13 +5,11 @@ [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 6, 4 ) -[node name="Ladder" type="Node2D"] +[node name="Ladder" type="Area2D" groups=["ladder"]] +collision_layer = 64 script = ExtResource( 1 ) -[node name="Area2D" type="Area2D" parent="."] -collision_layer = 64 - -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] position = Vector2( 4, 4 ) shape = SubResource( 1 ) diff --git a/objects/environment/switches/button.gd b/objects/environment/switches/button.gd index 7b15d53..87d0c8b 100644 --- a/objects/environment/switches/button.gd +++ b/objects/environment/switches/button.gd @@ -6,7 +6,7 @@ var sound = load("res://audio/sounds/button.ogg") func _on_ActivationArea_area_entered(area): if !pressed: - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): activate() $Sprite.frame = 1 pressed = true diff --git a/objects/environment/tube/tube_entrance.gd b/objects/environment/tube/tube_entrance.gd index 4962417..fb73f6e 100644 --- a/objects/environment/tube/tube_entrance.gd +++ b/objects/environment/tube/tube_entrance.gd @@ -4,7 +4,7 @@ export var speed = 120.0 export var direction = Vector2.RIGHT func _on_TubeEntrance_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): var player = area.get_parent() player.global_position = global_position + Vector2(4.0, 4.0) player.enter_transport(speed, direction) diff --git a/objects/environment/tube/tube_exit.gd b/objects/environment/tube/tube_exit.gd index 9a584df..a8cb131 100644 --- a/objects/environment/tube/tube_exit.gd +++ b/objects/environment/tube/tube_exit.gd @@ -1,5 +1,5 @@ extends Area2D func _on_TubeExit_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): area.get_parent().exit_transport() diff --git a/objects/environment/turniwood/turning_platform.gd b/objects/environment/turniwood/turning_platform.gd index d2bdfcc..a48d50e 100644 --- a/objects/environment/turniwood/turning_platform.gd +++ b/objects/environment/turniwood/turning_platform.gd @@ -35,9 +35,9 @@ func _on_DelayTimer_timeout(): func _on_DetectPlayer_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): body.collision_layer = 0 func _on_DetectPlayer_area_exited(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): body.collision_layer = collision_layer diff --git a/objects/environment/turret/turret_bullet.gd b/objects/environment/turret/turret_bullet.gd index daa3298..ef8631c 100644 --- a/objects/environment/turret/turret_bullet.gd +++ b/objects/environment/turret/turret_bullet.gd @@ -9,7 +9,7 @@ func _physics_process(delta): func _on_Hitbox_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): area.get_parent().die() diff --git a/objects/player/player.gd b/objects/player/player.gd index 1f3b38a..9b8ef05 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -359,7 +359,7 @@ func die(): time_tween.tween_property(Engine, "time_scale", 0.1, 0.3) Audio.ac_music.stream_paused = true yield(time_tween, "finished") #Resume from freeze frame - yield(get_tree().create_timer(1.0 * 0.1), "timeout") + yield(get_tree().create_timer, "timeout") Game.call_deferred("restart_level") else: #Die diff --git a/objects/player/player.tscn b/objects/player/player.tscn index b0fd912..526d2fc 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=35 format=2] +[gd_scene load_steps=34 format=2] [ext_resource path="res://objects/player/player.gd" type="Script" id=1] [ext_resource path="res://graphics/player/sg_walk.png" type="Texture" id=2] @@ -14,7 +14,7 @@ [ext_resource path="res://graphics/player/sg_shoot_air.png" type="Texture" id=12] [ext_resource path="res://shaders/recolor.tres" type="Shader" id=13] [ext_resource path="res://graphics/player/sg_doublejump.png" type="Texture" id=14] -[ext_resource path="res://graphics/particles/blood.png" type="Texture" id=15] +[ext_resource path="res://objects/player/player_death_particles.tscn" type="PackedScene" id=15] [ext_resource path="res://graphics/particles/dust.png" type="Texture" id=16] [ext_resource path="res://scripts/snap_sprite.gd" type="Script" id=17] @@ -644,9 +644,6 @@ tracks/4/keys = { [sub_resource type="RectangleShape2D" id=34] extents = Vector2( 6, 7 ) -[sub_resource type="Curve" id=41] -_data = [ Vector2( 0, 1 ), 0.0, -0.113537, 0, 0, Vector2( 1, 0 ), -3.35032, 0.0, 0, 0 ] - [sub_resource type="Curve" id=43] _data = [ Vector2( 0, 1 ), 0.0, -0.0636948, 0, 0, Vector2( 1, 0 ), -3.43886, 0.0, 0, 0 ] @@ -719,28 +716,7 @@ position = Vector2( 0, 3 ) shape = SubResource( 34 ) disabled = true -[node name="DeathSplatter" type="CPUParticles2D" parent="."] -pause_mode = 2 -emitting = false -amount = 16 -lifetime = 0.3 -one_shot = true -explosiveness = 0.9 -local_coords = false -texture = ExtResource( 15 ) -emission_shape = 2 -emission_rect_extents = Vector2( 4, 4 ) -direction = Vector2( 0, -1 ) -spread = 180.0 -gravity = Vector2( 0, 50 ) -initial_velocity = 60.0 -initial_velocity_random = 0.9 -damping = 2.0 -angle = 720.0 -angle_random = 1.0 -scale_amount = 0.5 -scale_amount_random = 1.0 -scale_amount_curve = SubResource( 41 ) +[node name="DeathSplatter" parent="." instance=ExtResource( 15 )] [node name="DustParticles" type="CPUParticles2D" parent="."] position = Vector2( 0, 12 ) diff --git a/objects/player/player_death_particles.tscn b/objects/player/player_death_particles.tscn new file mode 100644 index 0000000..5528792 --- /dev/null +++ b/objects/player/player_death_particles.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://graphics/particles/blood.png" type="Texture" id=1] + +[sub_resource type="Curve" id=41] +_data = [ Vector2( 0, 1 ), 0.0, -0.113537, 0, 0, Vector2( 1, 0 ), -3.35032, 0.0, 0, 0 ] + +[node name="DeathSplatter" type="CPUParticles2D"] +pause_mode = 2 +emitting = false +amount = 16 +lifetime = 0.3 +one_shot = true +explosiveness = 0.9 +local_coords = false +texture = ExtResource( 1 ) +emission_shape = 2 +emission_rect_extents = Vector2( 4, 4 ) +direction = Vector2( 0, -1 ) +spread = 180.0 +gravity = Vector2( 0, 50 ) +initial_velocity = 60.0 +initial_velocity_random = 0.9 +damping = 2.0 +angle = 720.0 +angle_random = 1.0 +scale_amount = 0.5 +scale_amount_random = 1.0 +scale_amount_curve = SubResource( 41 ) diff --git a/objects/player/player_scholar.gd b/objects/player/player_scholar.gd new file mode 100644 index 0000000..f370a2e --- /dev/null +++ b/objects/player/player_scholar.gd @@ -0,0 +1,265 @@ +extends KinematicBody2D + +# SIGNALS # +signal died() + +# CONSTANTS # +const ArrowProjectile = preload("res://objects/player/arrow_projectile.tscn") +const DeathSplatter = preload("res://objects/player/player_death_particles.tscn") + +# EXPORTS # +## horizontal movement speed +export var walk_speed: float = 50.0 +## climbing speed +export var climb_speed: float = 39.0 +## gravity force +export var gravity: float = 720.0 +## SG's terminal velocity +export var max_fall_speed: float = 255.0 +## upward added by jump +export var jump_force: float = 150.0 +## proportion of remaining force retained when jump is released +export var jump_release_force: float = 0.25 +## impulse added when double jumping +export var double_jump_force: float = 122.0 + + +# velocity +var velocity: Vector2 = Vector2.ZERO +# snap vector +var snap: Vector2 = Vector2.ZERO +# ladder currently attached to +var _attached_ladder: Node2D = null + + +# NODE REFERENCES # +onready var state_chart: StateChart = $StateChart +onready var animation_player: AnimationPlayer = $AnimationPlayer +onready var graphics: Node2D = $Graphics +onready var sprite: Sprite = $"%Sprite" +onready var arrow_position: Position2D = $"%ArrowPosition" +onready var dust_particles: CPUParticles2D = $"%DustParticles" +onready var grounded_shape: CollisionShape2D = $"%GroundedShape" +onready var airborne_shape: CollisionShape2D = $"%AirborneShape" +onready var ladder_detector: RayCast2D = $"%LadderDetector" +onready var death_splatter_position: Position2D = $"%DeathSplatterPosition" + + +# OVERRIDES # +func _ready() -> void: + Game.respawn_point = global_position + connect("died", Game, "_on_player_died") + move_and_slide(Vector2(0.0, 1.0), Vector2.UP) + state_chart.initialize() + state_chart.set_guard_property("can_respawn", true) + $StateDebugLayer/StateChartDebug.target = state_chart + +func _physics_process(delta: float) -> void: + # update transition guard properties + # whether player can currently shoot an arrow + var can_shoot = Game.arrows > 0 and get_tree().get_nodes_in_group("player_arrow").size() == 0 + state_chart.set_guard_property("can_shoot", can_shoot) + + # check for and propagate input events + if Input.is_action_just_pressed("jump"): # jumping + state_chart.send_event("jump") + if Input.is_action_just_pressed("shoot"): # shooting + state_chart.send_event("shoot") + + # send relevant events + if is_on_floor(): # check on floor status + state_chart.send_event("grounded") + else: + state_chart.send_event("airborne") + + # check if in contact with ladder + if ladder_detector.is_colliding(): + state_chart.send_event("ladder_touched") + + +# HELPER FUNCTIONS # +## spawns an arrow +func spawn_arrow() -> void: + var arrow = ArrowProjectile.instance() + arrow.global_position = arrow_position.global_position + arrow.direction = sign(arrow_position.global_position.x - global_position.x) + arrow.add_to_group("player_arrow") + get_parent().add_child(arrow) + Audio.play_sound(Audio.a_shoot, Audio.ac_jump) + +func die() -> void: + state_chart.send_event("hurt") + + +# STATE ENTERS/EXITS # +func _on_Grounded_state_entered() -> void: + # still jump if pressed frame hit ground + if Input.is_action_just_pressed("jump"): + print("BOING") + state_chart.send_event("jump") + # toggle hurtbox shapes + grounded_shape.disabled = false + airborne_shape.disabled = true + snap.y = 2.5 # snap when in grounded state + velocity.y = 1.0 + +func _on_Airborne_state_entered() -> void: + grounded_shape.disabled = true + airborne_shape.disabled = false + snap.y = 0.0 # do not snap when in air + velocity.y = 0.0 + +func _on_NormalJump_state_entered() -> void: + velocity.y = -jump_force + Audio.play_sound(Audio.a_jump, Audio.ac_jump) + animation_player.play("jump") + dust_particles.restart() + +func _on_NormalJump_state_exited() -> void: + # add bit of force proportional to how much of the jump is left + if Input.is_action_just_released("jump"): + var factor = inverse_lerp(0.0, -jump_force, velocity.y) + velocity.y = -jump_force * factor * jump_release_force + +func _on_LadderJump_state_entered() -> void: + velocity.y = -jump_force + Audio.play_sound(Audio.a_jump, Audio.ac_jump) + animation_player.play("jump") + +func _on_DoubleJump_state_entered() -> void: + velocity.y = -double_jump_force + Audio.play_sound(Audio.a_doublejump, Audio.ac_jump) + animation_player.play("double_jump") + +func _on_CoyoteFalling_state_entered() -> void: + velocity.x = 0.0 + animation_player.play("fall") + +func _on_NormalFalling_state_entered() -> void: + animation_player.play("fall") + +func _on_ScaredFalling_state_entered() -> void: + velocity.x = 0.0 + animation_player.play("fall_scared") + +func _on_Shooting_state_entered() -> void: + velocity.x = 0.0 + animation_player.play("shoot_grounded") + +func _on_AirShooting_state_entered() -> void: + spawn_arrow() + animation_player.play("shoot_airborne") + +func _on_Climbing_state_entered() -> void: + if ladder_detector.get_collider().is_in_group("ladder"): + _attached_ladder = ladder_detector.get_collider() + velocity = Vector2.ZERO + snap = Vector2.ZERO + if global_position.x < _attached_ladder.middle: + global_position.x = _attached_ladder.left_snap + graphics.scale.x = 1.0 + else: + global_position.x = _attached_ladder.right_snap + graphics.scale.x = -1.0 + animation_player.play("climb") + +func _on_Climbing_state_exited() -> void: + _attached_ladder = null + animation_player.playback_speed = 1.0 # restore playback speed + +# all the stuff that happens when they DIE +func _on_Dead_state_entered() -> void: + # send signals + emit_signal("died") + state_chart.send_event("died") + # spawn death particles + var particles = DeathSplatter.instance() + particles.global_position = death_splatter_position.global_position + particles.emitting = true + get_parent().add_child(particles) + # fade into the ether + graphics.visible = false + state_chart.send_event("respawn") + +func _on_Respawn_state_entered() -> void: + global_position = Game.respawn_point + graphics.visible = true + state_chart.call_deferred("send_event", "get_real") + + +# STATE PROCESSING # +## when on ground +func _process_grounded(delta: float) -> void: + # make sure is_on_floor detected still + velocity.y = 1.0 + +## called when player can move left and rightpass # Repass # Rpass # Replace with function body.eplace with function body.place with function body. +func _process_horizontal_movement(delta: float) -> void: + var input_dir = sign(Input.get_axis("ui_left", "ui_right")) # sign() to normalize + velocity.x = input_dir * walk_speed + if input_dir != 0.0: + graphics.scale.x = input_dir + +## walk/idle state +func _process_can_walk(delta: float) -> void: + if sign(Input.get_axis("ui_left", "ui_right")) != 0.0: + animation_player.play("walk") + else: + animation_player.play("idle") + +## climbing on ladders +func _process_climbing(delta: float) -> void: + # climbing movement + var input_dir = sign(Input.get_axis("ui_up", "ui_down")) + velocity.y = input_dir * climb_speed # move in input direction + animation_player.playback_speed = abs(input_dir) # play/pause animation + +# # switching sides of ladder +# if global_position.x < _attached_ladder.middle and Input.is_action_just_pressed("ui_right"): +# global_position.x = _attached_ladder.right_snap +# graphics.scale.x = -1SimCity.0SimCitySimCity +# elif Input.is_action_just_pressed("ui_left"): +# global_position.x = _attached_ladder.left_snap +# graphics.scale.x = 1.0 + + if Input.is_action_just_pressed("jump"): + global_position.x -= graphics.scale.x * 3.0 + state_chart.send_event("jump") + if Input.is_action_just_pressed("shoot"): + global_position.x -= graphics.scale.x * 3.0 + state_chart.send_event("ladder_detach") + + # check if still on ladder + if ladder_detector.get_collider() != _attached_ladder: + if input_dir == -1.0: + state_chart.send_event("jump") + else: + state_chart.send_event("ladder_detach") + +func _process_jump(delta: float) -> void: + if velocity.y >= 0.0: + state_chart.send_event("jump_peak") + if not Input.is_action_pressed("jump"): + state_chart.send_event("jump_released") + +## called by states SG will fall during +func _process_gravity(delta: float) -> void: + velocity.y = min(velocity.y + gravity * delta, max_fall_speed) + +## called after all other physics things +func _process_movement(delta: float) -> void: + # apply velocity and react to collisions + velocity = move_and_slide_with_snap(velocity, snap, Vector2.UP) + + # deal with that STUPID landing exactly on corner bug + var col = get_last_slide_collision() + if col != null: + if col.remainder.y >= 1.0 and col.normal.y == 0.0: + position.x += col.normal.x * 0.001 + + +# COLLISION CALLBACKS # +func _on_Hitbox_body_entered(body: Node) -> void: + if body.is_in_group("death"): + die() + diff --git a/objects/player/player_scholar.tscn b/objects/player/player_scholar.tscn new file mode 100644 index 0000000..7434f07 --- /dev/null +++ b/objects/player/player_scholar.tscn @@ -0,0 +1,956 @@ +[gd_scene load_steps=37 format=2] + +[ext_resource path="res://objects/player/player_scholar.gd" type="Script" id=1] +[ext_resource path="res://graphics/player/pal_purplearmor.png" type="Texture" id=2] +[ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=3] +[ext_resource path="res://graphics/player/sg_idle.png" type="Texture" id=4] +[ext_resource path="res://addons/godot_state_charts/parallel_state.gd" type="Script" id=5] +[ext_resource path="res://addons/godot_state_charts/state_chart.gd" type="Script" id=6] +[ext_resource path="res://ui/theme.tres" type="Theme" id=7] +[ext_resource path="res://addons/godot_state_charts/state_chart_debug.gd" type="Script" id=8] +[ext_resource path="res://addons/godot_state_charts/compound_state.gd" type="Script" id=9] +[ext_resource path="res://addons/godot_state_charts/transition.gd" type="Script" id=10] +[ext_resource path="res://addons/godot_state_charts/atomic_state.gd" type="Script" id=11] +[ext_resource path="res://graphics/player/sg_walk.png" type="Texture" id=12] +[ext_resource path="res://graphics/player/sg_jump.png" type="Texture" id=13] +[ext_resource path="res://graphics/player/sg_climb.png" type="Texture" id=14] +[ext_resource path="res://graphics/player/sg_shoot_grounded.png" type="Texture" id=15] +[ext_resource path="res://graphics/player/sg_shoot_air.png" type="Texture" id=16] +[ext_resource path="res://graphics/player/sg_doublejump.png" type="Texture" id=17] +[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=18] +[ext_resource path="res://graphics/player/sg_fall_scared.png" type="Texture" id=19] +[ext_resource path="res://graphics/player/sg_fall.png" type="Texture" id=20] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 3 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = true +shader_param/palette = ExtResource( 2 ) + +[sub_resource type="Curve" id=13] +_data = [ Vector2( 0, 1 ), 0.0, -0.0636948, 0, 0, Vector2( 1, 0 ), -3.43886, 0.0, 0, 0 ] + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 2.5, 5 ) + +[sub_resource type="RectangleShape2D" id=3] +extents = Vector2( 2.5, 5 ) + +[sub_resource type="RectangleShape2D" id=16] +extents = Vector2( 2.5, 2.5 ) + +[sub_resource type="Animation" id=5] +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ ExtResource( 4 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 1 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=9] +resource_name = "climb" +length = 0.3 +loop = true +step = 0.15 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 14 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 2 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.15 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 0, 1 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=12] +resource_name = "double_jump" +length = 0.32 +loop = true +step = 0.04 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 17 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 2 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.04, 0.08, 0.12, 0.16, 0.2, 0.24, 0.28 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 0, 1, 0, 1, 0, 1 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 0.08, 0.16, 0.24 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 0.0, 90.0, 180.0, 270.0 ] +} + +[sub_resource type="Animation" id=15] +resource_name = "fall" +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 20 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 1 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=14] +resource_name = "fall_scared" +length = 0.2 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 19 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 2 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.1 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 0, 1 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0.00238396 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=6] +resource_name = "idle" +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 4 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 1 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=8] +resource_name = "jump" +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 13 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 1 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=11] +resource_name = "shoot_airborne" +length = 0.001 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 16 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 0.001 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 1, +"values": [ 1, 1 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 0 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="Animation" id=10] +resource_name = "shoot_grounded" +length = 0.25 +step = 0.05 +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 15 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 6 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.03, 0.06, 0.12, 0.15, 0.18 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3, 4, 5 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} +tracks/4/type = "method" +tracks/4/path = NodePath(".") +tracks/4/interp = 1 +tracks/4/loop_wrap = true +tracks/4/imported = false +tracks/4/enabled = true +tracks/4/keys = { +"times": PoolRealArray( 0.12 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "spawn_arrow" +} ] +} +tracks/5/type = "method" +tracks/5/path = NodePath("StateChart") +tracks/5/interp = 1 +tracks/5/loop_wrap = true +tracks/5/imported = false +tracks/5/enabled = true +tracks/5/keys = { +"times": PoolRealArray( 0.25 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ "shoot_end" ], +"method": "send_event" +} ] +} + +[sub_resource type="Animation" id=7] +resource_name = "walk" +length = 0.4 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Graphics/Sprite:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ ExtResource( 12 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Graphics/Sprite:hframes") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ 4 ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Graphics/Sprite:frame") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ), +"transitions": PoolRealArray( 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3 ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Graphics/Sprite:rotation_degrees") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 0.0 ] +} + +[sub_resource type="StyleBoxEmpty" id=4] + +[node name="Player" type="KinematicBody2D" groups=["player"]] +collision_layer = 0 +collision_mask = 7 +script = ExtResource( 1 ) +gravity = 700.0 +jump_force = 140.0 +double_jump_force = 124.0 + +[node name="Graphics" type="Node2D" parent="."] + +[node name="Sprite" type="Sprite" parent="Graphics"] +unique_name_in_owner = true +material = SubResource( 1 ) +position = Vector2( 0, -10 ) +texture = ExtResource( 4 ) + +[node name="ArrowPosition" type="Position2D" parent="Graphics"] +unique_name_in_owner = true +position = Vector2( 5, -7 ) +__meta__ = { +"_gizmo_extents_": 2.0 +} + +[node name="DeathSplatterPosition" type="Position2D" parent="Graphics"] +unique_name_in_owner = true +position = Vector2( 0, -10 ) +__meta__ = { +"_gizmo_extents_": 2.0 +} + +[node name="DustParticles" type="CPUParticles2D" parent="Graphics"] +unique_name_in_owner = true +position = Vector2( 0, 2 ) +z_index = 1 +emitting = false +amount = 5 +lifetime = 0.3 +one_shot = true +explosiveness = 0.9 +fract_delta = false +local_coords = false +texture = ExtResource( 18 ) +emission_shape = 2 +emission_rect_extents = Vector2( 5, 0 ) +direction = Vector2( 0, -1 ) +spread = 60.0 +gravity = Vector2( 0, 0 ) +initial_velocity = 10.0 +initial_velocity_random = 0.8 +angle = 720.0 +angle_random = 1.0 +scale_amount = 0.25 +scale_amount_random = 0.5 +scale_amount_curve = SubResource( 13 ) + +[node name="BodyShape" type="CollisionShape2D" parent="."] +position = Vector2( 0.5, -5 ) +shape = SubResource( 2 ) + +[node name="Hitbox" type="Area2D" parent="." groups=["player_hitbox"]] +collision_layer = 11 +collision_mask = 32 + +[node name="GroundedShape" type="CollisionShape2D" parent="Hitbox"] +unique_name_in_owner = true +position = Vector2( 0.5, -5 ) +shape = SubResource( 3 ) + +[node name="AirborneShape" type="CollisionShape2D" parent="Hitbox"] +unique_name_in_owner = true +position = Vector2( 0.5, -7.5 ) +shape = SubResource( 16 ) + +[node name="LadderDetector" type="RayCast2D" parent="."] +unique_name_in_owner = true +position = Vector2( 0.5, 0 ) +enabled = true +cast_to = Vector2( 0, -10 ) +collision_mask = 64 +collide_with_areas = true +collide_with_bodies = false + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/RESET = SubResource( 5 ) +anims/climb = SubResource( 9 ) +anims/double_jump = SubResource( 12 ) +anims/fall = SubResource( 15 ) +anims/fall_scared = SubResource( 14 ) +anims/idle = SubResource( 6 ) +anims/jump = SubResource( 8 ) +anims/shoot_airborne = SubResource( 11 ) +anims/shoot_grounded = SubResource( 10 ) +anims/walk = SubResource( 7 ) + +[node name="StateChart" type="Node" parent="."] +script = ExtResource( 6 ) +auto_initialize = false + +[node name="Root" type="Node" parent="StateChart"] +script = ExtResource( 5 ) +__meta__ = { +"_editor_description_": "" +} + +[node name="Movement" type="Node" parent="StateChart/Root"] +process_priority = 10 +script = ExtResource( 9 ) +__meta__ = { +"_editor_description_": "higher process priority so it can do move_and_slide after everything else" +} +initial_state = NodePath("Grounded") + +[node name="On Died" type="Node" parent="StateChart/Root/Movement"] +script = ExtResource( 10 ) +to = NodePath("../Inactive") +event = "died" + +[node name="Grounded" type="Node" parent="StateChart/Root/Movement"] +script = ExtResource( 9 ) +__meta__ = { +"_editor_description_": "is on the ground" +} +initial_state = NodePath("CanWalk") + +[node name="On Airborne" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 10 ) +to = NodePath("../../Airborne/Falling/CoyoteFalling") +event = "airborne" + +[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 10 ) +__meta__ = { +"_editor_description_": "enter jump state when the jump button is pressed" +} +to = NodePath("../../Airborne/Jump/NormalJump") +event = "jump" + +[node name="On LadderTouched" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 10 ) +to = NodePath("../../Climbing") +event = "ladder_touched" + +[node name="CanWalk" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 11 ) +__meta__ = { +"_editor_description_": "can walk by moving left and right" +} + +[node name="On Shoot" type="Node" parent="StateChart/Root/Movement/Grounded/CanWalk"] +script = ExtResource( 10 ) +to = NodePath("../../Shooting") +event = "shoot" +guard_expression = "can_shoot" + +[node name="Shooting" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 11 ) +consumed_events = [ "jump" ] + +[node name="On ShootEnd" type="Node" parent="StateChart/Root/Movement/Grounded/Shooting"] +script = ExtResource( 10 ) +to = NodePath("../../CanWalk") +event = "shoot_end" + +[node name="Pushing" type="Node" parent="StateChart/Root/Movement/Grounded"] +script = ExtResource( 11 ) + +[node name="Airborne" type="Node" parent="StateChart/Root/Movement"] +process_priority = 5 +script = ExtResource( 9 ) +__meta__ = { +"_editor_description_": "SG is in the air and falling DOWN, better think fast!" +} +initial_state = NodePath("Falling") + +[node name="On Grounded" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 10 ) +to = NodePath("../../Grounded") +event = "grounded" + +[node name="On Shoot" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 10 ) +to = NodePath("../AirShooting") +event = "shoot" +guard_expression = "can_shoot" + +[node name="On LadderTouched" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 10 ) +to = NodePath("../../Climbing") +event = "ladder_touched" + +[node name="Jump" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 9 ) +initial_state = NodePath("NormalJump") + +[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Airborne/Jump"] +script = ExtResource( 10 ) +__meta__ = { +"_editor_description_": "enter double jump state when the jump button is pressed" +} +to = NodePath("../../DoubleJump") +event = "jump" + +[node name="On JumpPeak" type="Node" parent="StateChart/Root/Movement/Airborne/Jump"] +script = ExtResource( 10 ) +to = NodePath("../../Falling/NormalFalling") +event = "jump_peak" + +[node name="NormalJump" type="Node" parent="StateChart/Root/Movement/Airborne/Jump"] +script = ExtResource( 11 ) + +[node name="On JumpReleased" type="Node" parent="StateChart/Root/Movement/Airborne/Jump/NormalJump"] +script = ExtResource( 10 ) +__meta__ = { +"_editor_description_": "" +} +to = NodePath("../../../Falling/NormalFalling") +event = "jump_released" + +[node name="LadderJump" type="Node" parent="StateChart/Root/Movement/Airborne/Jump"] +script = ExtResource( 11 ) + +[node name="Falling" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 9 ) +initial_state = NodePath("NormalFalling") + +[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"] +script = ExtResource( 10 ) +__meta__ = { +"_editor_description_": "enter double jump state when the jump button is pressed" +} +to = NodePath("../../DoubleJump") +event = "jump" + +[node name="CoyoteFalling" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"] +script = ExtResource( 11 ) + +[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Airborne/Falling/CoyoteFalling"] +script = ExtResource( 10 ) +__meta__ = { +"_editor_description_": "enter jump state when the jump button is pressed" +} +to = NodePath("../../../Jump/NormalJump") +event = "jump" + +[node name="On CoyoteTimeout" type="Node" parent="StateChart/Root/Movement/Airborne/Falling/CoyoteFalling"] +script = ExtResource( 10 ) +to = NodePath("../../ScaredFalling") +delay = 0.067 + +[node name="NormalFalling" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"] +script = ExtResource( 11 ) + +[node name="ScaredFalling" type="Node" parent="StateChart/Root/Movement/Airborne/Falling"] +script = ExtResource( 11 ) + +[node name="DoubleJump" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 11 ) + +[node name="AirShooting" type="Node" parent="StateChart/Root/Movement/Airborne"] +script = ExtResource( 11 ) + +[node name="Climbing" type="Node" parent="StateChart/Root/Movement"] +script = ExtResource( 11 ) +__meta__ = { +"_editor_description_": "stuck to ladder" +} + +[node name="On Jump" type="Node" parent="StateChart/Root/Movement/Climbing"] +script = ExtResource( 10 ) +to = NodePath("../../Airborne/Jump/LadderJump") +event = "jump" + +[node name="On LadderDetach" type="Node" parent="StateChart/Root/Movement/Climbing"] +script = ExtResource( 10 ) +to = NodePath("../../Airborne/Falling/NormalFalling") +event = "ladder_detach" + +[node name="Inactive" type="Node" parent="StateChart/Root/Movement"] +script = ExtResource( 11 ) +__meta__ = { +"_editor_description_": "player can not move or do anything, immobile" +} + +[node name="On Respawn" type="Node" parent="StateChart/Root/Movement/Inactive"] +script = ExtResource( 10 ) +to = NodePath("../../Grounded") +event = "get_real" + +[node name="Health" type="Node" parent="StateChart/Root"] +script = ExtResource( 9 ) +initial_state = NodePath("Vulnerable") + +[node name="Vulnerable" type="Node" parent="StateChart/Root/Health"] +script = ExtResource( 11 ) + +[node name="On Hurt" type="Node" parent="StateChart/Root/Health/Vulnerable"] +script = ExtResource( 10 ) +to = NodePath("../../Dead") +event = "hurt" + +[node name="Invulnerable" type="Node" parent="StateChart/Root/Health"] +script = ExtResource( 11 ) + +[node name="Respawn" type="Node" parent="StateChart/Root/Health"] +script = ExtResource( 11 ) + +[node name="On Timeout" type="Node" parent="StateChart/Root/Health/Respawn"] +script = ExtResource( 10 ) +to = NodePath("../../Vulnerable") + +[node name="Dead" type="Node" parent="StateChart/Root/Health"] +script = ExtResource( 11 ) + +[node name="On Respawn" type="Node" parent="StateChart/Root/Health/Dead"] +script = ExtResource( 10 ) +to = NodePath("../../Respawn") +event = "respawn" +guard_expression = "can_respawn" + +[node name="StateDebugLayer" type="CanvasLayer" parent="."] +layer = 128 + +[node name="StateChartDebug" type="Tree" parent="StateDebugLayer"] +visible = false +anchor_left = 1.0 +anchor_right = 1.0 +margin_left = -147.0 +margin_bottom = 137.0 +theme = ExtResource( 7 ) +custom_styles/bg = SubResource( 4 ) +script = ExtResource( 8 ) + +[connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement" to="." method="_process_movement"] +[connection signal="state_entered" from="StateChart/Root/Movement/Grounded" to="." method="_on_Grounded_state_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded" to="." method="_process_grounded"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_horizontal_movement"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Grounded/CanWalk" to="." method="_process_can_walk"] +[connection signal="state_entered" from="StateChart/Root/Movement/Grounded/Shooting" to="." method="_on_Shooting_state_entered"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne" to="." method="_on_Airborne_state_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne" to="." method="_process_gravity"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_horizontal_movement"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Jump" to="." method="_process_jump"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Jump/NormalJump" to="." method="_on_NormalJump_state_entered"] +[connection signal="state_exited" from="StateChart/Root/Movement/Airborne/Jump/NormalJump" to="." method="_on_NormalJump_state_exited"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Jump/LadderJump" to="." method="_on_LadderJump_state_entered"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Falling/CoyoteFalling" to="." method="_on_CoyoteFalling_state_entered"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Falling/NormalFalling" to="." method="_on_NormalFalling_state_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/Falling/NormalFalling" to="." method="_process_horizontal_movement"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/Falling/ScaredFalling" to="." method="_on_ScaredFalling_state_entered"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/DoubleJump" to="." method="_on_DoubleJump_state_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/DoubleJump" to="." method="_process_horizontal_movement"] +[connection signal="state_entered" from="StateChart/Root/Movement/Airborne/AirShooting" to="." method="_on_AirShooting_state_entered"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Airborne/AirShooting" to="." method="_process_horizontal_movement"] +[connection signal="state_entered" from="StateChart/Root/Movement/Climbing" to="." method="_on_Climbing_state_entered"] +[connection signal="state_exited" from="StateChart/Root/Movement/Climbing" to="." method="_on_Climbing_state_exited"] +[connection signal="state_physics_processing" from="StateChart/Root/Movement/Climbing" to="." method="_process_climbing"] +[connection signal="state_entered" from="StateChart/Root/Health/Respawn" to="." method="_on_Respawn_state_entered"] +[connection signal="state_entered" from="StateChart/Root/Health/Dead" to="." method="_on_Dead_state_entered"] diff --git a/objects/respawn_point.gd b/objects/respawn_point.gd index b7b5792..7f280d3 100644 --- a/objects/respawn_point.gd +++ b/objects/respawn_point.gd @@ -4,7 +4,7 @@ export var match_h = false export var match_v = true func _on_RespawnPoint_area_entered(area): - if area.is_in_group("player"): + if area.is_in_group("player_hitbox"): if Game.get_sector(global_position) != Game.get_sector(Game.respawn_point): var player = area.get_parent() Game.respawn_point = Vector2(