diff --git a/Enemies/Glowing Ghost.gd b/Enemies/Glowing Ghost.gd index 2825b5c..393bbe2 100644 --- a/Enemies/Glowing Ghost.gd +++ b/Enemies/Glowing Ghost.gd @@ -7,21 +7,21 @@ var velocity: Vector2 = Vector2.ZERO func _physics_process(_delta: float) -> void: - velocity = Vector2.ZERO + velocity = Vector2.ZERO - if player: - velocity = position.direction_to(player.position).normalized() * SPEED + if player: + velocity = position.direction_to(player.position).normalized() * SPEED - velocity = move_and_slide(velocity) - return + velocity = move_and_slide(velocity) + return func _on_player_detector_area_entered(area: Area2D) -> void: - if area.get_parent().name == 'Player': - player = area.get_parent() - return + if area.get_parent().name == 'Player': + player = area.get_parent() + return func _on_player_detector_area_exited(_area: Area2D): - player = null - return + player = null + return diff --git a/Enemies/Glowing Ghost.tscn b/Enemies/Glowing Ghost.tscn index 78e26a0..9d2ba8c 100644 --- a/Enemies/Glowing Ghost.tscn +++ b/Enemies/Glowing Ghost.tscn @@ -12,7 +12,9 @@ height = 2.0 [sub_resource type="CircleShape2D" id=2] radius = 50.0 -[node name="Glowing Ghost" type="KinematicBody2D" groups=["enemies"]] +[node name="Glowing Ghost" type="KinematicBody2D" groups=[ +"enemies", +]] collision_layer = 2 script = ExtResource( 4 ) @@ -27,10 +29,10 @@ position = Vector2( 0, -3 ) shape = SubResource( 1 ) [node name="Player Detector" type="Area2D" parent="."] -collision_layer = 0 -collision_mask = 2 input_pickable = false monitorable = false +collision_layer = 0 +collision_mask = 2 [node name="CollisionShape2D" type="CollisionShape2D" parent="Player Detector"] visible = false diff --git a/Enemies/snowball.gd b/Enemies/snowball.gd index 434ef34..6e596bb 100644 --- a/Enemies/snowball.gd +++ b/Enemies/snowball.gd @@ -1,5 +1,6 @@ extends Area2D + var move = Vector2.ZERO var look_vec = Vector2.ZERO var player = null @@ -7,10 +8,16 @@ var speed = 3 func _ready(): - look_vec = player.position - global_position + look_vec = player.position - position func _physics_process(delta): - move = Vector2.ZERO - move = move.move_toward(look_vec, delta) - move = move.normalized() * speed - position += move + move = Vector2.ZERO + move = move.move_toward(look_vec, delta) + move = move.normalized() * speed + position += move + + + #position = position.move_toward(look_vec, delta).normalized() * SPEED + + + diff --git a/Enemies/snowball.tscn b/Enemies/snowball.tscn index 8614eb3..a39bce3 100644 --- a/Enemies/snowball.tscn +++ b/Enemies/snowball.tscn @@ -7,11 +7,12 @@ radius = 4.47823 [node name="snowball" type="Area2D"] +collision_layer = 2 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +[node name="snowball" type="CollisionShape2D" parent="."] position = Vector2( -0.00869751, -0.0361767 ) shape = SubResource( 1 ) diff --git a/Enemies/snowball_blue.gd b/Enemies/snowball_blue.gd index 434ef34..8740551 100644 --- a/Enemies/snowball_blue.gd +++ b/Enemies/snowball_blue.gd @@ -7,10 +7,12 @@ var speed = 3 func _ready(): - look_vec = player.position - global_position + look_vec = player.position - global_position func _physics_process(delta): - move = Vector2.ZERO - move = move.move_toward(look_vec, delta) - move = move.normalized() * speed - position += move + move = Vector2.ZERO + move = move.move_toward(look_vec, delta) + move = move.normalized() * speed + position += move + + diff --git a/Enemies/snowball_blue.tscn b/Enemies/snowball_blue.tscn index ce62734..cfe3f2b 100644 --- a/Enemies/snowball_blue.tscn +++ b/Enemies/snowball_blue.tscn @@ -6,12 +6,15 @@ [sub_resource type="CircleShape2D" id=1] radius = 4.47823 -[node name="snowball_blue" type="Area2D"] +[node name="snowball_blue" type="Area2D" groups=[ +"enemies", +]] +collision_layer = 2 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] +position = Vector2( 0, -2 ) texture = ExtResource( 1 ) -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( -0.00869751, -0.0361767 ) +[node name="snowball_blue" type="CollisionShape2D" parent="."] shape = SubResource( 1 ) diff --git a/Enemies/snowmen_enemy.gd b/Enemies/snowmen_enemy.gd index 85ae2c5..39479cb 100644 --- a/Enemies/snowmen_enemy.gd +++ b/Enemies/snowmen_enemy.gd @@ -7,36 +7,47 @@ var move = Vector2.ZERO var speed = .5 func _physics_process(delta: float) -> void: - move = Vector2.ZERO + move = Vector2.ZERO - if player != null: - move = position.direction_to(player.position) * speed - else: - move = Vector2.ZERO + if player != null: + move = position.direction_to(player.position) * speed + else: + move = Vector2.ZERO - move = move.normalized() - move = move_and_collide(move) + move = move.normalized() + move = move_and_collide(move) func _on_Area2D_body_entered(body: Node) -> void: - if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): - player = body + if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): + player = body func _on_Area2D_body_exited(body: Node) -> void: - if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): - player = null + if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): + player = null func fire(): - var snowball = SNOWBALL_SCENE.instance() - snowball.position = get_global_position() - snowball.player = player - get_parent().add_child(snowball) - $Timer.set_wait_time(1) + var snowball = SNOWBALL_SCENE.instance() + snowball.position = get_global_position() + snowball.player = player + get_parent().add_child(snowball) + $Timer.set_wait_time(1) func _on_Timer_timeout() -> void: - if player != null: - fire() + if player != null: + fire() + + +func _on_player_detector_area_entered(area: Area2D) -> void: + if area.get_parent().name == 'Player': + player = area.get_parent() + return + + +func _on_player_detector_area_exited(_area: Area2D): + player = null + return diff --git a/Enemies/snowmen_enemy.tscn b/Enemies/snowmen_enemy.tscn index 6179acb..abffaa3 100644 --- a/Enemies/snowmen_enemy.tscn +++ b/Enemies/snowmen_enemy.tscn @@ -11,6 +11,7 @@ height = 5.0 radius = 56.0659 [node name="snowmen_enemy" type="KinematicBody2D"] +collision_layer = 2 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] @@ -19,16 +20,16 @@ texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] shape = SubResource( 1 ) -[node name="Area2D" type="Area2D" parent="."] +[node name="detection" type="Area2D" parent="."] collision_layer = 2 collision_mask = 2 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +[node name="detection" type="CollisionShape2D" parent="detection"] shape = SubResource( 2 ) [node name="Timer" type="Timer" parent="."] autostart = true -[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"] -[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"] +[connection signal="body_entered" from="detection" to="." method="_on_Area2D_body_entered"] +[connection signal="body_exited" from="detection" to="." method="_on_Area2D_body_exited"] [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/Enemies/snowmen_enemy_blue.gd b/Enemies/snowmen_enemy_blue.gd index 23e6d85..e1dc929 100644 --- a/Enemies/snowmen_enemy_blue.gd +++ b/Enemies/snowmen_enemy_blue.gd @@ -7,36 +7,46 @@ var move = Vector2.ZERO var speed = 1 func _physics_process(delta: float) -> void: - move = Vector2.ZERO + move = Vector2.ZERO - if player != null: - move = position.direction_to(player.position) * speed - else: - move = Vector2.ZERO + if player != null: + move = position.direction_to(player.position) * speed + else: + move = Vector2.ZERO - move = move.normalized() - move = move_and_collide(move) + move = move.normalized() + move = move_and_collide(move) func _on_Area2D_body_entered(body: Node) -> void: - if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): - player = body + if body != self && !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): + player = body func _on_Area2D_body_exited(body: Node) -> void: - if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): - player = null + if !(body.name.begins_with("tree")) && !(body.name.begins_with("snowmen_enemy")) && !(body.name.begins_with("wall")): + player = null func fire(): - var snowball = SNOWBALL_BLUE_SCENE.instance() - snowball.position = get_global_position() - snowball.player = player - get_parent().add_child(snowball) - $Timer.set_wait_time(1) + var snowball = SNOWBALL_BLUE_SCENE.instance() + snowball.position = get_global_position() + snowball.player = player + get_parent().add_child(snowball) + $Timer.set_wait_time(1) func _on_Timer_timeout() -> void: - if player != null: - fire() + if player != null: + fire() + +func _on_player_detector_area_entered(area: Area2D) -> void: + if area.get_parent().name == 'Player': + player = area.get_parent() + return + + +func _on_player_detector_area_exited(_area: Area2D): + player = null + return diff --git a/Enemies/snowmen_enemy_blue.tscn b/Enemies/snowmen_enemy_blue.tscn index 644ab3a..8a0d1ac 100644 --- a/Enemies/snowmen_enemy_blue.tscn +++ b/Enemies/snowmen_enemy_blue.tscn @@ -11,24 +11,26 @@ height = 5.0 radius = 58.0175 [node name="snowmen_enemy" type="KinematicBody2D"] +collision_layer = 2 script = ExtResource( 2 ) [node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 0.556812, 0.44545 ) shape = SubResource( 1 ) -[node name="Area2D" type="Area2D" parent="."] +[node name="detection" type="Area2D" parent="."] collision_layer = 2 collision_mask = 2 -[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +[node name="detection" type="CollisionShape2D" parent="detection"] shape = SubResource( 2 ) [node name="Timer" type="Timer" parent="."] autostart = true -[connection signal="body_entered" from="Area2D" to="." method="_on_Area2D_body_entered"] -[connection signal="body_exited" from="Area2D" to="." method="_on_Area2D_body_exited"] +[connection signal="body_entered" from="detection" to="." method="_on_Area2D_body_entered"] +[connection signal="body_exited" from="detection" to="." method="_on_Area2D_body_exited"] [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/Levels/Interactives/Countdown.gd b/Levels/Interactives/Countdown.gd index 165f538..a020295 100644 --- a/Levels/Interactives/Countdown.gd +++ b/Levels/Interactives/Countdown.gd @@ -5,23 +5,23 @@ export (int) var seconds = 0 var dsec = 0 func _physics_process(delta: float) -> void: - if seconds > 0 and dsec <= 0: - seconds -=1 - dsec = 10 - if minutes > 0 and seconds <= 0: - minutes -= 1 - seconds = 60 + if seconds > 0 and dsec <= 0: + seconds -=1 + dsec = 10 + if minutes > 0 and seconds <= 0: + minutes -= 1 + seconds = 60 - if seconds >= 10: - $sec.set_text(str(seconds)) - else: - $sec.set_text("0"+str(seconds)) + if seconds >= 10: + $sec.set_text(str(seconds)) + else: + $sec.set_text("0"+str(seconds)) - if dsec >=10: - $dsec.set_text(str(dsec)) - else: - $dsec.set_text("0" + str(dsec)) + if dsec >=10: + $dsec.set_text(str(dsec)) + else: + $dsec.set_text("0" + str(dsec)) func _on_Timer_timeout() -> void: - dsec-=1 - pass # Replace with function body. + dsec-=1 + pass # Replace with function body. diff --git a/Levels/Level 3.gd b/Levels/Level 3.gd index f55b8f9..412c2d7 100644 --- a/Levels/Level 3.gd +++ b/Levels/Level 3.gd @@ -7,17 +7,21 @@ var screensize var score = 0 func _ready() -> void: - $YSort/Player.load_hud($HUD) - $YSort/Player.position = get_viewport_rect().size / 2 - randomize() - screensize = get_viewport_rect().size - set_process(true) - spawn_coins(5) - return + $YSort/Player.load_hud($HUD) + $YSort/Player.position = get_viewport_rect().size / 2 + randomize() + screensize = get_viewport_rect().size + set_process(true) + spawn_coins(5) + return + +func _process(delta): + if $AudioStreamPlayer.playing == false: + $AudioStreamPlayer.play() func spawn_coins(num): - for i in range(num): - var g = coin.instance() - $'YSort/coin_container'.add_child(g) - #g.set_pos(Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40))) - g.position = Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40)) + for i in range(num): + var g = coin.instance() + $'YSort/coin_container'.add_child(g) + #g.set_pos(Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40))) + g.position = Vector2(rand_range(0, screensize.x-40), rand_range(0, screensize.y-40)) diff --git a/Levels/Level 3.tscn b/Levels/Level 3.tscn index 4d6f363..6ef1ad6 100644 --- a/Levels/Level 3.tscn +++ b/Levels/Level 3.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=2] +[gd_scene load_steps=16 format=2] [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://Levels/Level 3.gd" type="Script" id=2] @@ -10,6 +10,7 @@ [ext_resource path="res://Levels/Interactives/Countdown.gd" type="Script" id=8] [ext_resource path="res://GUI/HUD.tscn" type="PackedScene" id=9] [ext_resource path="res://GUI/Pause Screen.tscn" type="PackedScene" id=10] +[ext_resource path="res://Music/Level_3.mp3" type="AudioStream" id=11] [sub_resource type="CapsuleShape2D" id=1] radius = 9.0515 @@ -48,25 +49,33 @@ FRICTION = 500 [node name="tree6" type="StaticBody2D" parent="YSort"] [node name="CollisionShape2D" type="CollisionShape2D" parent="YSort/tree6"] -position = Vector2( 72.1774, 92.5564 ) +position = Vector2( 71.8801, 91.6645 ) shape = SubResource( 1 ) [node name="forestTreeBig2" type="Sprite" parent="YSort/tree6"] position = Vector2( 72.0738, 92.0067 ) texture = ExtResource( 5 ) -[node name="snowmen_enemy5" parent="YSort" instance=ExtResource( 6 )] -position = Vector2( 292.382, 22.7352 ) +[node name="blue_snowman2" parent="YSort" groups=[ +"enemies", +] instance=ExtResource( 6 )] +position = Vector2( 259.084, 49.7897 ) script = ExtResource( 7 ) -[node name="snowmen_enemy4" parent="YSort" instance=ExtResource( 6 )] +[node name="blue_snowman" parent="YSort" groups=[ +"enemies", +] instance=ExtResource( 6 )] position = Vector2( 261.1, 142.19 ) script = ExtResource( 7 ) -[node name="snowmen_enemy2" parent="YSort" instance=ExtResource( 4 )] +[node name="snowmen_enemy2" parent="YSort" groups=[ +"enemies", +] instance=ExtResource( 4 )] position = Vector2( 190.316, 146.569 ) -[node name="snowmen_enemy" parent="YSort" instance=ExtResource( 4 )] +[node name="snowmen_enemy" parent="YSort" groups=[ +"enemies", +] instance=ExtResource( 4 )] position = Vector2( 67.4812, 153.194 ) [node name="tree5" type="StaticBody2D" parent="YSort"] @@ -204,6 +213,9 @@ margin_top = 4.7622 margin_right = 198.512 margin_bottom = 44.7622 text = "0" +__meta__ = { +"_edit_use_anchors_": false +} [node name="Timer" type="Timer" parent="Countdown"] process_mode = 0 @@ -214,4 +226,7 @@ autostart = true [node name="Pause Screen" parent="." instance=ExtResource( 10 )] +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 11 ) + [connection signal="timeout" from="Countdown/Timer" to="Countdown" method="_on_Timer_timeout"] diff --git a/Levels/Level 5.gd b/Levels/Level 5.gd index 06b26e7..5c4d9ab 100644 --- a/Levels/Level 5.gd +++ b/Levels/Level 5.gd @@ -2,5 +2,5 @@ extends Node2D func _ready() -> void: - $YSort/Player.load_hud($HUD) - return + $YSort/Player.load_hud($HUD) + return diff --git a/Levels/Level 5.tscn b/Levels/Level 5.tscn index abe97fe..c37618d 100644 --- a/Levels/Level 5.tscn +++ b/Levels/Level 5.tscn @@ -15,6 +15,7 @@ script = ExtResource( 2 ) [node name="CanvasModulate" type="CanvasModulate" parent="."] +visible = false color = Color( 0, 0, 0, 1 ) [node name="Floor" type="TileMap" parent="."] diff --git a/Main.gd b/Main.gd index 4358798..3638210 100644 --- a/Main.gd +++ b/Main.gd @@ -7,74 +7,74 @@ export var world_path: String func _ready() -> void: - var splash_screen: Node = play_splash_screen() - yield(splash_screen, 'complete') - splash_screen = null + var splash_screen: Node = play_splash_screen() + yield(splash_screen, 'complete') + splash_screen = null - var main_menu: Node = play_main_menu() - yield(main_menu, 'complete') - free_connected_node(main_menu, 'main_menu_option') - main_menu = null - return + var main_menu: Node = play_main_menu() + yield(main_menu, 'complete') + free_connected_node(main_menu, 'main_menu_option') + main_menu = null + return func play_splash_screen() -> Node: - var splash_screen: Node = load(splash_screen_path).instance() - if splash_screen.connect('complete', self, 'free_connected_node', - [splash_screen, 'free_connected_node']) != OK: - print('ERROR: Splash Screen "complete" signal already connected.') + var splash_screen: Node = load(splash_screen_path).instance() + if splash_screen.connect('complete', self, 'free_connected_node', + [splash_screen, 'free_connected_node']) != OK: + print('ERROR: Splash Screen "complete" signal already connected.') - add_child(splash_screen) - return splash_screen + add_child(splash_screen) + return splash_screen func play_main_menu() -> Node: - var main_menu: Node = load(main_menu_path).instance() - if main_menu.connect('complete', self, 'main_menu_option') != OK: - print('ERROR: Main Menu "complete" signal already connected.') + var main_menu: Node = load(main_menu_path).instance() + if main_menu.connect('complete', self, 'main_menu_option') != OK: + print('ERROR: Main Menu "complete" signal already connected.') - add_child(main_menu) - return main_menu + add_child(main_menu) + return main_menu func main_menu_option(option: String) -> void: - if option == 'new game': - var level_select_menu: Node = play_level_select_menu() - yield(level_select_menu, 'complete') - free_connected_node(level_select_menu, 'level_select_menu_option') - level_select_menu = null - return + if option == 'new game': + var level_select_menu: Node = play_level_select_menu() + yield(level_select_menu, 'complete') + free_connected_node(level_select_menu, 'level_select_menu_option') + level_select_menu = null + return func play_level_select_menu() -> Node: - var level_select_menu: Node = load(level_select_menu_path).instance() - if level_select_menu.connect('complete', self, 'level_select_menu_option') != OK: - print('ERROR: Level Select Menu "complete" signal already connected.') + var level_select_menu: Node = load(level_select_menu_path).instance() + if level_select_menu.connect('complete', self, 'level_select_menu_option') != OK: + print('ERROR: Level Select Menu "complete" signal already connected.') - add_child(level_select_menu) - return level_select_menu + add_child(level_select_menu) + return level_select_menu func level_select_menu_option(option: String) -> void: - var level: String = 'res://Levels/' - if option == 'H': - level += 'Hub World.tscn' - else: - level += 'Level ' + option + '.tscn' + var level: String = 'res://Levels/' + if option == 'H': + level += 'Hub World.tscn' + else: + level += 'Level ' + option + '.tscn' - new_game(level) - return + new_game(level) + return func free_connected_node(node: Node, connected_function: String) -> void: - node.disconnect('complete', self, connected_function) - remove_child(node) - node.queue_free() - return + node.disconnect('complete', self, connected_function) + remove_child(node) + node.queue_free() + return func new_game(level: String) -> void: - if get_tree().change_scene(level) != OK: - print('ERROR: Main failed to change scene to Level.') - queue_free() - return + if get_tree().change_scene(level) != OK: + print('ERROR: Main failed to change scene to Level.') + queue_free() + return diff --git a/Music/Level_3.mp3 b/Music/Level_3.mp3 new file mode 100644 index 0000000..a0c7ae8 Binary files /dev/null and b/Music/Level_3.mp3 differ diff --git a/Music/Level_3.mp3.import b/Music/Level_3.mp3.import new file mode 100644 index 0000000..54e671c --- /dev/null +++ b/Music/Level_3.mp3.import @@ -0,0 +1,15 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +path="res://.import/Level_3.mp3-c1f27f9292fb52473328a029b05dce7d.mp3str" + +[deps] + +source_file="res://Music/Level_3.mp3" +dest_files=[ "res://.import/Level_3.mp3-c1f27f9292fb52473328a029b05dce7d.mp3str" ] + +[params] + +loop=true +loop_offset=0 diff --git a/Player/Player.gd b/Player/Player.gd index 174273f..e5764b3 100644 --- a/Player/Player.gd +++ b/Player/Player.gd @@ -12,65 +12,86 @@ var velocity: Vector2 = Vector2.ZERO func _physics_process(delta: float) -> void: - var input_vector: Vector2 = Vector2.ZERO + var input_vector: Vector2 = Vector2.ZERO - input_vector.x = Input.get_action_strength('player_right') \ - - Input.get_action_strength('player_left') - input_vector.y = Input.get_action_strength('player_down') \ - - Input.get_action_strength('player_up') - input_vector = input_vector.normalized() + input_vector.x = Input.get_action_strength('player_right') \ + - Input.get_action_strength('player_left') + input_vector.y = Input.get_action_strength('player_down') \ + - Input.get_action_strength('player_up') + input_vector = input_vector.normalized() - if input_vector != Vector2.ZERO: - $AnimationTree.set('parameters/Idle/blend_position', input_vector) - velocity = velocity.move_toward(input_vector * MAX_SPEED, ACCELERATION * delta) - else: - velocity = velocity.move_toward(Vector2.ZERO, FRICTION * delta) + if input_vector != Vector2.ZERO: + $AnimationTree.set('parameters/Idle/blend_position', input_vector) + velocity = velocity.move_toward(input_vector * MAX_SPEED, ACCELERATION * delta) + else: + velocity = velocity.move_toward(Vector2.ZERO, FRICTION * delta) - velocity = move_and_slide(velocity) - return + velocity = move_and_slide(velocity) + return func load_hud(node: CanvasLayer) -> void: - hud = node - if hud.connect('add_currency', self, 'add_currency') != OK: - print('ERROR: HUD "add_currency" signal already connected.') + hud = node + if hud.connect('add_currency', self, 'add_currency') != OK: + print('ERROR: HUD "add_currency" signal already connected.') - hud.update_health(HEALTH_SLICES[health_index]) - hud.update_currency($Inventory.get_currency()) - return + hud.update_health(HEALTH_SLICES[health_index]) + hud.update_currency($Inventory.get_currency()) + return func add_currency(amount: int) -> void: - $Inventory.add_currency(amount) - return + $Inventory.add_currency(amount) + return func _on_Inventory_update_currency(amount: int) -> void: - hud.update_currency(amount) - return + hud.update_currency(amount) + return func _on_Hitbox_body_entered(body: Node) -> void: - if not 'enemies' in body.get_groups(): - return + if not 'enemies' in body.get_groups(): + return + #var timer = Timer.new() + + elif body.name.begins_with("blue_snowman"): + MAX_SPEED = 20 + yield(get_tree().create_timer(3.0), "timeout") + MAX_SPEED = 120 - if health_index != 0: - health_index -= 1 - hud.update_health(HEALTH_SLICES[health_index]) - return + else: + health_index != 0 + health_index -= 1 + hud.update_health(HEALTH_SLICES[health_index]) + + return func _input(event: InputEvent) -> void: - if event.is_action_pressed('screenshot'): - var img: Image = get_viewport().get_texture().get_data() - yield(get_tree(), "idle_frame") - yield(get_tree(), "idle_frame") + if event.is_action_pressed('screenshot'): + var img: Image = get_viewport().get_texture().get_data() + yield(get_tree(), "idle_frame") + yield(get_tree(), "idle_frame") - img.flip_y() + img.flip_y() - var time: Dictionary = OS.get_datetime_from_unix_time(OS.get_unix_time()) - var time_msecs: int = OS.get_system_time_msecs() + var time: Dictionary = OS.get_datetime_from_unix_time(OS.get_unix_time()) + var time_msecs: int = OS.get_system_time_msecs() - if img.save_png('user://Screenshot_%d%d%d_%d.png' % [time.year, time.month, time.day, time_msecs]) != OK: - print('ERROR: Failed saving screenshot.') - return + if img.save_png('user://Screenshot_%d%d%d_%d.png' % [time.year, time.month, time.day, time_msecs]) != OK: + print('ERROR: Failed saving screenshot.') + return + + +func _on_Hitbox_area_entered(area: Area2D) -> void: + if not 'enemies' in area.get_parent().get_groups() or area.name.begins_with("detection") or (not area.name.begins_with("snowball")) : + return + + if area.name.begins_with("snowball"): + print("SNOWBALL FIGHT") + + if health_index != 0: + health_index -= 1 + hud.update_health(HEALTH_SLICES[health_index]) + return diff --git a/Player/Player.tscn b/Player/Player.tscn index 85bdde8..9567c6a 100644 --- a/Player/Player.tscn +++ b/Player/Player.tscn @@ -8,16 +8,6 @@ [sub_resource type="SpriteFrames" id=1] animations = [ { -"frames": [ ExtResource( 4 ) ], -"loop": false, -"name": "look_up", -"speed": 5.0 -}, { -"frames": [ ExtResource( 3 ) ], -"loop": false, -"name": "look_down", -"speed": 5.0 -}, { "frames": [ ExtResource( 2 ) ], "loop": false, "name": "look_left", @@ -27,6 +17,16 @@ animations = [ { "loop": false, "name": "look_right", "speed": 5.0 +}, { +"frames": [ ExtResource( 4 ) ], +"loop": false, +"name": "look_up", +"speed": 5.0 +}, { +"frames": [ ExtResource( 3 ) ], +"loop": false, +"name": "look_down", +"speed": 5.0 } ] [sub_resource type="CapsuleShape2D" id=2] @@ -220,5 +220,6 @@ parameters/Idle/blend_position = Vector2( 0.0760697, 0 ) [node name="Inventory" parent="." instance=ExtResource( 5 )] +[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"] [connection signal="body_entered" from="Hitbox" to="." method="_on_Hitbox_body_entered"] [connection signal="update_currency" from="Inventory" to="." method="_on_Inventory_update_currency"] diff --git a/Resources/Level_5_Walls_Tileset.tres b/Resources/Level_5_Walls_Tileset.tres index 87317ac..f645a98 100644 --- a/Resources/Level_5_Walls_Tileset.tres +++ b/Resources/Level_5_Walls_Tileset.tres @@ -2,286 +2,286 @@ [ext_resource path="res://Sprites/Assets/Level_5_Walls_Tileset.png" type="Texture" id=1] -[sub_resource type="OccluderPolygon2D" id=48] +[sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=49] +[sub_resource type="OccluderPolygon2D" id=2] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=50] +[sub_resource type="OccluderPolygon2D" id=3] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=51] +[sub_resource type="OccluderPolygon2D" id=4] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=52] +[sub_resource type="OccluderPolygon2D" id=5] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=53] +[sub_resource type="OccluderPolygon2D" id=6] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=54] +[sub_resource type="OccluderPolygon2D" id=7] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=55] +[sub_resource type="OccluderPolygon2D" id=8] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=56] +[sub_resource type="OccluderPolygon2D" id=9] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=57] +[sub_resource type="OccluderPolygon2D" id=10] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=58] +[sub_resource type="OccluderPolygon2D" id=11] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=59] +[sub_resource type="OccluderPolygon2D" id=12] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=60] +[sub_resource type="OccluderPolygon2D" id=13] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=61] +[sub_resource type="OccluderPolygon2D" id=14] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=62] +[sub_resource type="OccluderPolygon2D" id=15] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=63] +[sub_resource type="OccluderPolygon2D" id=16] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=64] +[sub_resource type="OccluderPolygon2D" id=17] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=65] +[sub_resource type="OccluderPolygon2D" id=18] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=66] +[sub_resource type="OccluderPolygon2D" id=19] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=67] +[sub_resource type="OccluderPolygon2D" id=20] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=68] +[sub_resource type="OccluderPolygon2D" id=21] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=69] +[sub_resource type="OccluderPolygon2D" id=22] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=70] +[sub_resource type="OccluderPolygon2D" id=23] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=71] +[sub_resource type="OccluderPolygon2D" id=24] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=72] +[sub_resource type="OccluderPolygon2D" id=25] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=73] +[sub_resource type="OccluderPolygon2D" id=26] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=74] +[sub_resource type="OccluderPolygon2D" id=27] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=75] +[sub_resource type="OccluderPolygon2D" id=28] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=76] +[sub_resource type="OccluderPolygon2D" id=29] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=77] +[sub_resource type="OccluderPolygon2D" id=30] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=78] +[sub_resource type="OccluderPolygon2D" id=31] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=79] +[sub_resource type="OccluderPolygon2D" id=32] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=80] +[sub_resource type="OccluderPolygon2D" id=33] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=81] +[sub_resource type="OccluderPolygon2D" id=34] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=82] +[sub_resource type="OccluderPolygon2D" id=35] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=83] +[sub_resource type="OccluderPolygon2D" id=36] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=84] +[sub_resource type="OccluderPolygon2D" id=37] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=85] +[sub_resource type="OccluderPolygon2D" id=38] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=86] +[sub_resource type="OccluderPolygon2D" id=39] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=87] +[sub_resource type="OccluderPolygon2D" id=40] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=88] +[sub_resource type="OccluderPolygon2D" id=41] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=89] +[sub_resource type="OccluderPolygon2D" id=42] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=90] +[sub_resource type="OccluderPolygon2D" id=43] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=91] +[sub_resource type="OccluderPolygon2D" id=44] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=92] +[sub_resource type="OccluderPolygon2D" id=45] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=93] +[sub_resource type="OccluderPolygon2D" id=46] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=94] +[sub_resource type="OccluderPolygon2D" id=47] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=1] +[sub_resource type="ConvexPolygonShape2D" id=48] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=2] +[sub_resource type="ConvexPolygonShape2D" id=49] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=3] +[sub_resource type="ConvexPolygonShape2D" id=50] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=4] +[sub_resource type="ConvexPolygonShape2D" id=51] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=5] +[sub_resource type="ConvexPolygonShape2D" id=52] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=6] +[sub_resource type="ConvexPolygonShape2D" id=53] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=7] +[sub_resource type="ConvexPolygonShape2D" id=54] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=8] +[sub_resource type="ConvexPolygonShape2D" id=55] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=9] +[sub_resource type="ConvexPolygonShape2D" id=56] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=10] +[sub_resource type="ConvexPolygonShape2D" id=57] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=11] +[sub_resource type="ConvexPolygonShape2D" id=58] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=12] +[sub_resource type="ConvexPolygonShape2D" id=59] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=13] +[sub_resource type="ConvexPolygonShape2D" id=60] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=14] +[sub_resource type="ConvexPolygonShape2D" id=61] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=15] +[sub_resource type="ConvexPolygonShape2D" id=62] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=16] +[sub_resource type="ConvexPolygonShape2D" id=63] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=17] +[sub_resource type="ConvexPolygonShape2D" id=64] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=18] +[sub_resource type="ConvexPolygonShape2D" id=65] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=19] +[sub_resource type="ConvexPolygonShape2D" id=66] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=20] +[sub_resource type="ConvexPolygonShape2D" id=67] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=21] +[sub_resource type="ConvexPolygonShape2D" id=68] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=22] +[sub_resource type="ConvexPolygonShape2D" id=69] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=23] +[sub_resource type="ConvexPolygonShape2D" id=70] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=24] +[sub_resource type="ConvexPolygonShape2D" id=71] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=25] +[sub_resource type="ConvexPolygonShape2D" id=72] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=26] +[sub_resource type="ConvexPolygonShape2D" id=73] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=27] +[sub_resource type="ConvexPolygonShape2D" id=74] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=28] +[sub_resource type="ConvexPolygonShape2D" id=75] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=29] +[sub_resource type="ConvexPolygonShape2D" id=76] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=30] +[sub_resource type="ConvexPolygonShape2D" id=77] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=31] +[sub_resource type="ConvexPolygonShape2D" id=78] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=32] +[sub_resource type="ConvexPolygonShape2D" id=79] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=33] +[sub_resource type="ConvexPolygonShape2D" id=80] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=34] +[sub_resource type="ConvexPolygonShape2D" id=81] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=35] +[sub_resource type="ConvexPolygonShape2D" id=82] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=36] +[sub_resource type="ConvexPolygonShape2D" id=83] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=37] +[sub_resource type="ConvexPolygonShape2D" id=84] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=38] +[sub_resource type="ConvexPolygonShape2D" id=85] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=39] +[sub_resource type="ConvexPolygonShape2D" id=86] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=40] +[sub_resource type="ConvexPolygonShape2D" id=87] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=41] +[sub_resource type="ConvexPolygonShape2D" id=88] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=42] +[sub_resource type="ConvexPolygonShape2D" id=89] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=43] +[sub_resource type="ConvexPolygonShape2D" id=90] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=44] +[sub_resource type="ConvexPolygonShape2D" id=91] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=45] +[sub_resource type="ConvexPolygonShape2D" id=92] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=46] +[sub_resource type="ConvexPolygonShape2D" id=93] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=47] +[sub_resource type="ConvexPolygonShape2D" id=94] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) [resource] @@ -296,7 +296,7 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) 0/autotile/icon_coordinate = Vector2( 1, 1 ) 0/autotile/tile_size = Vector2( 16, 16 ) 0/autotile/spacing = 0 -0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 48 ), Vector2( 0, 1 ), SubResource( 49 ), Vector2( 0, 2 ), SubResource( 50 ), Vector2( 0, 3 ), SubResource( 51 ), Vector2( 1, 0 ), SubResource( 52 ), Vector2( 1, 1 ), SubResource( 53 ), Vector2( 1, 2 ), SubResource( 54 ), Vector2( 1, 3 ), SubResource( 55 ), Vector2( 2, 0 ), SubResource( 56 ), Vector2( 2, 1 ), SubResource( 57 ), Vector2( 2, 2 ), SubResource( 58 ), Vector2( 2, 3 ), SubResource( 59 ), Vector2( 3, 0 ), SubResource( 60 ), Vector2( 3, 1 ), SubResource( 61 ), Vector2( 3, 2 ), SubResource( 62 ), Vector2( 3, 3 ), SubResource( 63 ), Vector2( 4, 0 ), SubResource( 64 ), Vector2( 4, 1 ), SubResource( 65 ), Vector2( 4, 2 ), SubResource( 66 ), Vector2( 4, 3 ), SubResource( 67 ), Vector2( 4, 4 ), SubResource( 68 ), Vector2( 5, 0 ), SubResource( 69 ), Vector2( 5, 1 ), SubResource( 70 ), Vector2( 5, 2 ), SubResource( 71 ), Vector2( 5, 3 ), SubResource( 72 ), Vector2( 5, 4 ), SubResource( 73 ), Vector2( 6, 0 ), SubResource( 74 ), Vector2( 6, 1 ), SubResource( 75 ), Vector2( 6, 2 ), SubResource( 76 ), Vector2( 6, 3 ), SubResource( 77 ), Vector2( 6, 4 ), SubResource( 78 ), Vector2( 7, 0 ), SubResource( 79 ), Vector2( 7, 1 ), SubResource( 80 ), Vector2( 7, 2 ), SubResource( 81 ), Vector2( 7, 3 ), SubResource( 82 ), Vector2( 7, 4 ), SubResource( 83 ), Vector2( 8, 0 ), SubResource( 84 ), Vector2( 8, 1 ), SubResource( 85 ), Vector2( 8, 2 ), SubResource( 86 ), Vector2( 8, 3 ), SubResource( 87 ), Vector2( 8, 4 ), SubResource( 88 ), Vector2( 9, 0 ), SubResource( 89 ), Vector2( 9, 1 ), SubResource( 90 ), Vector2( 9, 2 ), SubResource( 91 ), Vector2( 9, 3 ), SubResource( 92 ), Vector2( 10, 2 ), SubResource( 93 ), Vector2( 10, 3 ), SubResource( 94 ) ] +0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 0, 3 ), SubResource( 4 ), Vector2( 1, 0 ), SubResource( 5 ), Vector2( 1, 1 ), SubResource( 6 ), Vector2( 1, 2 ), SubResource( 7 ), Vector2( 1, 3 ), SubResource( 8 ), Vector2( 2, 0 ), SubResource( 9 ), Vector2( 2, 1 ), SubResource( 10 ), Vector2( 2, 2 ), SubResource( 11 ), Vector2( 2, 3 ), SubResource( 12 ), Vector2( 3, 0 ), SubResource( 13 ), Vector2( 3, 1 ), SubResource( 14 ), Vector2( 3, 2 ), SubResource( 15 ), Vector2( 3, 3 ), SubResource( 16 ), Vector2( 4, 0 ), SubResource( 17 ), Vector2( 4, 1 ), SubResource( 18 ), Vector2( 4, 2 ), SubResource( 19 ), Vector2( 4, 3 ), SubResource( 20 ), Vector2( 4, 4 ), SubResource( 21 ), Vector2( 5, 0 ), SubResource( 22 ), Vector2( 5, 1 ), SubResource( 23 ), Vector2( 5, 2 ), SubResource( 24 ), Vector2( 5, 3 ), SubResource( 25 ), Vector2( 5, 4 ), SubResource( 26 ), Vector2( 6, 0 ), SubResource( 27 ), Vector2( 6, 1 ), SubResource( 28 ), Vector2( 6, 2 ), SubResource( 29 ), Vector2( 6, 3 ), SubResource( 30 ), Vector2( 6, 4 ), SubResource( 31 ), Vector2( 7, 0 ), SubResource( 32 ), Vector2( 7, 1 ), SubResource( 33 ), Vector2( 7, 2 ), SubResource( 34 ), Vector2( 7, 3 ), SubResource( 35 ), Vector2( 7, 4 ), SubResource( 36 ), Vector2( 8, 0 ), SubResource( 37 ), Vector2( 8, 1 ), SubResource( 38 ), Vector2( 8, 2 ), SubResource( 39 ), Vector2( 8, 3 ), SubResource( 40 ), Vector2( 8, 4 ), SubResource( 41 ), Vector2( 9, 0 ), SubResource( 42 ), Vector2( 9, 1 ), SubResource( 43 ), Vector2( 9, 2 ), SubResource( 44 ), Vector2( 9, 3 ), SubResource( 45 ), Vector2( 10, 2 ), SubResource( 46 ), Vector2( 10, 3 ), SubResource( 47 ) ] 0/autotile/navpoly_map = [ ] 0/autotile/priority_map = [ ] 0/autotile/z_index_map = [ ] @@ -304,290 +304,290 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) 0/navigation_offset = Vector2( 0, 0 ) 0/shape_offset = Vector2( 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape = SubResource( 1 ) +0/shape = SubResource( 48 ) 0/shape_one_way = false 0/shape_one_way_margin = 1.0 0/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 1 ), +"shape": SubResource( 48 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 2 ), +"shape": SubResource( 49 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 3 ), +"shape": SubResource( 50 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 0, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 4 ), +"shape": SubResource( 51 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 0, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 5 ), +"shape": SubResource( 52 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 6 ), +"shape": SubResource( 53 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 7 ), +"shape": SubResource( 54 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 8 ), +"shape": SubResource( 55 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 9 ), +"shape": SubResource( 56 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 10 ), +"shape": SubResource( 57 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 11 ), +"shape": SubResource( 58 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 12 ), +"shape": SubResource( 59 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 13 ), +"shape": SubResource( 60 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 14 ), +"shape": SubResource( 61 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 15 ), +"shape": SubResource( 62 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 0, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 16 ), +"shape": SubResource( 63 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 17 ), +"shape": SubResource( 64 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 18 ), +"shape": SubResource( 65 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 6, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 19 ), +"shape": SubResource( 66 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 7, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 20 ), +"shape": SubResource( 67 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 8, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 21 ), +"shape": SubResource( 68 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 9, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 22 ), +"shape": SubResource( 69 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 9, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 23 ), +"shape": SubResource( 70 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 9, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 24 ), +"shape": SubResource( 71 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 10, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 25 ), +"shape": SubResource( 72 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 10, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 26 ), +"shape": SubResource( 73 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 9, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 27 ), +"shape": SubResource( 74 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 8, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 28 ), +"shape": SubResource( 75 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 8, 4 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 29 ), +"shape": SubResource( 76 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 7, 4 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 30 ), +"shape": SubResource( 77 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 6, 4 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 31 ), +"shape": SubResource( 78 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 4 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 32 ), +"shape": SubResource( 79 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 4 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 33 ), +"shape": SubResource( 80 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 34 ), +"shape": SubResource( 81 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 35 ), +"shape": SubResource( 82 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 36 ), +"shape": SubResource( 83 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 37 ), +"shape": SubResource( 84 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 6, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 38 ), +"shape": SubResource( 85 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 7, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 39 ), +"shape": SubResource( 86 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 8, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 40 ), +"shape": SubResource( 87 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 8, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 41 ), +"shape": SubResource( 88 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 7, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 42 ), +"shape": SubResource( 89 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 6, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 43 ), +"shape": SubResource( 90 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 44 ), +"shape": SubResource( 91 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 45 ), +"shape": SubResource( 92 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 6, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 46 ), +"shape": SubResource( 93 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 7, 3 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 47 ), +"shape": SubResource( 94 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] 0/z_index = 0 diff --git a/project.godot b/project.godot index 3f96c72..951352d 100644 --- a/project.godot +++ b/project.godot @@ -12,11 +12,11 @@ config_version=4 config/name="Embodiment" run/main_scene="res://Main.tscn" -run/delta_sync_after_draw=true boot_splash/image="res://Sprites/Assets/Black_Background.png" boot_splash/use_filter=false boot_splash/bg_color=Color( 0, 0, 0, 1 ) config/icon="res://Sprites/Assets/icon.png" +run/delta_sync_after_draw=true [display] @@ -31,27 +31,27 @@ window/stretch/aspect="keep" player_right={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) ] } player_left={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) ] } player_up={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) ] } player_down={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) ] } screenshot={ "deadzone": 0.5, -"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777245,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777245,"unicode":0,"echo":false,"script":null) ] }