a game about throwing hammers made for the github game off
hammer holding + better level design
42 files changed, 570 insertions, 119 deletions
@@ -1,7 +1,7 @@ [gd_scene load_steps=24 format=3 uid="uid://06slp4crd6oj"] [ext_resource type="Script" path="res://Main.gd" id="1_l4fqe"] -[ext_resource type="PackedScene" uid="uid://umj2kojm6mlo" path="res://player/player.tscn" id="1_ug1uc"] +[ext_resource type="PackedScene" uid="uid://cl03k3yc8fxkt" path="res://player/player.tscn" id="1_ug1uc"] [ext_resource type="PackedScene" uid="uid://dqxnsdq67j23x" path="res://levels/Start.tscn" id="2_vg2cv"] [ext_resource type="Script" path="res://levels/LevelManager.gd" id="3_yuvn4"] [ext_resource type="PackedScene" uid="uid://bujj6au21fw2" path="res://levels/rand/01.tscn" id="4_e4ceh"] @@ -49,3 +49,4 @@ zoom = Vector2(1.25, 1.25) position_smoothing_enabled = true [node name="HUD" parent="." instance=ExtResource("23_5dqpk")] +layer = 0 diff --git a/autoloads/Events.gd b/autoloads/Events.gd index ac5910f..636a10e 100644 --- a/autoloads/Events.gd +++ b/autoloads/Events.gd @@ -1,3 +1,3 @@ extends Node -signal change_level(to: Vector2i)
\ No newline at end of file +signal change_level(to: Vector2i) diff --git a/autoloads/Utils.gd b/autoloads/Utils.gd index 2b9321b..d04df53 100644 --- a/autoloads/Utils.gd +++ b/autoloads/Utils.gd @@ -1,6 +1,8 @@ extends Node class_name Util +static func is_in_range(val: float, start: float, end: float) -> bool: + return val > start and val < end static func instance_scene(scene: PackedScene, position: Vector2, on: Node) -> Node: var instance := scene.instantiate() as Node2D @@ -8,7 +10,6 @@ static func instance_scene(scene: PackedScene, position: Vector2, on: Node) -> N instance.global_position = position return instance - func instance_scene_on_main(scene: PackedScene, position: Vector2) -> Node: return Util.instance_scene(scene, position, get_tree().current_scene) @@ -19,15 +20,12 @@ static func str_vec(vec: Vector2) -> String: var map := {Vector2.UP: "up", Vector2.DOWN: "down", Vector2.LEFT: "left", Vector2.RIGHT: "right"} return map.get(vec, str(vec)) - static func sub(a: Array, b: Array) -> Array: return a.filter(func(item) -> bool: return not item in b) - static func out_of_bounds(v: Vector2i, rect: Vector2i) -> bool: return v.x > rect.x or v.y > rect.y or v.x < 0 or v.y < 0 - const hammer_path_fmt := "res://hammers/hammer_%s.tscn" const hammers: Array[PackedScene] = [ preload(hammer_path_fmt % "01"), diff --git a/classes/Maze.gd b/classes/Maze.gd index 8d185a8..1a401ec 100644 --- a/classes/Maze.gd +++ b/classes/Maze.gd @@ -98,11 +98,12 @@ static func tile_4b_to_wall_array(tile_4b: int) -> Array[Vector2i]: func erase(): - const three_walled: Array[int] = [7, 11, 13, 14] + const three_walls: Array[int] = [7, 11, 13, 14] + const two_walls: Array[int] = [3, 5, 6, 9, 10, 12] # randomly remove a number of map walls. for x in range(_size.x): for y in range(_size.y): - if maze[y][x] in three_walled or randi() % 3 == 0: + if maze[y][x] in three_walls or maze[x][y] in two_walls or randi() % 3 == 0: var cell := Vector2i(x, y) var i := randi() % 4 for _i in range(4): @@ -125,7 +126,7 @@ func erase(): or (n_cell.y == _size.y and n_walls & S) ): continue - if walls in three_walled or n_walls in three_walled: + if walls in three_walls or n_walls in three_walls: continue set_cellv(cell, walls) set_cellv(n_cell, n_walls) diff --git a/colliders/hitbox.gd b/colliders/hitbox.gd index 9bcc233..4a63e61 100644 --- a/colliders/hitbox.gd +++ b/colliders/hitbox.gd @@ -1,4 +1,5 @@ extends Area2D +class_name Hitbox @export var damage: int = 1 diff --git a/colliders/hitbox.tscn b/colliders/hitbox.tscn index c0b658a..e3782b7 100644 --- a/colliders/hitbox.tscn +++ b/colliders/hitbox.tscn @@ -4,6 +4,7 @@ [node name="Hitbox" type="Area2D"] collision_layer = 0 +collision_mask = 0 monitorable = false script = ExtResource("1_3seao") diff --git a/colliders/hittable.gd b/colliders/hittable.gd index 3e75619..9a74a1e 100644 --- a/colliders/hittable.gd +++ b/colliders/hittable.gd @@ -4,4 +4,4 @@ class_name Hittable # @virtual func hit(_damage: int) -> void: - pass + pass diff --git a/enemys/wrencher.gd b/enemys/wrencher.gd index e663457..771a878 100644 --- a/enemys/wrencher.gd +++ b/enemys/wrencher.gd @@ -40,12 +40,14 @@ func _physics_process(_delta: float) -> void: func fire() -> void: - var hammer: Hammer = Utils.instance_scene_on_level(Utils.get_hammer(), muzzle.global_position) + var hammer: Hammer = Utils.get_hammer().instantiate() + hammer.global_position = muzzle.global_position hammer.steer_force = 0.01 # cheat hammer.target = Globals.player hammer.direction = up_direction bullet_timer = get_tree().create_timer(SHOT_COOLDOWN) player_cast.enabled = false + Globals.levelmanager.current_level.add_child(hammer) func brain() -> float: var dir := 0.0 diff --git a/enemys/wrencher.tscn b/enemys/wrencher.tscn index 590768a..128d043 100644 --- a/enemys/wrencher.tscn +++ b/enemys/wrencher.tscn @@ -77,6 +77,7 @@ _data = { size = Vector2(20, 50) [node name="Wrencher" node_paths=PackedStringArray("muzzle", "floorcast", "animator", "player_cast") instance=ExtResource("1_7mo8u")] +floor_max_angle = 0.802851 script = ExtResource("2_ydgi0") ACCELERATION = 3 MAX_SPEED = 32 @@ -113,6 +114,7 @@ libraries = { } [node name="Muzzle" type="Marker2D" parent="." index="5"] +visible = false position = Vector2(0, -6) [node name="FloorCast" type="RayCast2D" parent="." index="6"] diff --git a/fx/trail.gd b/fx/trail.gd index 43820b3..c2edb76 100644 --- a/fx/trail.gd +++ b/fx/trail.gd @@ -5,13 +5,13 @@ extends Line2D @icon("./trail2d_icon.svg") ## Enable or disable the trail -@export var is_emitting := false: - set(emitting): - is_emitting = emitting +@export var emitting := true: + set(p_emitting): + emitting = p_emitting if not is_inside_tree(): await ready - if is_emitting: + if emitting: clear_points() _points_creation_time.clear() _last_point = to_local(target.global_position) @@ -47,7 +47,7 @@ func _process(delta: float) -> void: _clock += delta remove_older() - if not is_emitting: + if not emitting: return # Adding new points if necessary. @@ -1,6 +1,6 @@ { "@bendn/remap": { - "version": "4.1.2", - "integrity": "sha512-USl69xQBO7kuC6kB/5l/H6wigU09dbc04LR2jFElZL9evm3F1/UuQN86sqH0T4HFuD2xdf+9US9WbFmOkQ8rTA==" + "version": "4.1.4", + "integrity": "sha512-IlGcorFMwtOF+Euo/T63IOnnwFOILT1PxI10n9B/2XSVpVZqv8Ztwtv9OGsNZxLJjOjJ/MESTxvaZTHw1piSgg==" } }
\ No newline at end of file diff --git a/godot.package b/godot.package index 77e8073..ac6a73d 100644 --- a/godot.package +++ b/godot.package @@ -1,6 +1,6 @@ { "name": "hammer_space", "packages": { - "@bendn/remap": "4.1.2" + "@bendn/remap": "4.1.4" } }
\ No newline at end of file diff --git a/hammers/hammer.gd b/hammers/hammer.gd index 395a3b8..a52741b 100644 --- a/hammers/hammer.gd +++ b/hammers/hammer.gd @@ -16,7 +16,7 @@ var direction := Vector2.ZERO ## Maximum speed @export var top_speed := 200 -## The amount it can turn towards its target in radians +## The amount it can turn towards its target @export var steer_force = 0.05 ## The target @@ -28,30 +28,83 @@ var hit_player := true ## To hit the enemys var hit_enemys := false +## The amount of time before gravity kicks in. +var lifetime := 1 + +## The gravity +var grav := 4 + +## Terminal velocity +var terminal_velocity := 15 + @onready var trail := $Trail as Trail2D @onready var outline_shader := ($Sprite as Sprite2D).material as ShaderMaterial +@onready var target_finder := $TargetFinder as Area2D +@onready var hitbox := $Hitbox as Hitbox func _ready() -> void: + set_masks() + +## Sets the collision masks. +func set_masks() -> void: set_collision_mask_value(3, hit_player) set_collision_mask_value(4, hit_enemys) + target_finder.set_collision_mask_value(3, hit_player) + target_finder.set_collision_mask_value(4, hit_enemys) + hitbox.collision_mask = target_finder.collision_mask + target_finder.monitoring = not is_instance_valid(target) + hitbox.monitoring = hit_player || hit_enemys +## Moves the direction towards the target. func seek() -> void: - if target: + if is_instance_valid(target): direction = direction + (global_position.direction_to(target.global_position) - direction) * steer_force + elif not target == null: + # target died (!) + target = null + target_finder.monitoring = true +## Highlights this hammer. See also [method unhighlight]. func highlight() -> void: outline_shader.set_shader_parameter(&"line_width", .75) +## Un-highlights this hammer. See also [method highlight]. func unhighlight() -> void: outline_shader.set_shader_parameter(&"line_width", 0) func _physics_process(delta: float) -> void: - seek() - velocity = (direction * acceleration * delta).limit_length(top_speed) + lifetime -= delta + if lifetime < 0: + velocity.y += grav * delta + velocity.y = clampf(velocity.y, -terminal_velocity, terminal_velocity) + else: + seek() + velocity = (direction * acceleration * delta) + velocity.y = lerpf(velocity.y, 0, .2) # hard to move up + velocity = velocity.limit_length(top_speed) rotation = velocity.angle() + PI/2 # face forward global_position += velocity func _on_body_entered(_body: Node2D) -> void: - trail.clear_points() - global_position += velocity # go into the wall a little + trail.emitting = false + target_finder.monitoring = false + hitbox.monitoring = false + set_collision_layer_value(7, true) + global_position += velocity.limit_length(1) # go into the wall a little + velocity = Vector2.ZERO + target = null + steer_force = 0.05 set_physics_process(false) + trail.clear_points() + +## Throws this [Hammer]. +func throw(p_direction: Vector2) -> void: + direction = p_direction + trail.emitting = true + set_physics_process(true) + set_masks() + + +func _on_target_finder_node_entered(n: Node2D) -> void: + target = n + target_finder.set_deferred(&"monitoring", false) diff --git a/hammers/hammer_01.tscn b/hammers/hammer_01.tscn index 09de83f..8c08813 100644 --- a/hammers/hammer_01.tscn +++ b/hammers/hammer_01.tscn @@ -1,11 +1,20 @@ -[gd_scene load_steps=3 format=3 uid="uid://bsu0i18fxrwhj"] +[gd_scene load_steps=5 format=3 uid="uid://bsu0i18fxrwhj"] [ext_resource type="PackedScene" uid="uid://bimmd1hcj2h0e" path="res://hammers/hammer_base.tscn" id="1_350hj"] +[ext_resource type="Shader" path="res://hammers/hammer_outline.gdshader" id="2_le3ds"] [ext_resource type="Texture2D" uid="uid://dcf5es758pw1n" path="res://assets/hammers/hammer01.png" id="2_sdlv5"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_7jbfp"] +resource_local_to_scene = true +shader = ExtResource("2_le3ds") +shader_parameter/light_offset = 1.0 +shader_parameter/line_width = 0.0 +shader_parameter/sin_frequency = 0.25 + [node name="Hammer01" instance=ExtResource("1_350hj")] [node name="Sprite" parent="." index="1"] +material = SubResource("ShaderMaterial_7jbfp") texture = ExtResource("2_sdlv5") [editable path="Hitbox"] diff --git a/hammers/hammer_02.tscn b/hammers/hammer_02.tscn index ec70d27..3f282a7 100644 --- a/hammers/hammer_02.tscn +++ b/hammers/hammer_02.tscn @@ -1,11 +1,20 @@ -[gd_scene load_steps=3 format=3 uid="uid://c6ef6eebk03tn"] +[gd_scene load_steps=5 format=3 uid="uid://c6ef6eebk03tn"] [ext_resource type="PackedScene" uid="uid://bimmd1hcj2h0e" path="res://hammers/hammer_base.tscn" id="1_vy2k1"] [ext_resource type="Texture2D" uid="uid://bcpy0wbrlmqsq" path="res://assets/hammers/hammer02.png" id="2_dmvhv"] +[ext_resource type="Shader" path="res://hammers/hammer_outline.gdshader" id="2_rf70p"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_htydc"] +resource_local_to_scene = true +shader = ExtResource("2_rf70p") +shader_parameter/light_offset = 1.0 +shader_parameter/line_width = 0.0 +shader_parameter/sin_frequency = 0.25 [node name="Hammer02" instance=ExtResource("1_vy2k1")] [node name="Sprite" parent="." index="1"] +material = SubResource("ShaderMaterial_htydc") texture = ExtResource("2_dmvhv") [node name="Hitbox" parent="." index="3"] diff --git a/hammers/hammer_03.tscn b/hammers/hammer_03.tscn index 28259e1..f268837 100644 --- a/hammers/hammer_03.tscn +++ b/hammers/hammer_03.tscn @@ -1,26 +1,35 @@ -[gd_scene load_steps=5 format=3 uid="uid://c415arbs8q7k7"] +[gd_scene load_steps=7 format=3 uid="uid://c415arbs8q7k7"] [ext_resource type="PackedScene" uid="uid://bimmd1hcj2h0e" path="res://hammers/hammer_base.tscn" id="1_wc0io"] [ext_resource type="Texture2D" uid="uid://blx67dnlqysnc" path="res://assets/hammers/hammer03.png" id="2_0uj7a"] +[ext_resource type="Shader" path="res://hammers/hammer_outline.gdshader" id="2_huryw"] -[sub_resource type="RectangleShape2D" id="RectangleShape2D_dgtn7"] +[sub_resource type="ShaderMaterial" id="ShaderMaterial_gbw2g"] +resource_local_to_scene = true +shader = ExtResource("2_huryw") +shader_parameter/light_offset = 1.0 +shader_parameter/line_width = 0.0 +shader_parameter/sin_frequency = 0.25 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_uabdv"] size = Vector2(8, 12) -[sub_resource type="RectangleShape2D" id="RectangleShape2D_sbm7t"] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_kegwy"] size = Vector2(8, 12) [node name="Hammer03" instance=ExtResource("1_wc0io")] [node name="Sprite" parent="." index="1"] +material = SubResource("ShaderMaterial_gbw2g") texture = ExtResource("2_0uj7a") [node name="Collision" parent="." index="2"] -shape = SubResource("RectangleShape2D_dgtn7") +shape = SubResource("RectangleShape2D_uabdv") [node name="Hitbox" parent="." index="3"] damage = 3 [node name="Collision" parent="Hitbox" index="0"] -shape = SubResource("RectangleShape2D_sbm7t") +shape = SubResource("RectangleShape2D_kegwy") [editable path="Hitbox"] diff --git a/hammers/hammer_base.tscn b/hammers/hammer_base.tscn index aa170b7..f7f8cf1 100644 --- a/hammers/hammer_base.tscn +++ b/hammers/hammer_base.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=9 format=3 uid="uid://bimmd1hcj2h0e"] +[gd_scene load_steps=10 format=3 uid="uid://bimmd1hcj2h0e"] [ext_resource type="PackedScene" uid="uid://ug40hxlkequx" path="res://colliders/hitbox.tscn" id="1_kdx5x"] [ext_resource type="Script" path="res://hammers/hammer.gd" id="1_xp22t"] @@ -9,14 +9,18 @@ [ext_resource type="Shader" path="res://hammers/hammer_outline.gdshader" id="5_iyctf"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_go8fx"] +resource_local_to_scene = true shader = ExtResource("5_iyctf") shader_parameter/light_offset = 1.0 shader_parameter/line_width = 0.0 shader_parameter/sin_frequency = 0.25 +[sub_resource type="CircleShape2D" id="CircleShape2D_jubww"] +radius = 70.0 + [node name="Hammer" type="Area2D"] texture_filter = 1 -collision_layer = 0 +collision_layer = 32 script = ExtResource("1_xp22t") [node name="Trail" type="Line2D" parent="." node_paths=PackedStringArray("target")] @@ -29,7 +33,6 @@ gradient = ExtResource("5_8dqv1") round_precision = 4 antialiased = true script = ExtResource("4_boru3") -is_emitting = true lifetime = 2.0 target = NodePath("") metadata/_edit_lock_ = true @@ -47,6 +50,16 @@ visible = false [node name="Collision" parent="Hitbox" index="0"] shape = ExtResource("2_tgkvf") +[node name="TargetFinder" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 0 +monitorable = false + +[node name="Collision" type="CollisionShape2D" parent="TargetFinder"] +shape = SubResource("CircleShape2D_jubww") + [connection signal="body_entered" from="." to="." method="_on_body_entered"] +[connection signal="area_entered" from="TargetFinder" to="." method="_on_target_finder_node_entered"] +[connection signal="body_entered" from="TargetFinder" to="." method="_on_target_finder_node_entered"] [editable path="Hitbox"] diff --git a/levels/Level.tscn b/levels/Level.tscn index 502887a..8c40a88 100644 --- a/levels/Level.tscn +++ b/levels/Level.tscn @@ -11,11 +11,4 @@ layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 26214 script = ExtResource("1_cubc7") metadata/_edit_lock_ = true -[node name="Blocks" type="TileMap" parent="."] -visible = false -tile_set = ExtResource("1_r867i") -format = 2 -layer_0/tile_data = PackedInt32Array(458750, 0, 3, 458751, 131072, 3, 655359, 131072, 3, -131066, 196608, 0, -65530, 196608, 2, 1048582, 196608, 0, 1114118, 196608, 2, -65527, 196608, 2, 1048585, 196608, 0, 1114121, 196608, 2, 393232, 0, 3, 589840, 0, 3, 393233, 131072, 3, 589841, 131072, 3, -131063, 196608, 0, 655358, 0, 3) -metadata/_edit_lock_ = true - [node name="Enemys" type="Node2D" parent="."] diff --git a/levels/Start.tscn b/levels/Start.tscn index f3ab013..a9496da 100644 --- a/levels/Start.tscn +++ b/levels/Start.tscn @@ -1,8 +1,13 @@ -[gd_scene load_steps=3 format=3 uid="uid://dqxnsdq67j23x"] +[gd_scene load_steps=4 format=3 uid="uid://dqxnsdq67j23x"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_qw36g"] [ext_resource type="Script" path="res://levels/Start.gd" id="2_dhcq0"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="3_6dd5c"] [node name="Start" instance=ExtResource("1_qw36g")] layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 262144, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 262144, 2, 786432, 0, 1, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 327680, 3, 3, 65536, 0, 983043, 65536, 3, 4, 65536, 0, 983044, 65536, 3, 5, 327680, 0, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 0, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 0, 3, 10, 327680, 0, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 393216, 0, 983052, 65536, 3, 13, 65536, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 65536, 3, 15, 131072, 0, 65551, 458752, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 917516, 196609, 0, 917517, 262145, 0, 851982, 196609, 0, 917518, 327681, 0, 917505, 65536, 1, 917506, 131072, 1, 851970, 131072, 0, 851969, 327680, 2, 786433, 131072, 1, 720897, 131072, 0, 786439, 0, 0, 786440, 327680, 0, 851976, 131072, 2, 851975, 0, 2, 786441, 131072, 3, 393220, 196608, 2, 327684, 196608, 1, 262148, 458752, 1, 393228, 196608, 0, 458764, 196608, 1, 524300, 196608, 1, 589836, 196608, 2, 262147, 65536, 2, 262146, 65536, 2, 262145, 65536, 2, 196609, 65536, 1, 131073, 65536, 1, 65537, 65536, 1, 65538, 65536, 1, 131074, 65536, 1, 196610, 65536, 1, 65539, 65536, 1, 131075, 65536, 1, 196611, 65536, 1, 196612, 131072, 1, 131076, 327680, 1, 131077, 131072, 2, 65541, 131072, 1, 65540, 65536, 1, 65548, 0, 1, 65549, 327680, 1, 131085, 458752, 1, 131084, 0, 2, 196621, 196608, 2, 65550, 65536, 2, 65546, 131072, 1, 131082, 131072, 2, 65545, 0, 1, 131081, 262144, 1, 196617, 196608, 2) script = ExtResource("2_dhcq0") + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("3_6dd5c")] +position = Vector2(16, 167) +rotation = -4.71238 diff --git a/levels/rand/01.tscn b/levels/rand/01.tscn index 2f4ea78..4ef5b1f 100644 --- a/levels/rand/01.tscn +++ b/levels/rand/01.tscn @@ -4,7 +4,7 @@ [ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_02iql"] [node name="01" instance=ExtResource("1_gxkva")] -layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 262144, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 0, 983042, 65536, 3, 3, 65536, 0, 983043, 65536, 3, 4, 327680, 0, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 983046, 131072, 3, 9, 0, 3, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 393216, 0, 983052, 65536, 3, 13, 65536, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 65536, 3, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 458752, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 65537, 65536, 1, 131073, 65536, 1, 196609, 65536, 1, 262145, 65536, 2, 262146, 131072, 2, 196610, 131072, 1, 131074, 327680, 1, 65538, 65536, 1, 65539, 65536, 1, 131075, 65536, 2, 65540, 131072, 1, 131076, 458752, 1, 196612, 196608, 2, 65548, 0, 1, 131084, 0, 1, 196620, 262144, 1, 262156, 196608, 2, 131085, 65536, 1, 65549, 65536, 1, 65550, 65536, 1, 196621, 65536, 2, 196622, 393216, 1, 131086, 65536, 1, 262158, 0, 2, 524294, 65536, 1, 524295, 65536, 1, 524296, 65536, 1, 458760, 65536, 1, 458761, 65536, 1, 458762, 327680, 2, 458763, 131072, 0, 524298, 327680, 1, 589834, 131072, 2, 524297, 65536, 1, 458759, 65536, 1, 458758, 65536, 1, 589831, 65536, 2, 393223, 65536, 0, 393222, 65536, 0, 393221, 0, 0, 458757, 393216, 2, 524293, 393216, 1, 524292, 0, 2, 458756, 0, 0, 393226, 131072, 0, 393225, 65536, 0, 393224, 65536, 0, 589829, 0, 2, 589830, 65536, 2, 589832, 65536, 2, 589833, 65536, 2, 524299, 131072, 2, 917518, 327681, 0, 393220, 1, 0, 917516, 196609, 0, 917517, 262145, 0, 851982, 196609, 0) +layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 262144, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 262144, 2, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 65536, 0, 983043, 65536, 2, 4, 327680, 0, 983044, 327680, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 983046, 131072, 3, 9, 0, 3, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 393216, 0, 983052, 65536, 3, 13, 65536, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 65536, 3, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 458752, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 65537, 65536, 1, 131073, 65536, 1, 196609, 65536, 1, 262145, 65536, 2, 262146, 131072, 2, 196610, 131072, 1, 131074, 327680, 1, 65538, 65536, 1, 65539, 65536, 1, 131075, 65536, 2, 65540, 131072, 1, 131076, 458752, 1, 196612, 196608, 2, 65548, 0, 1, 131084, 0, 1, 196620, 262144, 1, 262156, 196608, 2, 131085, 65536, 1, 65549, 65536, 1, 65550, 65536, 1, 196621, 65536, 2, 196622, 393216, 1, 131086, 65536, 1, 262158, 0, 2, 524294, 65536, 1, 524295, 65536, 1, 524296, 65536, 1, 458760, 65536, 1, 458761, 65536, 1, 458762, 327680, 2, 458763, 131072, 0, 524298, 327680, 1, 589834, 131072, 2, 524297, 65536, 1, 458759, 65536, 1, 458758, 65536, 1, 589831, 65536, 2, 393223, 65536, 0, 393222, 65536, 0, 393221, 0, 0, 458757, 393216, 2, 524293, 393216, 1, 524292, 0, 2, 458756, 0, 0, 393226, 131072, 0, 393225, 65536, 0, 393224, 65536, 0, 589829, 0, 2, 589830, 65536, 2, 589832, 65536, 2, 589833, 65536, 2, 524299, 131072, 2, 917518, 327681, 0, 393220, 1, 0, 917516, 196609, 0, 917517, 262145, 0, 851982, 196609, 0, 917505, 327680, 2, 851969, 131072, 0, 917506, 65536, 0, 917507, 65536, 0, 917508, 131072, 0) [node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_02iql")] position = Vector2(16, 192) diff --git a/levels/rand/02.tscn b/levels/rand/02.tscn index b057da4..92e97ad 100644 --- a/levels/rand/02.tscn +++ b/levels/rand/02.tscn @@ -4,7 +4,7 @@ [ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_6rw4g"] [node name="02" instance=ExtResource("1_br7j7")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 65536, 1, 524294, 65536, 1, 589830, 65536, 1, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 1, 393224, 65536, 1, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 1, 9, 0, 3, 393225, 65536, 1, 458761, 65536, 1, 524297, 65536, 1, 589833, 65536, 1, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 65536, 1, 393223, 65536, 1, 458759, 65536, 1, 786444, 131072, 2, 720908, 131072, 1, 655372, 131072, 1, 589836, 131072, 1, 524300, 131072, 1, 458764, 131072, 1, 393228, 131072, 1, 327692, 131072, 1, 262156, 131072, 1, 786443, 65536, 2, 720907, 65536, 1, 655371, 65536, 1, 589835, 65536, 1, 524299, 65536, 1, 458763, 65536, 1, 393227, 65536, 1, 327691, 65536, 1, 262155, 65536, 1, 786442, 65536, 2, 720906, 65536, 1, 655370, 65536, 1, 589834, 65536, 1, 524298, 65536, 1, 458762, 65536, 1, 393226, 65536, 1, 327690, 65536, 1, 262154, 65536, 1, 786441, 65536, 2, 720905, 65536, 1, 655369, 65536, 1, 327689, 65536, 1, 262153, 65536, 1, 786440, 65536, 2, 720904, 65536, 1, 655368, 65536, 1, 327688, 65536, 1, 262152, 65536, 1, 786439, 65536, 2, 720903, 65536, 1, 655367, 65536, 1, 327687, 65536, 1, 262151, 65536, 1, 786438, 65536, 2, 720902, 65536, 1, 655366, 65536, 1, 327686, 65536, 1, 262150, 65536, 1, 786437, 65536, 2, 720901, 65536, 1, 655365, 65536, 1, 589829, 65536, 1, 524293, 65536, 1, 458757, 65536, 1, 393221, 65536, 1, 327685, 65536, 1, 262149, 65536, 1, 786436, 65536, 2, 720900, 65536, 1, 655364, 65536, 1, 589828, 65536, 1, 524292, 65536, 1, 458756, 65536, 1, 393220, 65536, 1, 327684, 65536, 1, 262148, 65536, 1, 196620, 131072, 0, 196619, 65536, 0, 196618, 65536, 0, 196617, 65536, 0, 196616, 65536, 0, 196615, 65536, 0, 196614, 65536, 0, 196613, 65536, 0, 196612, 65536, 0, 786435, 0, 2, 720899, 0, 1, 655363, 0, 1, 589827, 0, 1, 524291, 0, 1, 458755, 0, 1, 393219, 0, 1, 327683, 0, 1, 262147, 0, 1, 196611, 0, 0) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 393216, 0, 983043, 65536, 3, 4, 65536, 0, 983044, 65536, 3, 5, 65536, 0, 983045, 65536, 3, 6, 131072, 0, 589830, 65536, 1, 983046, 131072, 3, 524295, 524288, 2, 589831, 65536, 1, 589832, 65536, 1, 9, 0, 3, 393225, 393216, 4, 458761, 0, 1, 524297, 393216, 2, 589833, 65536, 1, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 524300, 131072, 2, 458764, 131072, 1, 393228, 131072, 1, 327692, 131072, 1, 262156, 131072, 1, 589835, 131072, 2, 524299, 327680, 1, 458763, 65536, 1, 393227, 65536, 1, 327691, 65536, 1, 262155, 65536, 1, 655370, 131072, 2, 589834, 327680, 1, 524298, 65536, 1, 458762, 65536, 1, 393226, 65536, 1, 327690, 65536, 1, 262154, 65536, 1, 655369, 65536, 2, 262153, 393216, 1, 655368, 65536, 2, 655367, 65536, 2, 262151, 524288, 1, 655366, 65536, 2, 655365, 0, 2, 589829, 393216, 1, 524293, 327680, 2, 458757, 131072, 1, 393221, 131072, 1, 327685, 131072, 1, 262149, 327680, 1, 589828, 0, 2, 524292, 393216, 1, 458756, 65536, 1, 393220, 65536, 1, 327684, 65536, 1, 262148, 65536, 1, 196620, 131072, 0, 196619, 65536, 0, 196618, 65536, 0, 196617, 65536, 0, 196616, 65536, 0, 196615, 65536, 0, 196614, 327680, 2, 196613, 65536, 1, 196612, 65536, 1, 524291, 0, 2, 458755, 0, 1, 393219, 0, 1, 327683, 0, 1, 262147, 0, 1, 196611, 0, 1, 131075, 0, 1, 65539, 0, 1, 65540, 65536, 1, 65541, 65536, 1, 65542, 131072, 1, 131078, 131072, 1, 131077, 65536, 1, 131076, 65536, 1, 917516, 196609, 0, 917517, 262145, 0, 851982, 196609, 0, 917518, 327681, 0, 327689, 0, 1, 393224, 0, 3, 524296, 65536, 0, 327687, 196608, 2, 262152, 65536, 2, 458759, 196608, 0, 524294, 65536, 0, 262150, 65536, 2) [node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_6rw4g")] position = Vector2(32, 16) diff --git a/levels/rand/06.tscn b/levels/rand/06.tscn index cb07e57..11b1515 100644 --- a/levels/rand/06.tscn +++ b/levels/rand/06.tscn @@ -1,7 +1,12 @@ -[gd_scene load_steps=2 format=3 uid="uid://887jva236kjn"] +[gd_scene load_steps=3 format=3 uid="uid://887jva236kjn"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_m26rk"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_8k0h1"] [node name="06" instance=ExtResource("1_m26rk")] -layer_0/tile_data = PackedInt32Array(131072, 262144, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 0, 983042, 65536, 3, 3, 65536, 0, 983043, 65536, 3, 4, 65536, 0, 983044, 65536, 3, 5, 65536, 0, 983045, 65536, 3, 6, 65536, 0, 393222, 393216, 1, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 1, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 65536, 0, 393225, 65536, 1, 458761, 65536, 1, 524297, 65536, 1, 589833, 65536, 2, 983049, 0, 3, 10, 65536, 0, 983050, 65536, 3, 11, 65536, 0, 983051, 65536, 3, 12, 65536, 0, 983052, 65536, 3, 13, 65536, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 393216, 3, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 131072, 1, 327695, 131072, 1, 393231, 131072, 1, 589839, 131072, 1, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 458758, 0, 1, 393223, 65536, 1, 458759, 65536, 1, 327686, 65536, 1, 262149, 65536, 1, 196612, 65536, 1, 131075, 65536, 1, 65538, 65536, 1, 786446, 65536, 1, 720909, 65536, 1, 655372, 65536, 1, 589835, 65536, 1, 524298, 65536, 1, 196611, 393216, 1, 262148, 393216, 1, 327685, 393216, 1, 589834, 393216, 1, 655371, 393216, 1, 720908, 393216, 1, 786445, 393216, 1, 851982, 393216, 1, 131074, 393216, 1, 65537, 65536, 1, 196610, 0, 2, 262147, 0, 2, 327684, 0, 2, 393221, 0, 2, 655370, 0, 2, 720907, 0, 2, 786444, 0, 2, 851981, 0, 2, 917518, 0, 1, 131073, 65536, 2, 7, 65536, 0, 8, 65536, 0, 458767, 131072, 1, 524303, 131072, 1, 720910, 65536, 1, 655374, 65536, 1, 589838, 65536, 1, 524302, 65536, 1, 458766, 65536, 1, 393230, 65536, 1, 327694, 65536, 1, 262158, 65536, 1, 196622, 65536, 1, 131086, 65536, 1, 65550, 65536, 1, 655373, 65536, 1, 589837, 65536, 1, 524301, 65536, 1, 458765, 65536, 1, 393229, 65536, 1, 327693, 65536, 1, 262157, 65536, 1, 196621, 65536, 1, 131085, 65536, 1, 65549, 65536, 1, 589836, 65536, 1, 524300, 65536, 1, 458764, 65536, 1, 393228, 65536, 1, 327692, 65536, 1, 262156, 65536, 1, 196620, 65536, 1, 131084, 65536, 1, 65548, 65536, 1, 524299, 65536, 1, 458763, 65536, 1, 393227, 65536, 1, 327691, 65536, 1, 262155, 65536, 1, 196619, 65536, 1, 131083, 65536, 1, 65547, 65536, 1, 458762, 65536, 1, 393226, 65536, 1, 327690, 65536, 1, 262154, 65536, 1, 196618, 65536, 1, 131082, 65536, 1, 65546, 65536, 1, 327689, 65536, 1, 262153, 65536, 1, 196617, 65536, 1, 131081, 65536, 1, 65545, 65536, 1, 327688, 65536, 1, 262152, 65536, 1, 196616, 65536, 1, 131080, 65536, 1, 65544, 65536, 1, 327687, 65536, 1, 262151, 65536, 1, 196615, 65536, 1, 131079, 65536, 1, 65543, 65536, 1, 262150, 65536, 1, 196614, 65536, 1, 131078, 65536, 1, 65542, 65536, 1, 196613, 65536, 1, 131077, 65536, 1, 65541, 65536, 1, 131076, 65536, 1, 65540, 65536, 1, 65539, 65536, 1) +layer_0/tile_data = PackedInt32Array(131072, 262144, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 0, 983042, 65536, 3, 3, 65536, 0, 983043, 65536, 3, 4, 65536, 0, 983044, 65536, 3, 5, 65536, 0, 983045, 65536, 3, 6, 65536, 0, 983046, 131072, 3, 9, 65536, 0, 983049, 0, 3, 10, 65536, 0, 983050, 65536, 3, 11, 65536, 0, 983051, 65536, 3, 12, 65536, 0, 983052, 65536, 3, 13, 65536, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 393216, 3, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 131072, 1, 327695, 131072, 1, 393231, 131072, 1, 589839, 131072, 1, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 262149, 65536, 2, 196612, 65536, 1, 131075, 65536, 1, 65538, 65536, 1, 786446, 65536, 1, 720909, 65536, 1, 655372, 0, 1, 196611, 393216, 1, 262148, 65536, 2, 720908, 0, 1, 786445, 393216, 1, 851982, 393216, 1, 131074, 393216, 1, 65537, 65536, 1, 196610, 0, 2, 262147, 0, 2, 786444, 0, 2, 851981, 0, 2, 917518, 0, 1, 131073, 65536, 2, 7, 65536, 0, 8, 65536, 0, 458767, 131072, 1, 524303, 131072, 1, 720910, 65536, 1, 655374, 65536, 1, 589838, 65536, 1, 524302, 65536, 1, 458766, 65536, 1, 393230, 65536, 1, 327694, 65536, 1, 262158, 65536, 1, 196622, 65536, 1, 131086, 65536, 1, 65550, 65536, 1, 655373, 65536, 1, 589837, 65536, 1, 524301, 65536, 1, 458765, 65536, 1, 393229, 65536, 1, 327693, 65536, 1, 262157, 65536, 1, 196621, 65536, 1, 131085, 65536, 1, 65549, 65536, 1, 589836, 0, 1, 524300, 0, 1, 458764, 0, 1, 393228, 0, 1, 327692, 0, 1, 262156, 393216, 1, 196620, 65536, 1, 131084, 65536, 1, 65548, 65536, 1, 262155, 65536, 2, 196619, 65536, 1, 131083, 65536, 1, 65547, 65536, 1, 262154, 65536, 2, 196618, 65536, 1, 131082, 65536, 1, 65546, 65536, 1, 262153, 65536, 2, 196617, 65536, 1, 131081, 65536, 1, 65545, 65536, 1, 262152, 65536, 2, 196616, 65536, 1, 131080, 65536, 1, 65544, 65536, 1, 262151, 65536, 2, 196615, 65536, 1, 131079, 65536, 1, 65543, 65536, 1, 262150, 65536, 2, 196614, 65536, 1, 131078, 65536, 1, 65542, 65536, 1, 196613, 65536, 1, 131077, 65536, 1, 65541, 65536, 1, 131076, 65536, 1, 65540, 65536, 1, 65539, 65536, 1) enabled_walls = 3.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_8k0h1")] +position = Vector2(77, 80) +rotation = 3.14159 diff --git a/levels/rand/07.tscn b/levels/rand/07.tscn index 473f1e9..1ea6480 100644 --- a/levels/rand/07.tscn +++ b/levels/rand/07.tscn @@ -1,7 +1,11 @@ -[gd_scene load_steps=2 format=3 uid="uid://dsjel2dj0wjo2"] +[gd_scene load_steps=3 format=3 uid="uid://dsjel2dj0wjo2"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_3bnrf"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_5j31a"] [node name="07" instance=ExtResource("1_3bnrf")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 983047, 65536, 3, 983048, 65536, 3) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 262144, 2, 327680, 262144, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 327680, 2, 524294, 393216, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 65536, 0, 458761, 65536, 1, 524297, 327680, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 65536, 1, 393223, 65536, 0, 458759, 65536, 1, 983047, 65536, 3, 983048, 65536, 3, 327681, 131072, 2, 262145, 131072, 0, 196612, 0, 0, 262148, 0, 1, 327684, 0, 1, 327685, 327680, 2, 262149, 131072, 1, 196613, 131072, 0, 393221, 393216, 1, 393220, 0, 2, 458757, 0, 1, 524293, 0, 2, 327686, 131072, 0, 524298, 131072, 2, 458762, 327680, 1, 458763, 131072, 2, 393227, 327680, 1, 393226, 65537, 0, 327690, 1, 0, 327691, 65537, 0, 262155, 0, 1, 262156, 131072, 1, 196620, 131072, 0, 196619, 0, 0, 327692, 131072, 1, 393228, 131072, 2) enabled_walls = 4.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_5j31a")] +position = Vector2(81, 240) diff --git a/levels/rand/08.tscn b/levels/rand/08.tscn index c95f7ff..ad9f421 100644 --- a/levels/rand/08.tscn +++ b/levels/rand/08.tscn @@ -1,7 +1,15 @@ -[gd_scene load_steps=2 format=3 uid="uid://s1lsinwfques"] +[gd_scene load_steps=3 format=3 uid="uid://s1lsinwfques"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_4ldoi"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_qq88x"] [node name="08" instance=ExtResource("1_4ldoi")] -layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 0, 1, 327680, 0, 1, 393216, 0, 2, 589824, 0, 0, 655360, 0, 1, 720896, 0, 1, 786432, 0, 1, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 65536, 0, 983043, 65536, 2, 4, 65536, 0, 983044, 65536, 2, 5, 65536, 0, 983045, 65536, 2, 6, 65536, 0, 524294, 0, 2, 983046, 65536, 2, 524295, 65536, 2, 458760, 65536, 0, 524296, 65536, 2, 9, 65536, 0, 458761, 131072, 0, 524297, 131072, 2, 983049, 65536, 2, 10, 65536, 0, 983050, 65536, 2, 11, 65536, 0, 983051, 65536, 2, 12, 65536, 0, 983052, 65536, 2, 13, 65536, 0, 983053, 65536, 2, 14, 65536, 0, 983054, 65536, 2, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 131072, 1, 327695, 131072, 1, 393231, 131072, 2, 589839, 131072, 0, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 458758, 0, 0, 458759, 65536, 0, 7, 65536, 0, 8, 65536, 0, 983047, 65536, 2, 983048, 65536, 2, 917518, 65536, 1, 851982, 65536, 1, 786446, 65536, 1, 720910, 65536, 1, 655374, 65536, 1, 589838, 65536, 0, 917517, 65536, 1, 851981, 65536, 1, 786445, 65536, 1, 720909, 65536, 1, 655373, 65536, 1, 589837, 65536, 0, 917516, 65536, 1, 851980, 65536, 1, 786444, 65536, 1, 720908, 65536, 1, 655372, 65536, 1, 589836, 65536, 0, 917515, 65536, 1, 851979, 65536, 1, 786443, 65536, 1, 720907, 393216, 2, 655371, 0, 1, 589835, 0, 0, 917514, 65536, 1, 851978, 65536, 1, 786442, 65536, 1, 720906, 65536, 0, 917513, 65536, 1, 851977, 65536, 1, 786441, 65536, 1, 720905, 65536, 0, 917512, 65536, 1, 851976, 65536, 1, 786440, 65536, 1, 720904, 65536, 0, 917511, 65536, 1, 851975, 65536, 1, 786439, 65536, 1, 720903, 65536, 0, 917510, 65536, 1, 851974, 65536, 1, 786438, 65536, 1, 720902, 65536, 0, 917509, 65536, 1, 851973, 65536, 1, 786437, 65536, 1, 720901, 65536, 0, 917508, 65536, 1, 851972, 65536, 1, 786436, 65536, 1, 720900, 327680, 2, 655364, 131072, 1, 589828, 131072, 0, 917507, 65536, 1, 851971, 65536, 1, 786435, 65536, 1, 720899, 65536, 1, 655363, 65536, 1, 589827, 65536, 0, 917506, 65536, 1, 851970, 65536, 1, 786434, 65536, 1, 720898, 65536, 1, 655362, 65536, 1, 589826, 65536, 0, 917505, 65536, 1, 851969, 65536, 1, 786433, 65536, 1, 720897, 65536, 1, 655361, 65536, 1, 589825, 65536, 0, 393230, 65536, 2, 327694, 65536, 1, 262158, 65536, 1, 196622, 65536, 1, 131086, 65536, 1, 65550, 65536, 1, 393229, 65536, 2, 327693, 65536, 1, 262157, 65536, 1, 196621, 65536, 1, 131085, 65536, 1, 65549, 65536, 1, 393228, 65536, 2, 327692, 65536, 1, 262156, 65536, 1, 196620, 65536, 1, 131084, 65536, 1, 65548, 65536, 1, 393227, 0, 2, 327691, 393216, 1, 262155, 65536, 1, 196619, 65536, 1, 131083, 65536, 1, 65547, 65536, 1, 327690, 65536, 2, 262154, 65536, 1, 196618, 65536, 1, 131082, 65536, 1, 65546, 65536, 1, 327689, 65536, 2, 262153, 65536, 1, 196617, 65536, 1, 131081, 65536, 1, 65545, 65536, 1, 327688, 65536, 2, 262152, 65536, 1, 196616, 65536, 1, 131080, 65536, 1, 65544, 65536, 1, 327687, 65536, 2, 262151, 65536, 1, 196615, 65536, 1, 131079, 65536, 1, 65543, 65536, 1, 327686, 65536, 2, 262150, 65536, 1, 196614, 65536, 1, 131078, 65536, 1, 65542, 65536, 1, 262149, 65536, 1, 196613, 65536, 1, 131077, 65536, 1, 65541, 65536, 1, 393220, 131072, 2, 327684, 327680, 1, 262148, 65536, 1, 196612, 65536, 1, 131076, 65536, 1, 65540, 65536, 1, 393219, 65536, 2, 327683, 65536, 1, 262147, 65536, 1, 196611, 65536, 1, 131075, 65536, 1, 65539, 65536, 1, 393218, 65536, 2, 327682, 65536, 1, 262146, 65536, 1, 196610, 65536, 1, 131074, 65536, 1, 65538, 65536, 1, 393217, 65536, 2, 327681, 65536, 1, 262145, 65536, 1, 196609, 65536, 1, 131073, 65536, 1, 65537, 65536, 1, 327685, 65536, 2) +layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 0, 1, 327680, 0, 1, 393216, 0, 2, 786432, 0, 1, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 65536, 0, 983043, 327680, 3, 4, 65536, 0, 983044, 65536, 3, 5, 65536, 0, 983045, 393216, 3, 6, 65536, 0, 983046, 65536, 2, 9, 65536, 0, 983049, 65536, 2, 10, 65536, 0, 983050, 65536, 2, 11, 65536, 0, 983051, 65536, 2, 12, 65536, 0, 983052, 65536, 2, 13, 65536, 0, 983053, 65536, 2, 14, 65536, 0, 983054, 65536, 2, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 131072, 1, 327695, 131072, 1, 393231, 131072, 2, 589839, 131072, 0, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 7, 65536, 0, 8, 65536, 0, 983047, 65536, 2, 983048, 65536, 2, 917518, 65536, 1, 851982, 65536, 1, 786446, 65536, 1, 720910, 393216, 2, 655374, 0, 1, 589838, 0, 0, 917517, 65536, 1, 851981, 65536, 1, 786445, 65536, 1, 720909, 65536, 0, 917516, 65536, 1, 851980, 65536, 1, 786444, 393216, 2, 720908, 0, 0, 917515, 65536, 1, 851979, 65536, 1, 786443, 65536, 0, 917514, 65536, 1, 851978, 65536, 1, 786442, 65536, 0, 917513, 65536, 1, 851977, 393216, 2, 786441, 0, 0, 917512, 65536, 1, 851976, 65536, 0, 917511, 65536, 1, 851975, 65536, 0, 917510, 393216, 2, 851974, 0, 0, 917509, 0, 0, 917507, 131072, 1, 851971, 131072, 0, 917506, 65536, 1, 851970, 327680, 2, 786434, 131072, 0, 917505, 65536, 1, 851969, 65536, 1, 786433, 327680, 2, 393230, 0, 2, 327694, 393216, 1, 262158, 65536, 1, 196622, 65536, 1, 131086, 65536, 1, 65550, 65536, 1, 327693, 0, 2, 262157, 393216, 1, 196621, 65536, 1, 131085, 65536, 1, 65549, 65536, 1, 262156, 65536, 2, 196620, 65536, 1, 131084, 65536, 1, 65548, 65536, 1, 262155, 65536, 2, 196619, 65536, 1, 131083, 65536, 1, 65547, 65536, 1, 262154, 0, 2, 196618, 393216, 1, 131082, 65536, 1, 65546, 65536, 1, 196617, 65536, 2, 131081, 65536, 1, 65545, 65536, 1, 196616, 65536, 2, 131080, 65536, 1, 65544, 65536, 1, 262151, 131072, 2, 196615, 327680, 1, 131079, 65536, 1, 65543, 65536, 1, 262150, 65536, 2, 196614, 65536, 1, 131078, 65536, 1, 65542, 65536, 1, 262149, 0, 2, 196613, 393216, 1, 131077, 65536, 1, 65541, 65536, 1, 196612, 65536, 2, 131076, 65536, 1, 65540, 65536, 1, 196611, 65536, 2, 131075, 65536, 1, 65539, 65536, 1, 196610, 65536, 2, 131074, 65536, 1, 65538, 65536, 1, 393217, 131072, 2, 327681, 131072, 1, 262145, 131072, 1, 196609, 327680, 1, 131073, 65536, 1, 65537, 65536, 1, 720897, 131072, 0, 720896, 262144, 2, 655360, 196608, 1, 589824, 196608, 0) enabled_walls = 5.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_qq88x")] +position = Vector2(152, 192) + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_qq88x")] +position = Vector2(106, 80) +rotation = 3.14159 diff --git a/levels/rand/09.tscn b/levels/rand/09.tscn index db876ee..285a1ac 100644 --- a/levels/rand/09.tscn +++ b/levels/rand/09.tscn @@ -1,7 +1,15 @@ -[gd_scene load_steps=2 format=3 uid="uid://e4kinwyx5821"] +[gd_scene load_steps=3 format=3 uid="uid://e4kinwyx5821"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_ix63m"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_hr1sv"] [node name="09" instance=ExtResource("1_ix63m")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 393216, 3, 11, 65536, 3, 983051, 65536, 2, 12, 65536, 3, 983052, 65536, 2, 13, 65536, 3, 983053, 65536, 2, 14, 65536, 3, 983054, 65536, 2, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 131072, 1, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 983047, 65536, 3, 983048, 65536, 3, 917514, 0, 0, 917515, 65536, 0, 917516, 393216, 2, 851981, 65536, 1, 851982, 65536, 1, 786446, 65536, 1, 720910, 393216, 2, 524303, 458752, 2, 458767, 196608, 1, 524302, 0, 0, 589838, 0, 1, 655374, 0, 1, 917517, 65536, 1, 917518, 65536, 1, 786445, 393216, 2, 720909, 0, 0, 786444, 0, 0, 851980, 0, 1) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 65536, 1, 524294, 65536, 1, 589830, 393216, 1, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 1, 393224, 65536, 1, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 1, 9, 0, 3, 393225, 65536, 1, 458761, 65536, 1, 524297, 65536, 1, 589833, 65536, 1, 983049, 65536, 3, 10, 65536, 3, 983050, 393216, 3, 11, 65536, 3, 983051, 65536, 2, 12, 65536, 3, 983052, 65536, 2, 13, 65536, 3, 983053, 65536, 2, 14, 65536, 3, 983054, 65536, 2, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 131072, 1, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 65536, 1, 393223, 65536, 1, 458759, 65536, 1, 983047, 65536, 3, 983048, 65536, 3, 917514, 0, 0, 917515, 65536, 0, 917516, 393216, 2, 851981, 65536, 1, 851982, 65536, 1, 786446, 65536, 1, 720910, 393216, 2, 524303, 458752, 2, 458767, 196608, 1, 524302, 0, 0, 589838, 0, 1, 655374, 0, 1, 917517, 65536, 1, 917518, 65536, 1, 786445, 393216, 2, 720909, 0, 0, 786444, 0, 0, 851980, 0, 1, 327687, 65536, 1, 327688, 65536, 1, 262152, 327680, 2, 262151, 393216, 2, 327689, 327680, 2, 393226, 327680, 1, 458762, 131072, 1, 524298, 131072, 1, 589834, 131072, 1, 655370, 131072, 2, 655369, 65536, 2, 655368, 327680, 1, 655367, 393216, 1, 720903, 0, 2, 720904, 131072, 2, 655366, 0, 2, 589829, 0, 2, 524293, 0, 1, 458757, 0, 1, 393227, 131072, 2, 327691, 131072, 0, 327690, 65536, 0, 262153, 131072, 0, 196616, 131072, 0, 196615, 0, 0, 327686, 393216, 2, 262150, 0, 0, 393221, 0, 1, 327685, 0, 0) enabled_walls = 6.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_hr1sv")] +position = Vector2(71, 240) + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_hr1sv")] +position = Vector2(240, 109) +rotation = -1.57079 diff --git a/levels/rand/10.tscn b/levels/rand/10.tscn index 94ee4cc..8de1805 100644 --- a/levels/rand/10.tscn +++ b/levels/rand/10.tscn @@ -1,7 +1,31 @@ -[gd_scene load_steps=2 format=3 uid="uid://dd74d1a4uirhr"] +[gd_scene load_steps=3 format=3 uid="uid://dd74d1a4uirhr"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_c2n3v"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_vbven"] [node name="10" instance=ExtResource("1_c2n3v")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 65536, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 983047, 65536, 3, 983048, 65536, 3, 524303, 196608, 1, 458767, 196608, 1, 8, 65536, 3, 7, 65536, 3) +layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 262144, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 2, 589824, 196608, 0, 655360, 196608, 1, 720896, 196608, 1, 786432, 262144, 2, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 327680, 0, 983043, 327680, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 983046, 65536, 3, 9, 65536, 3, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 393216, 3, 14, 65536, 3, 983054, 65536, 2, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 458752, 2, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 983047, 65536, 3, 983048, 65536, 3, 524303, 196608, 1, 458767, 196608, 1, 8, 65536, 3, 7, 65536, 3, 65537, 65536, 1, 131073, 327680, 1, 131074, 131072, 2, 65538, 327680, 1, 65539, 131072, 2, 196609, 131072, 2, 917505, 65536, 1, 851969, 327680, 2, 786433, 131072, 0, 851970, 131072, 0, 917506, 327680, 2, 917507, 131072, 0, 917518, 393216, 2, 917517, 0, 0, 851982, 0, 0) enabled_walls = 7.0 + +[node name="Blocks" parent="." index="0"] +layer_0/tile_data = PackedInt32Array(458750, 0, 3, 458751, 131072, 3, 655359, 131072, 3, -131066, 196608, 0, -65530, 196608, 2, 1048582, 196608, 0, 1114118, 196608, 2, -65527, 196608, 2, 1048585, 196608, 0, 1114121, 196608, 2, 393232, 0, 3, 589840, 0, 3, 393233, 131072, 3, 589841, 131072, 3, -131063, 196608, 0, 655358, 0, 3, 983052, 0, 3, 983053, 131072, 3) + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_vbven")] +position = Vector2(150, 240) +rotation = 6.28318 + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_vbven")] +position = Vector2(113, 240) +rotation = 6.28318 + +[node name="Wrencher3" parent="Enemys" index="2" instance=ExtResource("2_vbven")] +position = Vector2(240, 154) +rotation = 4.71238 + +[node name="Wrencher4" parent="Enemys" index="3" instance=ExtResource("2_vbven")] +position = Vector2(240, 102) +rotation = 4.71238 + +[node name="Wrencher5" parent="Enemys" index="4" instance=ExtResource("2_vbven")] +position = Vector2(132, 16) +rotation = 3.14159 diff --git a/levels/rand/11.tscn b/levels/rand/11.tscn index 883363c..7a85f2a 100644 --- a/levels/rand/11.tscn +++ b/levels/rand/11.tscn @@ -1,7 +1,16 @@ -[gd_scene load_steps=2 format=3 uid="uid://dip1l1cd8s8p0"] +[gd_scene load_steps=3 format=3 uid="uid://dip1l1cd8s8p0"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_pa3ds"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_gdari"] [node name="11" instance=ExtResource("1_pa3ds")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 524288, 196608, 1, 458752, 196608, 1) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 262144, 2, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 3, 983042, 327680, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 983046, 131072, 3, 9, 0, 3, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 393216, 0, 983053, 65536, 3, 14, 65536, 0, 983054, 65536, 3, 15, 131072, 0, 65551, 131072, 1, 131087, 458752, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 524288, 196608, 1, 458752, 196608, 1, 65550, 65536, 1, 131085, 589824, 1, 196620, 589824, 1, 262155, 589824, 1, 327690, 589824, 1, 393225, 0, 2, 589830, 131072, 0, 655365, 589824, 1, 720900, 589824, 1, 786435, 589824, 1, 851970, 589824, 1, 917505, 65536, 1, 131086, 65536, 2, 196621, 131072, 2, 262156, 131072, 2, 327691, 131072, 2, 393226, 131072, 2, 655366, 131072, 2, 720901, 131072, 2, 786436, 131072, 2, 851971, 131072, 2, 917506, 131072, 1, 851969, 65536, 0, 786434, 0, 0, 720899, 0, 0, 655364, 0, 0, 589829, 0, 0, 327689, 0, 0, 262154, 0, 0, 196619, 0, 0, 131084, 0, 0, 65549, 0, 1) enabled_walls = 8.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_gdari")] +position = Vector2(16, 97) +rotation = 1.57079 + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_gdari")] +position = Vector2(240, 188) +rotation = 4.71238 diff --git a/levels/rand/12.tscn b/levels/rand/12.tscn index 0fadbab..845a62c 100644 --- a/levels/rand/12.tscn +++ b/levels/rand/12.tscn @@ -1,7 +1,12 @@ -[gd_scene load_steps=2 format=3 uid="uid://bfpc41oqcf0qw"] +[gd_scene load_steps=3 format=3 uid="uid://bfpc41oqcf0qw"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_x55go"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_b1led"] [node name="12" instance=ExtResource("1_x55go")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 65536, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 7, 65536, 3, 8, 65536, 3, 458752, 196608, 1, 524288, 196608, 1) +layer_0/tile_data = PackedInt32Array(131072, 262144, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 327680, 0, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 983046, 131072, 3, 9, 65536, 3, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 7, 65536, 3, 8, 65536, 3, 458752, 196608, 1, 524288, 196608, 1, 65537, 327680, 1, 65538, 131072, 2, 131073, 131072, 2) enabled_walls = 9.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_b1led")] +position = Vector2(16, 189) +rotation = -4.71238 diff --git a/levels/rand/13.tscn b/levels/rand/13.tscn index cb6013a..3eee3c3 100644 --- a/levels/rand/13.tscn +++ b/levels/rand/13.tscn @@ -1,7 +1,16 @@ -[gd_scene load_steps=2 format=3 uid="uid://ml0vpr107gc8"] +[gd_scene load_steps=3 format=3 uid="uid://ml0vpr107gc8"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_13npg"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_hl3le"] [node name="13" instance=ExtResource("1_13npg")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 458767, 196608, 1, 524303, 196608, 1, 458752, 196608, 1, 524288, 196608, 1) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 1, 524294, 0, 1, 589830, 0, 1, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 1, 393224, 65536, 1, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 1, 9, 0, 3, 393225, 131072, 1, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 1, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 1, 458759, 65536, 1, 458767, 196608, 1, 524303, 196608, 1, 458752, 196608, 1, 524288, 196608, 1, 327686, 0, 1, 327687, 65536, 1, 327688, 65536, 1, 327689, 131072, 1, 262150, 0, 1, 262151, 65536, 1, 262152, 65536, 1, 262153, 131072, 1, 196617, 131072, 0, 196616, 65536, 0, 196615, 65536, 0, 196614, 0, 0, 655366, 0, 1, 655367, 65536, 1, 655368, 65536, 1, 655369, 131072, 1, 720905, 131072, 2, 720904, 65536, 2, 720903, 65536, 2, 720902, 0, 2) enabled_walls = 10.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_hl3le")] +position = Vector2(96, 139) +rotation = -1.57079 + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_hl3le")] +position = Vector2(160, 152) +rotation = -4.71238 diff --git a/levels/rand/14.tscn b/levels/rand/14.tscn index a0f561e..e3139db 100644 --- a/levels/rand/14.tscn +++ b/levels/rand/14.tscn @@ -1,7 +1,20 @@ -[gd_scene load_steps=2 format=3 uid="uid://cpg5dac48jhj0"] +[gd_scene load_steps=3 format=3 uid="uid://cpg5dac48jhj0"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_d7058"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_p4l5b"] [node name="14" instance=ExtResource("1_d7058")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 131072, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 65536, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 0, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 458752, 196608, 1, 524288, 196608, 1, 8, 65536, 3, 7, 65536, 3, 524303, 196608, 1, 458767, 196608, 1) +layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 0, 1, 327680, 0, 1, 393216, 0, 1, 589824, 0, 1, 655360, 0, 1, 720896, 0, 1, 786432, 0, 1, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 65536, 0, 983043, 327680, 3, 4, 65536, 0, 983044, 65536, 3, 5, 65536, 0, 983045, 65536, 3, 6, 65536, 0, 983046, 131072, 3, 9, 65536, 0, 983049, 0, 3, 10, 65536, 0, 983050, 65536, 3, 11, 65536, 0, 983051, 65536, 3, 12, 65536, 0, 983052, 393216, 3, 13, 65536, 0, 983053, 65536, 2, 14, 65536, 0, 983054, 65536, 2, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 131072, 1, 327695, 131072, 1, 393231, 131072, 1, 589839, 131072, 1, 655375, 131072, 1, 720911, 131072, 1, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 458752, 0, 1, 524288, 0, 1, 8, 65536, 0, 7, 65536, 0, 524303, 131072, 1, 458767, 131072, 1, 917507, 131072, 1, 851971, 131072, 1, 786435, 131072, 1, 720899, 131072, 1, 655363, 131072, 1, 589827, 131072, 1, 524291, 131072, 1, 458755, 131072, 1, 393219, 131072, 1, 327683, 131072, 1, 262147, 131072, 1, 196611, 327680, 1, 131075, 65536, 1, 65539, 65536, 1, 917506, 65536, 1, 851970, 65536, 1, 786434, 65536, 1, 720898, 65536, 1, 655362, 65536, 1, 589826, 65536, 1, 524290, 65536, 1, 458754, 65536, 1, 393218, 65536, 1, 327682, 65536, 1, 262146, 65536, 1, 196610, 65536, 1, 131074, 65536, 1, 65538, 65536, 1, 917505, 65536, 1, 851969, 65536, 1, 786433, 65536, 1, 720897, 65536, 1, 655361, 65536, 1, 589825, 65536, 1, 524289, 65536, 1, 458753, 65536, 1, 393217, 65536, 1, 327681, 65536, 1, 262145, 65536, 1, 196609, 65536, 1, 131073, 65536, 1, 65537, 65536, 1, 917518, 65536, 1, 851982, 65536, 1, 786446, 65536, 1, 720910, 65536, 1, 655374, 65536, 1, 589838, 65536, 1, 524302, 65536, 1, 458766, 65536, 1, 393230, 65536, 1, 327694, 65536, 1, 262158, 65536, 1, 196622, 65536, 1, 131086, 65536, 1, 65550, 65536, 1, 917517, 65536, 1, 851981, 65536, 1, 786445, 65536, 1, 720909, 65536, 1, 655373, 65536, 1, 589837, 65536, 1, 524301, 65536, 1, 458765, 65536, 1, 393229, 65536, 1, 327693, 65536, 1, 262157, 65536, 1, 196621, 65536, 1, 131085, 65536, 1, 65549, 65536, 1, 917516, 0, 1, 851980, 0, 1, 786444, 0, 1, 720908, 0, 1, 655372, 0, 1, 589836, 0, 1, 524300, 0, 1, 458764, 0, 1, 393228, 0, 1, 327692, 0, 1, 262156, 0, 1, 196620, 393216, 1, 131084, 65536, 1, 65548, 65536, 1, 196619, 65536, 2, 131083, 65536, 1, 65547, 65536, 1, 196618, 65536, 2, 131082, 65536, 1, 65546, 65536, 1, 196617, 65536, 2, 131081, 65536, 1, 65545, 65536, 1, 196616, 65536, 2, 131080, 65536, 1, 65544, 65536, 1, 196615, 65536, 2, 131079, 65536, 1, 65543, 65536, 1, 196614, 65536, 2, 131078, 65536, 1, 65542, 65536, 1, 196613, 65536, 2, 131077, 65536, 1, 65541, 65536, 1, 196612, 65536, 2, 131076, 65536, 1, 65540, 65536, 1) enabled_walls = 11.0 + +[node name="Wrencher2" parent="Enemys" index="0" instance=ExtResource("2_p4l5b")] +position = Vector2(89, 64) +rotation = 3.14159 + +[node name="Wrencher3" parent="Enemys" index="1" instance=ExtResource("2_p4l5b")] +position = Vector2(192, 226) +rotation = -1.57079 + +[node name="Wrencher4" parent="Enemys" index="2" instance=ExtResource("2_p4l5b")] +position = Vector2(64, 129) +rotation = 1.57079 diff --git a/levels/rand/15.tscn b/levels/rand/15.tscn index d12ce0f..e8a73b6 100644 --- a/levels/rand/15.tscn +++ b/levels/rand/15.tscn @@ -1,7 +1,16 @@ -[gd_scene load_steps=2 format=3 uid="uid://bk6x0rwnfcnax"] +[gd_scene load_steps=3 format=3 uid="uid://bk6x0rwnfcnax"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_40br1"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_dqkom"] [node name="15" instance=ExtResource("1_40br1")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 458752, 196608, 1, 524288, 196608, 1, 983047, 65536, 3, 983048, 65536, 3) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 983046, 65536, 3, 9, 0, 3, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458752, 196608, 1, 524288, 196608, 1, 983047, 65536, 3, 983048, 65536, 3, 589837, 131072, 2, 524300, 327680, 2, 458763, 327680, 2, 393226, 327680, 2, 327689, 327680, 2, 262152, 327680, 2, 196615, 327680, 2, 131078, 0, 0, 196614, 0, 1, 262151, 393216, 1, 327688, 393216, 1, 393225, 393216, 1, 458762, 393216, 1, 524299, 393216, 1, 589836, 65536, 2, 589835, 0, 2, 524298, 0, 2, 458761, 0, 2, 393224, 0, 2, 327687, 0, 2, 262150, 0, 2, 131079, 131072, 0, 196616, 131072, 0, 262153, 131072, 0, 327690, 131072, 0, 393227, 131072, 0, 458764, 131072, 0, 524301, 131072, 0) enabled_walls = 12.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_dqkom")] +position = Vector2(16, 133) +rotation = -4.71238 + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_dqkom")] +position = Vector2(68, 240) +rotation = -6.28318 diff --git a/levels/rand/16.tscn b/levels/rand/16.tscn index 762c4fa..e379f17 100644 --- a/levels/rand/16.tscn +++ b/levels/rand/16.tscn @@ -1,7 +1,12 @@ -[gd_scene load_steps=2 format=3 uid="uid://dcbnac3k5c2bh"] +[gd_scene load_steps=3 format=3 uid="uid://dcbnac3k5c2bh"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_yds8y"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_upx7m"] [node name="16" instance=ExtResource("1_yds8y")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 196608, 1, 851968, 196608, 1, 917504, 196608, 1, 983040, 262144, 3, 983041, 65536, 3, 2, 65536, 3, 983042, 65536, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 65536, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 65536, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 983048, 65536, 3, 983047, 65536, 3, 524288, 196608, 1, 458752, 196608, 1, 7, 65536, 3, 8, 65536, 3) +layer_0/tile_data = PackedInt32Array(131072, 0, 1, 196608, 0, 1, 262144, 0, 1, 327680, 0, 1, 393216, 262144, 1, 589824, 262144, 2, 655360, 0, 1, 720896, 0, 1, 786432, 0, 1, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 0, 983042, 65536, 2, 3, 65536, 0, 983043, 65536, 2, 4, 65536, 0, 983044, 65536, 2, 5, 65536, 0, 983045, 65536, 2, 6, 65536, 0, 983046, 65536, 2, 9, 65536, 0, 983049, 65536, 2, 10, 65536, 0, 983050, 65536, 2, 11, 65536, 0, 983051, 65536, 2, 12, 65536, 0, 983052, 65536, 2, 13, 65536, 0, 983053, 65536, 2, 14, 65536, 0, 983054, 65536, 2, 15, 131072, 0, 65551, 131072, 1, 131087, 131072, 1, 196623, 131072, 1, 262159, 458752, 1, 327695, 196608, 1, 393231, 196608, 2, 589839, 196608, 0, 655375, 196608, 1, 720911, 458752, 2, 786447, 131072, 1, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 0, 1, 0, 0, 0, 1, 65536, 0, 983048, 65536, 2, 983047, 65536, 2, 524288, 196608, 1, 458752, 196608, 1, 7, 65536, 0, 8, 65536, 0, 917518, 65536, 1, 851982, 65536, 1, 786446, 393216, 2, 720910, 0, 0, 262158, 0, 2, 196622, 393216, 1, 131086, 65536, 1, 65550, 65536, 1, 917517, 65536, 1, 851981, 65536, 1, 786445, 65536, 0, 196621, 65536, 2, 131085, 65536, 1, 65549, 65536, 1, 917516, 65536, 1, 851980, 65536, 1, 786444, 327680, 2, 720908, 131072, 0, 262156, 131072, 2, 196620, 327680, 1, 131084, 65536, 1, 65548, 65536, 1, 917515, 65536, 1, 851979, 65536, 1, 786443, 65536, 1, 720907, 327680, 2, 655371, 131072, 1, 589835, 131072, 0, 393227, 131072, 2, 327691, 131072, 1, 262155, 327680, 1, 196619, 65536, 1, 131083, 65536, 1, 65547, 65536, 1, 917514, 65536, 1, 851978, 65536, 1, 786442, 65536, 1, 720906, 393216, 2, 655370, 0, 1, 589834, 0, 0, 393226, 0, 2, 327690, 0, 1, 262154, 393216, 1, 196618, 65536, 1, 131082, 65536, 1, 65546, 65536, 1, 917513, 65536, 1, 851977, 65536, 1, 786441, 65536, 1, 720905, 65536, 0, 262153, 65536, 2, 196617, 65536, 1, 131081, 65536, 1, 65545, 65536, 1, 917512, 65536, 1, 851976, 65536, 1, 786440, 65536, 1, 720904, 327680, 2, 655368, 131072, 1, 589832, 131072, 0, 393224, 131072, 2, 327688, 131072, 1, 262152, 327680, 1, 196616, 65536, 1, 131080, 65536, 1, 65544, 65536, 1, 917511, 65536, 1, 851975, 65536, 1, 786439, 65536, 1, 720903, 393216, 2, 655367, 0, 1, 589831, 0, 0, 393223, 0, 2, 327687, 0, 1, 262151, 393216, 1, 196615, 65536, 1, 131079, 65536, 1, 65543, 65536, 1, 917510, 65536, 1, 851974, 65536, 1, 786438, 65536, 1, 720902, 65536, 0, 262150, 65536, 2, 196614, 65536, 1, 131078, 65536, 1, 65542, 65536, 1, 917509, 65536, 1, 851973, 65536, 1, 786437, 65536, 1, 720901, 327680, 2, 655365, 131072, 1, 589829, 131072, 0, 393221, 131072, 2, 327685, 131072, 1, 262149, 327680, 1, 196613, 65536, 1, 131077, 65536, 1, 65541, 65536, 1, 917508, 65536, 1, 851972, 65536, 1, 786436, 65536, 1, 720900, 393216, 2, 655364, 0, 1, 589828, 0, 0, 393220, 0, 2, 327684, 0, 1, 262148, 393216, 1, 196612, 65536, 1, 131076, 65536, 1, 65540, 65536, 1, 917507, 65536, 1, 851971, 65536, 1, 786435, 65536, 1, 262147, 65536, 2, 196611, 65536, 1, 131075, 65536, 1, 65539, 65536, 1, 917506, 65536, 1, 851970, 65536, 1, 786434, 65536, 1, 720898, 327680, 2, 655362, 131072, 1, 589826, 131072, 0, 393218, 131072, 2, 327682, 131072, 1, 262146, 327680, 1, 196610, 65536, 1, 131074, 65536, 1, 65538, 65536, 1, 917505, 65536, 1, 851969, 65536, 1, 786433, 65536, 1, 720897, 65536, 1, 655361, 65536, 1, 589825, 65536, 0, 393217, 65536, 2, 327681, 65536, 1, 262145, 65536, 1, 196609, 65536, 1, 131073, 65536, 1, 65537, 65536, 1, 720899, 65536, 0) enabled_walls = 13.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_upx7m")] +position = Vector2(16, 131) +rotation = 1.57079 diff --git a/levels/rand/17.tscn b/levels/rand/17.tscn index b2a7888..4289942 100644 --- a/levels/rand/17.tscn +++ b/levels/rand/17.tscn @@ -1,7 +1,22 @@ -[gd_scene load_steps=2 format=3 uid="uid://pk206siyyege"] +[gd_scene load_steps=3 format=3 uid="uid://pk206siyyege"] [ext_resource type="PackedScene" uid="uid://dxx21fiom4ef1" path="res://levels/Level.tscn" id="1_otvl3"] +[ext_resource type="PackedScene" uid="uid://b0s1su8xjtxdj" path="res://enemys/wrencher.tscn" id="2_d40ci"] [node name="17" instance=ExtResource("1_otvl3")] -layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 262144, 2, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 3, 983042, 327680, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 393222, 0, 0, 524294, 0, 1, 589830, 0, 2, 983046, 65536, 3, 524295, 65536, 1, 589831, 65536, 2, 393224, 65536, 0, 458760, 65536, 1, 524296, 65536, 1, 589832, 65536, 2, 9, 0, 3, 393225, 131072, 0, 458761, 131072, 1, 524297, 131072, 1, 589833, 131072, 2, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 65536, 3, 14, 65536, 3, 983054, 65536, 3, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 196608, 1, 851983, 196608, 1, 917519, 196608, 1, 983055, 458752, 3, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458758, 0, 1, 393223, 65536, 0, 458759, 65536, 1, 458752, 196608, 1, 524288, 196608, 1, 786433, 131072, 0, 917505, 327680, 2, 851969, 131072, 1, 917506, 131072, 0, 983047, 65536, 3, 983048, 65536, 3, 524303, 196608, 1, 458767, 196608, 1) +layer_0/tile_data = PackedInt32Array(131072, 196608, 1, 196608, 196608, 1, 262144, 196608, 1, 327680, 196608, 1, 393216, 196608, 1, 589824, 196608, 1, 655360, 196608, 1, 720896, 196608, 1, 786432, 262144, 2, 851968, 0, 1, 917504, 0, 1, 983040, 0, 2, 983041, 65536, 2, 2, 65536, 3, 983042, 327680, 3, 3, 65536, 3, 983043, 65536, 3, 4, 65536, 3, 983044, 65536, 3, 5, 65536, 3, 983045, 65536, 3, 6, 131072, 3, 983046, 65536, 3, 9, 0, 3, 983049, 65536, 3, 10, 65536, 3, 983050, 65536, 3, 11, 65536, 3, 983051, 65536, 3, 12, 65536, 3, 983052, 65536, 3, 13, 65536, 3, 983053, 393216, 3, 14, 65536, 3, 983054, 65536, 2, 15, 458752, 0, 65551, 196608, 1, 131087, 196608, 1, 196623, 196608, 1, 262159, 196608, 1, 327695, 196608, 1, 393231, 196608, 1, 589839, 196608, 1, 655375, 196608, 1, 720911, 196608, 1, 786447, 458752, 2, 851983, 131072, 1, 917519, 131072, 1, 983055, 131072, 2, 65536, 196608, 1, 0, 262144, 0, 1, 65536, 3, 458752, 196608, 1, 524288, 196608, 1, 786433, 131072, 0, 917505, 327680, 2, 851969, 131072, 1, 917506, 131072, 0, 983047, 65536, 3, 983048, 65536, 3, 524303, 196608, 1, 458767, 196608, 1, 917518, 65536, 1, 851982, 393216, 2, 786446, 0, 0, 851981, 0, 0, 917517, 0, 1, 262149, 0, 2, 262150, 131072, 2, 196614, 131072, 0, 196613, 0, 0, 327689, 0, 0, 393225, 0, 2, 393226, 131072, 2, 327690, 131072, 0, 458757, 0, 0, 458758, 131072, 0, 524294, 131072, 2, 524293, 0, 2, 589833, 0, 0, 655369, 0, 2, 655370, 131072, 2, 589834, 131072, 0, 786437, 0, 0, 851973, 0, 2, 851974, 131072, 2, 786438, 131072, 0, 851977, 196608, 3, 196617, 0, 3, 196618, 131072, 3, 327692, 0, 0, 327693, 131072, 0, 393229, 131072, 2, 393228, 0, 2, 196610, 0, 0, 196611, 131072, 0, 262147, 131072, 2, 262146, 0, 2, 524290, 0, 3, 524291, 131072, 3, 655362, 0, 3, 655363, 131072, 3, 655372, 0, 3, 655373, 131072, 3, 524300, 0, 3, 524301, 131072, 3) enabled_walls = 14.0 + +[node name="Wrencher" parent="Enemys" index="0" instance=ExtResource("2_d40ci")] +position = Vector2(187, 240) +max_health = 7 + +[node name="Wrencher2" parent="Enemys" index="1" instance=ExtResource("2_d40ci")] +position = Vector2(16, 107) +rotation = 1.57079 +max_health = 2 + +[node name="Wrencher3" parent="Enemys" index="2" instance=ExtResource("2_d40ci")] +position = Vector2(240, 63) +rotation = 4.71238 +max_health = 3 diff --git a/player/player.gd b/player/player.gd index f6a1131..fac7978 100644 --- a/player/player.gd +++ b/player/player.gd @@ -30,10 +30,12 @@ signal hp_changed(health: int) @export var air_movement_modifier := 0.95 ## Max hp -@export var max_health := 3 +@export var max_health := 10 @onready var sprite := $Sprite as Sprite2D @onready var anims := $Player as AnimationPlayer +@onready var pickup_area := $PickupArea as Area2D +@onready var aim_gizmo := $AimGizmo as AimGizmo ## The coyote jump timer. ## Allows you to jump after leaving the ground if the timer has not run out. @@ -49,6 +51,9 @@ func _exit_tree() -> void: ## State enum. enum State { MOVE, WALL_SLIDE, STOP } +## Aiming the hammer. +var aiming := false + ## Can we double jump now? var double_jump := true @@ -58,7 +63,11 @@ var state := State.MOVE ## Have we just jumped? var just_jumped := false -var has_hammer := false +## The hammer we carry. +var current_hammer: Hammer = null + +## The last highlit hammer. +var last_highlit: Hammer = null var health := max_health: set(hp): @@ -76,6 +85,8 @@ func _physics_process(delta: float) -> void: play(&"idle") State.MOVE: var input := Input.get_axis(&"left", &"right") + if aiming: + input = 0 apply_force(input, delta) apply_friction(input) @@ -83,7 +94,7 @@ func _physics_process(delta: float) -> void: apply_gravity(delta) - animate() + animate(input) move() wall_slide_check() State.WALL_SLIDE: @@ -96,6 +107,10 @@ func _physics_process(delta: float) -> void: wall_slide_drop(delta) move() wall_detatch(wall_axis, delta) + check_throw() + hammer_highlight() + hammer_pickup() + hammer_move() ## Creates floor dust. func dust() -> void: @@ -122,11 +137,44 @@ func apply_friction(input: float) -> void: if input == 0 and not is_zero_approx(velocity.x) and is_on_floor(): velocity.x = lerpf(velocity.x, 0, frict) +func hammer_highlight() -> void: + if not current_hammer: + var hamms := pickup_area.get_overlapping_areas() + if hamms.is_empty(): + if last_highlit: + last_highlit.unhighlight() + last_highlit = null + elif not last_highlit in hamms: + if last_highlit: + last_highlit.unhighlight() + last_highlit = hamms[0] + hamms[0].highlight() + +func hammer_pickup() -> void: + if Input.is_action_just_pressed("pickup") and last_highlit and not current_hammer: + last_highlit.unhighlight() + current_hammer = last_highlit + Globals.levelmanager.current_level.remove_child(current_hammer) + current_hammer.position.y = -14 + add_child(current_hammer) + move_child(current_hammer, 0) + + +func hammer_move() -> void: + if current_hammer: + current_hammer.position.x = 6 * sprite.scale.x + current_hammer.rotation = 0.087 * sprite.scale.x + +func check_throw() -> void: + if current_hammer and Input.is_action_just_pressed("throw"): + aim_gizmo.enabled = true + aiming = true + aim_gizmo.show() + ## Plays animations for the move state. -func animate() -> void: - var facing: int = sign(get_local_mouse_position().x) - if facing != 0: - sprite.scale.x = facing +func animate(input: float) -> void: + if sign(input) != 0: + sprite.scale.x = sign(input) if not is_on_floor(): play(&"jump") @@ -201,7 +249,7 @@ func get_wall_axis() -> int: ## Checks if we should jump off the [param wall_axis]. func wall_slide_jump_check(wall_axis: int) -> void: - if Input.is_action_just_pressed("jump"): + if Input.is_action_just_pressed(&"jump"): velocity.x = wall_axis * top_speed velocity.y = -jump_force / 1.25 state = State.MOVE @@ -225,6 +273,8 @@ func wall_slide_drop(delta: float) -> void: ## Checks if we should detatch from the wall. func wall_detatch(wall_axis: int, delta: float) -> void: var detached := false + if aiming: return + if Input.is_action_just_pressed("right"): velocity.x = accel * delta detached = true @@ -240,6 +290,24 @@ func wall_detatch(wall_axis: int, delta: float) -> void: if wall_axis == 0 or is_on_floor(): state = State.MOVE - func hit(damage: int) -> void: health -= damage + +## Disable the aim gizmo. +func disable_aim_gizmo() -> void: + aiming = false + aim_gizmo.enabled = false + aim_gizmo.hide() + +## Throws the hammer. +func throw(rot: float) -> void: + rot + randf_range(-0.01, 0.01) + remove_child(current_hammer) + current_hammer.position.x = 0 # center + current_hammer.global_position = to_global(current_hammer.position) + Globals.levelmanager.current_level.add_child(current_hammer) + current_hammer.hit_player = false + current_hammer.hit_enemys = true + current_hammer.throw(Vector2.from_angle(rot)) + current_hammer = null + disable_aim_gizmo() diff --git a/player/player.tscn b/player/player.tscn index f534809..c44afe6 100644 --- a/player/player.tscn +++ b/player/player.tscn @@ -1,15 +1,16 @@ -[gd_scene load_steps=11 format=3 uid="uid://umj2kojm6mlo"] +[gd_scene load_steps=13 format=3 uid="uid://cl03k3yc8fxkt"] [ext_resource type="Script" path="res://player/player.gd" id="1_lnsyt"] [ext_resource type="Texture2D" uid="uid://b36hv0jwfmb1u" path="res://assets/player/animations.png" id="2_dgplu"] [ext_resource type="Shape2D" uid="uid://csesrw07xpp24" path="res://player/player_collision.tres" id="3_uoann"] [ext_resource type="PackedScene" uid="uid://bgt7m0j1ier74" path="res://colliders/hurtbox.tscn" id="4_yd6uo"] [ext_resource type="PackedScene" uid="uid://ug40hxlkequx" path="res://colliders/hitbox.tscn" id="5_wpn72"] +[ext_resource type="PackedScene" uid="uid://bdj2ppa25ad87" path="res://ui/components/aim/aim.tscn" id="6_ok4xh"] [sub_resource type="Animation" id="Animation_sbyxw"] resource_name = "idle" length = 1.2 -loop_mode = 2 +loop_mode = 1 tracks/0/type = "value" tracks/0/imported = false tracks/0/enabled = true @@ -99,6 +100,9 @@ _data = { "wall_slide": SubResource("Animation_ijk7a") } +[sub_resource type="CircleShape2D" id="CircleShape2D_vxcc3"] +radius = 17.0 + [node name="player" type="CharacterBody2D"] collision_layer = 2 floor_max_angle = 0.802851 @@ -141,5 +145,23 @@ collision_mask = 8 position = Vector2(0, -7) shape = ExtResource("3_uoann") +[node name="PickupArea" type="Area2D" parent="."] +visible = false +collision_layer = 0 +collision_mask = 64 +monitorable = false + +[node name="CollisionShape2D" type="CollisionShape2D" parent="PickupArea"] +position = Vector2(0, -6) +shape = SubResource("CircleShape2D_vxcc3") + +[node name="AimGizmo" parent="." instance=ExtResource("6_ok4xh")] +visible = false +position = Vector2(0, -8) +enabled = false + +[connection signal="cancel" from="AimGizmo" to="." method="disable_aim_gizmo"] +[connection signal="throw" from="AimGizmo" to="." method="throw"] + [editable path="Hurtbox"] [editable path="Hitbox"] diff --git a/project.godot b/project.godot index 4c793d6..a7024f7 100644 --- a/project.godot +++ b/project.godot @@ -9,6 +9,11 @@ config_version=5 _global_script_classes=[{ +"base": "Node", +"class": &"AimGizmo", +"language": &"GDScript", +"path": "res://ui/components/aim/aim.gd" +}, { "base": "Node2D", "class": &"BlockDoor", "language": &"GDScript", @@ -34,6 +39,11 @@ _global_script_classes=[{ "language": &"GDScript", "path": "res://hammers/hammer.gd" }, { +"base": "Area2D", +"class": &"Hitbox", +"language": &"GDScript", +"path": "res://colliders/hitbox.gd" +}, { "base": "CharacterBody2D", "class": &"Hittable", "language": &"GDScript", @@ -85,11 +95,13 @@ _global_script_classes=[{ "path": "res://autoloads/Utils.gd" }] _global_script_class_icons={ +"AimGizmo": "", "BlockDoor": "", "CaretOptionButton": "", "Door": "", "Enemy": "", "Hammer": "res://assets/hammers/hammer01.png", +"Hitbox": "", "Hittable": "", "Hurtbox": "", "Level": "res://levels/level_icon.svg", @@ -136,6 +148,20 @@ window/size/test_height=1280 [input] +ui_accept={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194309,"physical_keycode":0,"unicode":4194309,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194310,"physical_keycode":0,"unicode":4194310,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"unicode":32,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) +] +} +ui_cancel={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"unicode":4194305,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":1,"pressure":0.0,"pressed":false,"script":null) +] +} ui_focus_next={ "deadzone": 0.5, "events": [] @@ -148,33 +174,53 @@ left={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194319,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":-1.0,"script":null) ] } right={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194321,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":0,"axis_value":1.0,"script":null) ] } jump={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":32,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) +] +} +fall={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) ] } -dash={ +pickup={ "deadzone": 0.5, -"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194325,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":67,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null) ] } -shoot={ +up={ "deadzone": 0.5, -"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"pressed":false,"double_click":false,"script":null) +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194320,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":-1.0,"script":null) ] } down={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194322,"physical_keycode":0,"unicode":0,"echo":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":-1,"axis":1,"axis_value":1.0,"script":null) +] +} +throw={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":67,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null) ] } @@ -185,6 +231,8 @@ down={ 2d_physics/layer_3="player_hurt" 2d_physics/layer_4="enemy_hurt" 2d_physics/layer_5="enemy" +2d_physics/layer_6="hammer" +2d_physics/layer_7="hammer_inactive" [logging] diff --git a/ui/components/aim/aim.gd b/ui/components/aim/aim.gd new file mode 100644 index 0000000..41460a2 --- /dev/null +++ b/ui/components/aim/aim.gd @@ -0,0 +1,43 @@ +extends Node +class_name AimGizmo + +signal cancel() +signal throw(rot: float) + +var current_rotation: float + +# hold down this long to cancel +const cancel_time := 0.15 + +var cancel_left_time := cancel_time + +@export var arrow: Line2D +@export var enabled := true: + set(p_e): + enabled = p_e + set_process(enabled) + +func _ready() -> void: + enabled = enabled # trigger the setter + +func _process(delta: float) -> void: + var v := Vector2(Input.get_axis(&"left", &"right"), Input.get_axis(&"up", &"down")) + if Input.is_action_pressed("ui_cancel"): + cancel_left_time = cancel_time + cancel.emit() + return + if v.is_zero_approx(): + v.x = Globals.player.sprite.scale.x # default to current facing direction + elif v.y == Vector2.DOWN.y and Util.is_in_range(v.x, -0.1, 0.1) and Globals.player.is_on_floor(): + cancel_left_time -= delta + if cancel_left_time < 0: + cancel_left_time = cancel_time + cancel.emit() + return + else: + cancel_left_time = cancel_time + var angle := v.angle() + current_rotation = angle + arrow.rotation = angle + if Input.is_action_just_released(&"throw"): + throw.emit(angle) diff --git a/ui/components/aim/aim.tscn b/ui/components/aim/aim.tscn new file mode 100644 index 0000000..32a252d --- /dev/null +++ b/ui/components/aim/aim.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=3 format=3 uid="uid://bdj2ppa25ad87"] + +[ext_resource type="Script" path="res://ui/components/aim/aim.gd" id="1_raexs"] + +[sub_resource type="Curve" id="Curve_f8gls"] +max_value = 3.0 +_data = [Vector2(0.00636943, 0), 0.0, 0.0, 0, 0, Vector2(0.0350318, 3), 104.667, -2.75696, 1, 1, Vector2(1, 0.339623), -2.75696, 0.0, 1, 0] +point_count = 3 + +[node name="Aim" type="Node2D" node_paths=PackedStringArray("arrow")] +position = Vector2(26, 26) +script = ExtResource("1_raexs") +arrow = NodePath("Arrow") + +[node name="Arrow" type="Line2D" parent="."] +points = PackedVector2Array(0, 0, 20, 0) +width_curve = SubResource("Curve_f8gls") +end_cap_mode = 2 +round_precision = 12 +antialiased = true diff --git a/ui/hud/health_meter.gd b/ui/hud/health_meter.gd index 5905e66..d625559 100644 --- a/ui/hud/health_meter.gd +++ b/ui/hud/health_meter.gd @@ -1,11 +1,13 @@ extends Control @onready var full := $Full as TextureRect - +@onready var empty := $Empty as TextureRect func _ready(): Globals.player.hp_changed.connect(_hp_changed) - + var max_hp := Globals.player.max_health + full.size.x = max_hp * 5 + 1 + empty.size.x = max_hp * 5 + 1 func _hp_changed(hp: int): full.size.x = hp * 5 + 1 diff --git a/ui/hud/hud.tscn b/ui/hud/hud.tscn index 00eba1d..7cc3ba2 100644 --- a/ui/hud/hud.tscn +++ b/ui/hud/hud.tscn @@ -9,22 +9,29 @@ [node name="HealthMeter" type="Control" parent="."] layout_mode = 3 anchors_preset = 0 -offset_left = 11.0 -offset_top = 8.0 -offset_right = 27.0 -offset_bottom = 22.0 +offset_left = 5.0 +offset_top = 5.0 +offset_right = 56.0 +offset_bottom = 17.0 script = ExtResource("1_yn38u") +metadata/_edit_group_ = true [node name="Empty" type="TextureRect" parent="HealthMeter"] -layout_mode = 0 -offset_right = 16.0 -offset_bottom = 12.0 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("2_pqvic") stretch_mode = 1 [node name="Full" type="TextureRect" parent="HealthMeter"] -layout_mode = 0 -offset_right = 16.0 -offset_bottom = 12.0 +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 texture = ExtResource("1_8qpc0") stretch_mode = 1 diff --git a/ui/keybinds.tscn b/ui/keybinds.tscn index 75e1a54..a79b0de 100644 --- a/ui/keybinds.tscn +++ b/ui/keybinds.tscn @@ -50,7 +50,6 @@ script = ExtResource("1_f036x") focus = NodePath("Scroll/V/left") [node name="Panel" type="Panel" parent="."] -layout_mode = 2 offset_left = 10.0 offset_top = 10.0 offset_right = 310.0 @@ -59,7 +58,6 @@ mouse_filter = 2 theme_override_styles/panel = ExtResource("1_wrc13") [node name="Scroll" type="ScrollContainer" parent="."] -layout_mode = 2 offset_left = 10.0 offset_top = 10.0 offset_right = 310.0 @@ -73,11 +71,10 @@ vertical_scroll_mode = 3 [node name="V" type="VBoxContainer" parent="Scroll"] show_behind_parent = true -layout_mode = 2 offset_left = 15.0 offset_top = 15.0 offset_right = 285.0 -offset_bottom = 285.0 +offset_bottom = 419.0 grow_horizontal = 2 grow_vertical = 2 size_flags_horizontal = 3 @@ -87,20 +84,18 @@ font_size = 15 [node name="bbar" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true -layout_mode = 2 offset_right = 270.0 offset_bottom = 36.0 [node name="space3" type="Control" parent="Scroll/V/bbar"] custom_minimum_size = Vector2(20, 0) -layout_mode = 2 +layout_mode = 3 anchors_preset = 0 offset_right = 20.0 offset_bottom = 36.0 [node name="reset" type="Button" parent="Scroll/V/bbar"] show_behind_parent = true -layout_mode = 2 offset_left = 24.0 offset_right = 79.0 offset_bottom = 36.0 @@ -112,7 +107,7 @@ text = "reset" script = SubResource("GDScript_dodrb") [node name="space" type="Control" parent="Scroll/V/bbar"] -layout_mode = 2 +layout_mode = 3 anchors_preset = 0 offset_left = 83.0 offset_right = 190.0 @@ -120,13 +115,12 @@ offset_bottom = 36.0 size_flags_horizontal = 3 [node name="exit" parent="Scroll/V/bbar" instance=ExtResource("5_w2is5")] -layout_mode = 2 focus_neighbor_left = NodePath("../reset") focus_neighbor_right = NodePath("../reset") [node name="space2" type="Control" parent="Scroll/V/bbar"] custom_minimum_size = Vector2(40, 0) -layout_mode = 2 +layout_mode = 3 anchors_preset = 0 offset_left = 230.0 offset_right = 270.0 @@ -135,7 +129,6 @@ offset_bottom = 36.0 [node name="left" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true custom_minimum_size = Vector2(42, 42) -layout_mode = 2 offset_top = 40.0 offset_right = 270.0 offset_bottom = 82.0 @@ -143,11 +136,11 @@ script = ExtResource("6_s2rfm") prompt_text = "[push button]" _name = "left" action = "left" +icon_size = Vector2(35, 35) [node name="right" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true custom_minimum_size = Vector2(42, 42) -layout_mode = 2 offset_top = 86.0 offset_right = 270.0 offset_bottom = 128.0 @@ -155,42 +148,79 @@ script = ExtResource("6_s2rfm") prompt_text = "[push button]" _name = "right" action = "right" +icon_size = Vector2(35, 35) [node name="up" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true custom_minimum_size = Vector2(42, 42) -layout_mode = 2 offset_top = 132.0 offset_right = 270.0 offset_bottom = 174.0 script = ExtResource("6_s2rfm") prompt_text = "[push button]" -_name = "jump" -action = "jump" +_name = "up" +action = "up" +icon_size = Vector2(35, 35) [node name="down" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true custom_minimum_size = Vector2(42, 42) -layout_mode = 2 offset_top = 178.0 offset_right = 270.0 offset_bottom = 220.0 script = ExtResource("6_s2rfm") prompt_text = "[push button]" -_name = "fall" +_name = "down" action = "down" +icon_size = Vector2(35, 35) -[node name="shoot" type="HBoxContainer" parent="Scroll/V"] +[node name="jump" type="HBoxContainer" parent="Scroll/V"] show_behind_parent = true custom_minimum_size = Vector2(42, 42) -layout_mode = 2 offset_top = 224.0 offset_right = 270.0 offset_bottom = 266.0 script = ExtResource("6_s2rfm") prompt_text = "[push button]" -_name = "shoot" -action = "shoot" +_name = "jump" +action = "jump" +icon_size = Vector2(35, 35) + +[node name="fall" type="HBoxContainer" parent="Scroll/V"] +show_behind_parent = true +custom_minimum_size = Vector2(42, 42) +offset_top = 270.0 +offset_right = 270.0 +offset_bottom = 312.0 +script = ExtResource("6_s2rfm") +prompt_text = "[push button]" +_name = "fall" +action = "fall" +icon_size = Vector2(35, 35) + +[node name="throw" type="HBoxContainer" parent="Scroll/V"] +show_behind_parent = true +custom_minimum_size = Vector2(42, 42) +offset_top = 316.0 +offset_right = 270.0 +offset_bottom = 358.0 +script = ExtResource("6_s2rfm") +prompt_text = "[push button]" +_name = "throw" +action = "throw" +icon_size = Vector2(35, 35) + +[node name="pickup" type="HBoxContainer" parent="Scroll/V"] +show_behind_parent = true +custom_minimum_size = Vector2(42, 42) +offset_top = 362.0 +offset_right = 270.0 +offset_bottom = 404.0 +script = ExtResource("6_s2rfm") +prompt_text = "[push button]" +_name = "grab" +action = "pickup" +icon_size = Vector2(35, 35) [connection signal="pressed" from="Scroll/V/bbar/reset" to="Scroll/V" method="_on_reset_pressed"] [connection signal="pressed" from="Scroll/V/bbar/exit" to="." method="exit"] diff --git a/ui/popup.gd b/ui/popup.gd index 4fc583f..5620f27 100644 --- a/ui/popup.gd +++ b/ui/popup.gd @@ -14,8 +14,8 @@ func open() -> void: else: focus.grab_focus() -func _unhandled_key_input(event: InputEvent) -> void: - if visible and event is InputEventKey and event.keycode == KEY_ESCAPE: +func _unhandled_input(event: InputEvent) -> void: + if visible and event.is_action("ui_cancel"): accept_event() exit() |