diff options
Diffstat (limited to 'Scenes')
-rw-r--r-- | Scenes/Components/MapArea.gd | 6 | ||||
-rw-r--r-- | Scenes/Components/TileMap.tscn | 9 | ||||
-rw-r--r-- | Scenes/Entities/Bombs/Bomb.gd | 4 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Balloon.tscn | 2 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Components/Movement.gd | 82 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Projectile.gd | 28 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Projectile.tscn | 44 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Snake.gd | 144 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Snake.tscn | 404 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Statue.gd | 27 | ||||
-rw-r--r-- | Scenes/Entities/Enemies/Statue.tscn | 30 | ||||
-rw-r--r-- | Scenes/Entities/Objects/BaseDoor.gd | 21 | ||||
-rw-r--r-- | Scenes/Entities/Objects/BaseDoor.tscn | 20 | ||||
-rw-r--r-- | Scenes/Entities/Objects/Wood.tscn | 1 | ||||
-rw-r--r-- | Scenes/Entities/Player.gd | 2 | ||||
-rw-r--r-- | Scenes/Maps/Base01.gd | 57 | ||||
-rw-r--r-- | Scenes/Maps/Base01.tscn | 111 | ||||
-rw-r--r-- | Scenes/Maps/World3.tscn | 10 | ||||
-rw-r--r-- | Scenes/Start.gd | 2 | ||||
-rw-r--r-- | Scenes/Utilities.gd | 14 |
20 files changed, 979 insertions, 39 deletions
diff --git a/Scenes/Components/MapArea.gd b/Scenes/Components/MapArea.gd index 31e567a..080a3f7 100644 --- a/Scenes/Components/MapArea.gd +++ b/Scenes/Components/MapArea.gd @@ -1,6 +1,8 @@ extends Area2D +signal transitioned_to + @export var can_plant_bomb: bool = true @@ -80,13 +82,15 @@ func _on_player_entered(player: Player): position_tween = get_tree().create_tween() position_tween.tween_property( - player, "global_position", player.global_position + player.DIRECTION * 16, 1.25 + player, "global_position", player.global_position + player.DIRECTION * (16 + 8), 1.25 ) position_tween.tween_callback(func(): exited_area.get_node("TileMap").visible = false sprite_tween.kill() sprite.play("idle_" + sprite_direction) exited_area.set_collision_mask_value(Utilities.Collision.Layer.PLAYER, true) + + transitioned_to.emit() ) Global.last_area = self diff --git a/Scenes/Components/TileMap.tscn b/Scenes/Components/TileMap.tscn index 469c501..2c2cd07 100644 --- a/Scenes/Components/TileMap.tscn +++ b/Scenes/Components/TileMap.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=34 format=3 uid="uid://d0t04jox4oxsv"] +[gd_scene load_steps=36 format=3 uid="uid://d0t04jox4oxsv"] [ext_resource type="Texture2D" uid="uid://5dk0c1kpvdgs" path="res://Assets/bomb_party_v4.png" id="1_aov43"] [ext_resource type="PackedScene" uid="uid://bugyo0c505kdw" path="res://Scenes/Entities/Objects/Box.tscn" id="1_fy8qx"] @@ -9,8 +9,10 @@ [ext_resource type="Texture2D" uid="uid://dnsxr8sq7ap0j" path="res://Assets/Stages/core_buildings.png" id="4_gspqb"] [ext_resource type="PackedScene" uid="uid://cv64e7fpdi2a2" path="res://Scenes/Components/Teleport.tscn" id="4_kheyh"] [ext_resource type="Texture2D" uid="uid://cctukh2hhfgty" path="res://Assets/Stages/core_outdoor_nature.png" id="5_8fova"] +[ext_resource type="PackedScene" uid="uid://bpg6ye1abah3g" path="res://Scenes/Entities/Enemies/Snake.tscn" id="5_8wsnm"] [ext_resource type="PackedScene" uid="uid://ccolri3egf8rk" path="res://Scenes/Entities/Enemies/Balloon.tscn" id="5_cpm0i"] [ext_resource type="Texture2D" uid="uid://b6ce2eihxulqb" path="res://Assets/Stages/core_set pieces.png" id="6_gvcvm"] +[ext_resource type="PackedScene" uid="uid://c2l6n3sjgpy5" path="res://Scenes/Entities/Enemies/Statue.tscn" id="6_id2ef"] [ext_resource type="PackedScene" uid="uid://d3evry1ketf0s" path="res://Scenes/Entities/Enemies/Slime.tscn" id="6_qh3x8"] [ext_resource type="PackedScene" uid="uid://bjgcrqdntj5hl" path="res://Scenes/Entities/Enemies/Tree.tscn" id="7_1lwuk"] [ext_resource type="PackedScene" uid="uid://12suyw87jcsi" path="res://Scenes/Entities/Objects/Grass.tscn" id="8_7pjkp"] @@ -5671,6 +5673,8 @@ scenes/7/scene = ExtResource("9_iejml") scenes/8/scene = ExtResource("10_6syxy") scenes/9/scene = ExtResource("12_tsgx0") scenes/10/scene = ExtResource("4_5twow") +scenes/11/scene = ExtResource("5_8wsnm") +scenes/12/scene = ExtResource("6_id2ef") [sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_6k602"] texture = ExtResource("4_gspqb") @@ -12896,6 +12900,7 @@ texture = ExtResource("5_8fova") 13:0/0/physics_layer_1/linear_velocity = Vector2(0, 0) 13:0/0/physics_layer_1/angular_velocity = 0.0 14:0/0 = 0 +14:0/0/y_sort_origin = -5 14:0/0/physics_layer_0/linear_velocity = Vector2(0, 0) 14:0/0/physics_layer_0/angular_velocity = 0.0 14:0/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -5.25, 8, -5.125, 8, -8, -8, -8) @@ -13222,6 +13227,7 @@ texture = ExtResource("5_8fova") 13:1/0/physics_layer_1/linear_velocity = Vector2(0, 0) 13:1/0/physics_layer_1/angular_velocity = 0.0 14:1/0 = 0 +14:1/0/y_sort_origin = -8 14:1/0/physics_layer_0/linear_velocity = Vector2(0, 0) 14:1/0/physics_layer_0/angular_velocity = 0.0 14:1/0/physics_layer_1/linear_velocity = Vector2(0, 0) @@ -13840,6 +13846,7 @@ texture = ExtResource("5_8fova") 13:3/0/physics_layer_1/linear_velocity = Vector2(0, 0) 13:3/0/physics_layer_1/angular_velocity = 0.0 14:3/0 = 0 +14:3/0/y_sort_origin = -8 14:3/0/physics_layer_0/linear_velocity = Vector2(0, 0) 14:3/0/physics_layer_0/angular_velocity = 0.0 14:3/0/physics_layer_1/linear_velocity = Vector2(0, 0) diff --git a/Scenes/Entities/Bombs/Bomb.gd b/Scenes/Entities/Bombs/Bomb.gd index 97fbf4f..7a1a9eb 100644 --- a/Scenes/Entities/Bombs/Bomb.gd +++ b/Scenes/Entities/Bombs/Bomb.gd @@ -123,6 +123,10 @@ func get_power(): return self.power +func stop(): + $Timer.stop() + + func spawn_explosion(spawn_position: Vector2): var explosion = ExplosionScene.instantiate() explosion.position = spawn_position diff --git a/Scenes/Entities/Enemies/Balloon.tscn b/Scenes/Entities/Enemies/Balloon.tscn index 9e1a6bc..c1b0701 100644 --- a/Scenes/Entities/Enemies/Balloon.tscn +++ b/Scenes/Entities/Enemies/Balloon.tscn @@ -144,7 +144,7 @@ shape = SubResource("CapsuleShape2D_abul4") [node name="Movement" parent="." instance=ExtResource("15_fwetl")] entityPath = NodePath("..") spritePath = NodePath("../AnimatedSprite2D") -SPEED = 10 +SPEED = 10.0 timer_time = 10.0 [node name="Collision" parent="." instance=ExtResource("16_yau34")] diff --git a/Scenes/Entities/Enemies/Components/Movement.gd b/Scenes/Entities/Enemies/Components/Movement.gd index 5470a7d..3174508 100644 --- a/Scenes/Entities/Enemies/Components/Movement.gd +++ b/Scenes/Entities/Enemies/Components/Movement.gd @@ -10,13 +10,21 @@ signal direction_changed @export_node_path("AnimatedSprite2D") var spritePath: NodePath @onready var sprite: AnimatedSprite2D = get_node(spritePath) -@export var SPEED: int +@export var SPEED: float const DIRECTIONS = [Vector2.UP, Vector2.RIGHT, Vector2.DOWN, Vector2.LEFT] var CURRENT_DIRECTION = Vector2.UP var LAST_DIRECTION = Vector2.UP var was_colliding = false +var animations: Dictionary = { + "default": "default", + "up": "up", + "down": "down", + "left": "left", + "right": "right", +} + @export var timer_time: float = 3.0 @onready var MovementTimer: Timer = Timer.new() @@ -33,28 +41,33 @@ func _ready(): func physics_process(delta): if CURRENT_DIRECTION == Vector2.UP: - entity.velocity.y -= SPEED - if sprite.sprite_frames.has_animation("up"): - sprite.play("up") + entity.velocity.y -= SPEED/2 + if sprite.sprite_frames.has_animation(animations["up"]): + sprite.play(animations["up"]) elif CURRENT_DIRECTION == Vector2.DOWN: - entity.velocity.y += SPEED - if sprite.sprite_frames.has_animation("down"): - sprite.play("down") + entity.velocity.y += SPEED/2 + if sprite.sprite_frames.has_animation(animations["down"]): + sprite.play(animations["down"]) elif CURRENT_DIRECTION == Vector2.LEFT: - entity.velocity.x -= SPEED - if sprite.sprite_frames.has_animation("left"): - sprite.play("left") + entity.velocity.x -= SPEED/2 + if sprite.sprite_frames.has_animation(animations["left"]): + sprite.play(animations["left"]) elif CURRENT_DIRECTION == Vector2.RIGHT: - entity.velocity.x += SPEED - if sprite.sprite_frames.has_animation("right"): - sprite.play("right") + entity.velocity.x += SPEED/2 + if sprite.sprite_frames.has_animation(animations["right"]): + sprite.play(animations["right"]) - if sprite.sprite_frames.has_animation("default"): - sprite.play("default") + if sprite.sprite_frames.has_animation(animations["default"]): + sprite.play(animations["default"]) var collision = entity.move_and_collide(entity.velocity * delta) entity.velocity = entity.velocity.lerp(Vector2(0, 0), 1) # speed too low => no collision + # todo movement along grid (maybe move position to current tile center) + var target_grid_position = Utilities.from_grid_to_position(Utilities.get_level_position(entity) + CURRENT_DIRECTION) + entity.position = entity.position.move_toward(target_grid_position, delta*SPEED/2) + # todo or set velocity to tiles per SPEED per second somehow, instead of Timer + if collision: was_colliding = true if MovementTimer.time_left > 0: @@ -65,11 +78,23 @@ func physics_process(delta): return collision +func set_animations(new_animations: Dictionary): + animations.merge(new_animations, true) + + func _on_movement_timer_timeout(): var randomize_direction = false - if follows and randi_range(0, 100) <= follow_chance: + if false and follows and randi_range(0, 100) <= follow_chance: var player_direction = entity.position.direction_to(Global.player.position) + var query = PhysicsRayQueryParameters2D.new() + query.set_from(entity.position) + query.set_to(Global.player.position) + query.set_collision_mask(entity.collision_mask) + var intersection = entity.get_world_2d().direct_space_state.intersect_ray(query) + if intersection: + randomize_direction = true + if abs(player_direction.x) >= abs(player_direction.y): if player_direction.x >= 0: CURRENT_DIRECTION = Vector2.RIGHT @@ -89,25 +114,26 @@ func _on_movement_timer_timeout(): if randomize_direction: var directions = DIRECTIONS.duplicate() - directions.remove_at(directions.find(CURRENT_DIRECTION)) + directions.erase(CURRENT_DIRECTION) directions.shuffle() - - CURRENT_DIRECTION = directions[0] + + if not directions.is_empty(): + CURRENT_DIRECTION = directions[0] emit_signal("direction_changed", CURRENT_DIRECTION) LAST_DIRECTION = CURRENT_DIRECTION - if not sprite.sprite_frames.has_animation("default"): + if not sprite.sprite_frames.has_animation(animations["default"]): var frame = sprite.frame var progress = sprite.frame_progress - if CURRENT_DIRECTION == Vector2.UP and sprite.sprite_frames.has_animation("up"): - sprite.play("up") - elif CURRENT_DIRECTION == Vector2.DOWN and sprite.sprite_frames.has_animation("down"): - sprite.play("down") - elif CURRENT_DIRECTION == Vector2.LEFT and sprite.sprite_frames.has_animation("left"): - sprite.play("left") - elif CURRENT_DIRECTION == Vector2.RIGHT and sprite.sprite_frames.has_animation("right"): - sprite.play("right") + if CURRENT_DIRECTION == Vector2.UP and sprite.sprite_frames.has_animation(animations["up"]): + sprite.play(animations["up"]) + elif CURRENT_DIRECTION == Vector2.DOWN and sprite.sprite_frames.has_animation(animations["down"]): + sprite.play(animations["down"]) + elif CURRENT_DIRECTION == Vector2.LEFT and sprite.sprite_frames.has_animation(animations["left"]): + sprite.play(animations["left"]) + elif CURRENT_DIRECTION == Vector2.RIGHT and sprite.sprite_frames.has_animation(animations["right"]): + sprite.play(animations["right"]) sprite.set_frame_and_progress(frame, progress) MovementTimer.start() diff --git a/Scenes/Entities/Enemies/Projectile.gd b/Scenes/Entities/Enemies/Projectile.gd new file mode 100644 index 0000000..af283b4 --- /dev/null +++ b/Scenes/Entities/Enemies/Projectile.gd @@ -0,0 +1,28 @@ +extends CharacterBody2D + + +signal hit + +@export var target: Vector2 +var direction: Vector2 + +@export var speed: int = 50 + + +func _ready(): + velocity = position.direction_to(target) * speed + + +func _physics_process(delta): + $AnimatedSprite2D.play("default") + move_and_slide() + + +func _on_area_2d_body_entered(body): + if body is Player: + hit.emit() + queue_free() + + +func _on_visible_on_screen_notifier_2d_screen_exited(): + queue_free() diff --git a/Scenes/Entities/Enemies/Projectile.tscn b/Scenes/Entities/Enemies/Projectile.tscn new file mode 100644 index 0000000..e417172 --- /dev/null +++ b/Scenes/Entities/Enemies/Projectile.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=6 format=3 uid="uid://b3tyux5hmqjdv"] + +[ext_resource type="Texture2D" uid="uid://1j0mcugpmtip" path="res://Assets/Enemies/Projectile_01.png" id="1_1awp7"] +[ext_resource type="Script" path="res://Scenes/Entities/Enemies/Projectile.gd" id="1_e3x2k"] +[ext_resource type="Texture2D" uid="uid://dlopu0vp85dv0" path="res://Assets/Enemies/Projectile_02.png" id="2_qk14s"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_xmf75"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("1_1awp7") +}, { +"duration": 1.0, +"texture": ExtResource("2_qk14s") +}], +"loop": false, +"name": &"default", +"speed": 8.0 +}] + +[sub_resource type="CircleShape2D" id="CircleShape2D_gcjn2"] +radius = 3.0 + +[node name="Projectile" type="CharacterBody2D"] +collision_layer = 0 +collision_mask = 0 +script = ExtResource("1_e3x2k") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +texture_filter = 1 +sprite_frames = SubResource("SpriteFrames_xmf75") + +[node name="Area2D" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 2 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource("CircleShape2D_gcjn2") + +[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."] +scale = Vector2(0.8, 0.8) + +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] +[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"] diff --git a/Scenes/Entities/Enemies/Snake.gd b/Scenes/Entities/Enemies/Snake.gd new file mode 100644 index 0000000..a87ecf0 --- /dev/null +++ b/Scenes/Entities/Enemies/Snake.gd @@ -0,0 +1,144 @@ +extends CharacterBody2D + + +@export var speed: float = 10 + +static var detected_bombs = [] +var did_detect_bomb = false +var detected_bomb: Bomb +var detected_bomb_direction = Vector2.UP +var is_full = false + +var is_animating_state = false +var animations_default = { + "up": "up", + "down": "down", + "left": "left", + "right": "right", +} +var animations_full = { + "up": "up_full", + "down": "down_full", + "left": "left_full", + "right": "right_full", +} +var current_delta + +@onready var component_collision: ComponentCollision = $Collision +@onready var component_movement: ComponentMovement = $Movement + + +func _ready(): + add_to_group("enemies") + + component_collision.init() + component_movement.SPEED = speed + + +func _physics_process(delta): + current_delta = delta + + if not did_detect_bomb and not is_full: + component_movement.SPEED = speed + + for ray: RayCast2D in $Rays.get_children(): + if ( + ray.is_colliding() and + ray.get_collider() and + ray.get_collider().is_in_group("bombs") and + not detected_bombs.has(ray.get_collider()) + ): + did_detect_bomb = true + detected_bomb = ray.get_collider() + detected_bombs.push_front(detected_bomb) + detected_bomb.tree_exited.connect(func(): + did_detect_bomb = false + detected_bombs.erase(detected_bomb) + detected_bomb = null + ) + + if ray.name == "Down": + detected_bomb_direction = Vector2.DOWN + elif ray.name == "Up": + detected_bomb_direction = Vector2.UP + elif ray.name == "Left": + detected_bomb_direction = Vector2.LEFT + elif ray.name == "Right": + detected_bomb_direction = Vector2.RIGHT + + component_movement.SPEED = speed*4 + + if $DetectionArea.get_overlapping_bodies().has(detected_bomb): + _on_detection_area_body_entered(detected_bomb) + elif did_detect_bomb: + component_movement.CURRENT_DIRECTION = detected_bomb_direction + + if not is_animating_state: + component_movement.physics_process(delta) + + +func set_animating_state(state: bool): + is_animating_state = state + if is_animating_state: + component_movement.MovementTimer.stop() + else: + component_movement.MovementTimer.start() + + +func _on_detection_area_body_entered(_body): + if did_detect_bomb and detected_bomb: + set_animating_state(true) + + add_collision_exception_with(detected_bomb) + detected_bomb.stop() + self.z_index = detected_bomb.z_index + 1 + + if detected_bomb_direction == Vector2.UP: + $AnimatedSprite2D.play("up_bite") + smooth_over("up_bite") + elif detected_bomb_direction == Vector2.DOWN: + $AnimatedSprite2D.play("down_bite") + smooth_over("down_bite") + elif detected_bomb_direction == Vector2.LEFT: + $AnimatedSprite2D.play("left_bite") + smooth_over("left_bite") + elif detected_bomb_direction == Vector2.RIGHT: + $AnimatedSprite2D.play("right_bite") + smooth_over("right_bite") + await $AnimatedSprite2D.animation_finished + + if detected_bomb: + detected_bomb.queue_free() + component_movement.set_animations(animations_full) + is_full = true + component_movement.SPEED = speed/2 + + $Timer.start() + set_animating_state(false) + +func smooth_over (animation): + create_tween().tween_property( + self, + "position", + detected_bomb.position, + $AnimatedSprite2D.sprite_frames.get_animation_speed(animation) / $AnimatedSprite2D.sprite_frames.get_frame_count(animation) + ) + + +func _on_timer_timeout(): + set_animating_state(true) + + if component_movement.CURRENT_DIRECTION == Vector2.UP: + $AnimatedSprite2D.play("up_shrink") + elif component_movement.CURRENT_DIRECTION == Vector2.DOWN: + $AnimatedSprite2D.play("down_shrink") + elif component_movement.CURRENT_DIRECTION == Vector2.LEFT: + $AnimatedSprite2D.play("left_shrink") + elif component_movement.CURRENT_DIRECTION == Vector2.RIGHT: + $AnimatedSprite2D.play("right_shrink") + await $AnimatedSprite2D.animation_finished + + component_movement.set_animations(animations_default) + is_full = false + component_movement.SPEED = speed + set_animating_state(false) diff --git a/Scenes/Entities/Enemies/Snake.tscn b/Scenes/Entities/Enemies/Snake.tscn new file mode 100644 index 0000000..660b3d7 --- /dev/null +++ b/Scenes/Entities/Enemies/Snake.tscn @@ -0,0 +1,404 @@ +[gd_scene load_steps=55 format=3 uid="uid://bpg6ye1abah3g"] + +[ext_resource type="Script" path="res://Scenes/Entities/Enemies/Snake.gd" id="1_h5f33"] +[ext_resource type="Texture2D" uid="uid://cypaci6jxhxsj" path="res://Assets/Enemies/Snake_down_01.png" id="2_en6kb"] +[ext_resource type="Texture2D" uid="uid://bn5ueyfn3asnc" path="res://Assets/Enemies/Snake_death.png" id="2_hsp6b"] +[ext_resource type="Texture2D" uid="uid://b5rvgttltyven" path="res://Assets/Enemies/Snake_down_02.png" id="3_gjbw3"] +[ext_resource type="Texture2D" uid="uid://cpl4n4jmgiwrv" path="res://Assets/Enemies/Enemy_death_01_01.png" id="3_wuqrr"] +[ext_resource type="Texture2D" uid="uid://cive10sqmjo2m" path="res://Assets/Enemies/Snake_down_03.png" id="4_c5itv"] +[ext_resource type="Texture2D" uid="uid://d2gk5amafhctu" path="res://Assets/Enemies/Enemy_death_01_02.png" id="4_eidva"] +[ext_resource type="Texture2D" uid="uid://dqwxq3g3aph4i" path="res://Assets/Enemies/Enemy_death_01_03.png" id="5_sfv8a"] +[ext_resource type="Texture2D" uid="uid://csuf0rfj4hk3j" path="res://Assets/Enemies/Snake_left_01.png" id="5_sg6fb"] +[ext_resource type="Texture2D" uid="uid://uoj5222vlq8q" path="res://Assets/Enemies/Enemy_death_01_04.png" id="6_jbbsf"] +[ext_resource type="Texture2D" uid="uid://dqfoqshawtnwm" path="res://Assets/Enemies/Snake_left_02.png" id="6_sc476"] +[ext_resource type="Texture2D" uid="uid://cwyhl4ykqy0n7" path="res://Assets/Enemies/Snake_left_03.png" id="7_40rym"] +[ext_resource type="Texture2D" uid="uid://cxx2vv1ohiw07" path="res://Assets/Enemies/Enemy_death_01_05.png" id="7_guf5s"] +[ext_resource type="Texture2D" uid="uid://cswrpv58ren4f" path="res://Assets/Enemies/Snake_right_01.png" id="8_7lycw"] +[ext_resource type="Texture2D" uid="uid://b2rl0d5ivdvn4" path="res://Assets/Enemies/Snake_right_02.png" id="9_jalnm"] +[ext_resource type="Texture2D" uid="uid://n8uednsjk6b1" path="res://Assets/Enemies/Snake_right_03.png" id="10_ecduy"] +[ext_resource type="Texture2D" uid="uid://bi2u8uf22x66v" path="res://Assets/Enemies/Snake_up_01.png" id="11_rtkup"] +[ext_resource type="Texture2D" uid="uid://33h3hla14uqm" path="res://Assets/Enemies/Snake_bite_down_01.png" id="11_y0yuq"] +[ext_resource type="Texture2D" uid="uid://xxi1cq4pvdl" path="res://Assets/Enemies/Snake_bite_down_02.png" id="12_4h16w"] +[ext_resource type="Texture2D" uid="uid://b8ld0ln4iquhc" path="res://Assets/Enemies/Snake_up_02.png" id="12_eyhtl"] +[ext_resource type="Texture2D" uid="uid://dpc8aoe5as3vb" path="res://Assets/Enemies/Snake_bite_down_03.png" id="13_pfxrj"] +[ext_resource type="Texture2D" uid="uid://osy613yub321" path="res://Assets/Enemies/Snake_up_03.png" id="13_y6ve5"] +[ext_resource type="Texture2D" uid="uid://dssta2jqwe8o" path="res://Assets/Enemies/Snake_bite_down_04.png" id="14_5apeq"] +[ext_resource type="PackedScene" uid="uid://cq7yj2av01tqd" path="res://Scenes/Entities/Enemies/Components/Movement.tscn" id="14_ab70e"] +[ext_resource type="PackedScene" uid="uid://ce3vv2pod6auc" path="res://Scenes/Entities/Enemies/Components/Collision.tscn" id="15_mm88w"] +[ext_resource type="Texture2D" uid="uid://ljutjpsw6jv7" path="res://Assets/Enemies/Snake_full_down_01.png" id="15_x3mge"] +[ext_resource type="PackedScene" uid="uid://b3i372vgdbxk" path="res://Scenes/Entities/Enemies/Components/Health.tscn" id="16_0dow6"] +[ext_resource type="Texture2D" uid="uid://l5du3vt4nusk" path="res://Assets/Enemies/Snake_full_down_02.png" id="16_vjet0"] +[ext_resource type="Texture2D" uid="uid://ogb404prqs4w" path="res://Assets/Enemies/Snake_full_down_03.png" id="17_1qbr6"] +[ext_resource type="Texture2D" uid="uid://ds34ow5ju743x" path="res://Assets/Enemies/Snake_shrink_down.png" id="18_ybkp8"] +[ext_resource type="Texture2D" uid="uid://byrg1wwnx2j76" path="res://Assets/Enemies/Snake_bite_left_01.png" id="22_mtrrd"] +[ext_resource type="Texture2D" uid="uid://dpp2ug4a647uj" path="res://Assets/Enemies/Snake_bite_left_02.png" id="23_1576u"] +[ext_resource type="Texture2D" uid="uid://dem758o6o7wkc" path="res://Assets/Enemies/Snake_bite_left_03.png" id="24_stadt"] +[ext_resource type="Texture2D" uid="uid://oxilj52s31pr" path="res://Assets/Enemies/Snake_full_left_01.png" id="25_2ntrh"] +[ext_resource type="Texture2D" uid="uid://c6htr1keocnh8" path="res://Assets/Enemies/Snake_full_left_02.png" id="26_vp11f"] +[ext_resource type="Texture2D" uid="uid://b8xoqf1mn0msw" path="res://Assets/Enemies/Snake_full_left_03.png" id="27_6np6x"] +[ext_resource type="Texture2D" uid="uid://dign0a7vhai7v" path="res://Assets/Enemies/Snake_shrink_left.png" id="28_7fu21"] +[ext_resource type="Texture2D" uid="uid://v74mnwccruy5" path="res://Assets/Enemies/Snake_bite_right_01.png" id="32_gsu2j"] +[ext_resource type="Texture2D" uid="uid://bgpygm3dhfnke" path="res://Assets/Enemies/Snake_bite_right_02.png" id="33_2qv3t"] +[ext_resource type="Texture2D" uid="uid://brj0tvwn6yqpn" path="res://Assets/Enemies/Snake_bite_right_03.png" id="34_gf2fa"] +[ext_resource type="Texture2D" uid="uid://dwp484rrsq6rd" path="res://Assets/Enemies/Snake_full_right_01.png" id="35_6rebf"] +[ext_resource type="Texture2D" uid="uid://cep7jpug03ju7" path="res://Assets/Enemies/Snake_full_right_02.png" id="36_f8mis"] +[ext_resource type="Texture2D" uid="uid://dv0rhkw7012nf" path="res://Assets/Enemies/Snake_full_right_03.png" id="37_rsbv2"] +[ext_resource type="Texture2D" uid="uid://bta6ffkouymtr" path="res://Assets/Enemies/Snake_shrink_right.png" id="38_mxcmv"] +[ext_resource type="Texture2D" uid="uid://p1wwaipiidpk" path="res://Assets/Enemies/Snake_bite_up_01.png" id="42_gg2ke"] +[ext_resource type="Texture2D" uid="uid://lyocxvmujulv" path="res://Assets/Enemies/Snake_bite_up_02.png" id="43_x72jq"] +[ext_resource type="Texture2D" uid="uid://dlu76im4x6ih5" path="res://Assets/Enemies/Snake_bite_up_03.png" id="44_xrna7"] +[ext_resource type="Texture2D" uid="uid://bvd14glih8rp7" path="res://Assets/Enemies/Snake_full_up_01.png" id="45_f3csq"] +[ext_resource type="Texture2D" uid="uid://2hf7tus6n73i" path="res://Assets/Enemies/Snake_full_up_02.png" id="46_n7us6"] +[ext_resource type="Texture2D" uid="uid://05siba3xdcnn" path="res://Assets/Enemies/Snake_full_up_03.png" id="47_kwyk6"] +[ext_resource type="Texture2D" uid="uid://co4dwdeo3su3g" path="res://Assets/Enemies/Snake_shrink_up.png" id="48_w8b5g"] + +[sub_resource type="SpriteFrames" id="SpriteFrames_jpiqi"] +animations = [{ +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_hsp6b") +}], +"loop": false, +"name": &"death", +"speed": 1.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("3_wuqrr") +}, { +"duration": 1.0, +"texture": ExtResource("4_eidva") +}, { +"duration": 1.0, +"texture": ExtResource("5_sfv8a") +}, { +"duration": 1.0, +"texture": ExtResource("6_jbbsf") +}, { +"duration": 1.0, +"texture": ExtResource("7_guf5s") +}], +"loop": false, +"name": &"death_post", +"speed": 5.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("2_en6kb") +}, { +"duration": 1.0, +"texture": ExtResource("3_gjbw3") +}, { +"duration": 1.0, +"texture": ExtResource("4_c5itv") +}, { +"duration": 1.0, +"texture": ExtResource("3_gjbw3") +}], +"loop": true, +"name": &"down", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("11_y0yuq") +}, { +"duration": 1.0, +"texture": ExtResource("12_4h16w") +}, { +"duration": 1.0, +"texture": ExtResource("13_pfxrj") +}, { +"duration": 1.0, +"texture": ExtResource("14_5apeq") +}], +"loop": false, +"name": &"down_bite", +"speed": 3.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("15_x3mge") +}, { +"duration": 1.0, +"texture": ExtResource("16_vjet0") +}, { +"duration": 1.0, +"texture": ExtResource("17_1qbr6") +}, { +"duration": 1.0, +"texture": ExtResource("16_vjet0") +}], +"loop": true, +"name": &"down_full", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("17_1qbr6") +}, { +"duration": 1.0, +"texture": ExtResource("18_ybkp8") +}, { +"duration": 1.0, +"texture": ExtResource("4_c5itv") +}], +"loop": false, +"name": &"down_shrink", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("5_sg6fb") +}, { +"duration": 1.0, +"texture": ExtResource("6_sc476") +}, { +"duration": 1.0, +"texture": ExtResource("7_40rym") +}, { +"duration": 1.0, +"texture": ExtResource("6_sc476") +}], +"loop": true, +"name": &"left", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("22_mtrrd") +}, { +"duration": 1.0, +"texture": ExtResource("23_1576u") +}, { +"duration": 1.0, +"texture": ExtResource("24_stadt") +}], +"loop": false, +"name": &"left_bite", +"speed": 3.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("25_2ntrh") +}, { +"duration": 1.0, +"texture": ExtResource("26_vp11f") +}, { +"duration": 1.0, +"texture": ExtResource("27_6np6x") +}, { +"duration": 1.0, +"texture": ExtResource("26_vp11f") +}], +"loop": true, +"name": &"left_full", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("26_vp11f") +}, { +"duration": 1.0, +"texture": ExtResource("28_7fu21") +}, { +"duration": 1.0, +"texture": ExtResource("6_sc476") +}], +"loop": false, +"name": &"left_shrink", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("8_7lycw") +}, { +"duration": 1.0, +"texture": ExtResource("9_jalnm") +}, { +"duration": 1.0, +"texture": ExtResource("10_ecduy") +}, { +"duration": 1.0, +"texture": ExtResource("9_jalnm") +}], +"loop": true, +"name": &"right", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("32_gsu2j") +}, { +"duration": 1.0, +"texture": ExtResource("33_2qv3t") +}, { +"duration": 1.0, +"texture": ExtResource("34_gf2fa") +}], +"loop": false, +"name": &"right_bite", +"speed": 3.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("35_6rebf") +}, { +"duration": 1.0, +"texture": ExtResource("36_f8mis") +}, { +"duration": 1.0, +"texture": ExtResource("37_rsbv2") +}, { +"duration": 1.0, +"texture": ExtResource("36_f8mis") +}], +"loop": true, +"name": &"right_full", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("36_f8mis") +}, { +"duration": 1.0, +"texture": ExtResource("38_mxcmv") +}, { +"duration": 1.0, +"texture": ExtResource("9_jalnm") +}], +"loop": false, +"name": &"right_shrink", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("11_rtkup") +}, { +"duration": 1.0, +"texture": ExtResource("12_eyhtl") +}, { +"duration": 1.0, +"texture": ExtResource("13_y6ve5") +}, { +"duration": 1.0, +"texture": ExtResource("12_eyhtl") +}], +"loop": true, +"name": &"up", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("42_gg2ke") +}, { +"duration": 1.0, +"texture": ExtResource("43_x72jq") +}, { +"duration": 1.0, +"texture": ExtResource("44_xrna7") +}], +"loop": false, +"name": &"up_bite", +"speed": 3.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("45_f3csq") +}, { +"duration": 1.0, +"texture": ExtResource("46_n7us6") +}, { +"duration": 1.0, +"texture": ExtResource("47_kwyk6") +}, { +"duration": 1.0, +"texture": ExtResource("46_n7us6") +}], +"loop": true, +"name": &"up_full", +"speed": 6.0 +}, { +"frames": [{ +"duration": 1.0, +"texture": ExtResource("45_f3csq") +}, { +"duration": 1.0, +"texture": ExtResource("48_w8b5g") +}, { +"duration": 1.0, +"texture": ExtResource("12_eyhtl") +}], +"loop": false, +"name": &"up_shrink", +"speed": 6.0 +}] + +[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1dh0q"] +radius = 6.0 +height = 14.0 + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_7ji0i"] + +[node name="Snake" type="CharacterBody2D"] +collision_layer = 16 +collision_mask = 188 +script = ExtResource("1_h5f33") + +[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] +sprite_frames = SubResource("SpriteFrames_jpiqi") +animation = &"down" + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("CapsuleShape2D_1dh0q") + +[node name="Rays" type="Node2D" parent="."] + +[node name="Down" type="RayCast2D" parent="Rays"] +target_position = Vector2(0, 56) +collision_mask = 12 + +[node name="Up" type="RayCast2D" parent="Rays"] +target_position = Vector2(0, -56) +collision_mask = 12 + +[node name="Left" type="RayCast2D" parent="Rays"] +target_position = Vector2(-56, 0) +collision_mask = 12 + +[node name="Right" type="RayCast2D" parent="Rays"] +target_position = Vector2(56, 0) +collision_mask = 12 + +[node name="DetectionArea" type="Area2D" parent="."] +collision_layer = 0 +collision_mask = 4 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="DetectionArea"] +shape = SubResource("RectangleShape2D_7ji0i") + +[node name="Movement" parent="." instance=ExtResource("14_ab70e")] +entityPath = NodePath("..") +spritePath = NodePath("../AnimatedSprite2D") +timer_time = 2.0 +follows = true +follow_chance = 80 + +[node name="Collision" parent="." instance=ExtResource("15_mm88w")] +entityPath = NodePath("..") +collision_shape_path = NodePath("../CollisionShape2D") +component_health_path = NodePath("../Health") + +[node name="Health" parent="." instance=ExtResource("16_0dow6")] +entityPath = NodePath("..") +spritePath = NodePath("../AnimatedSprite2D") +component_movement_path = NodePath("../Movement") +health = 1 +drop_chance = 50 + +[node name="Timer" type="Timer" parent="."] +wait_time = 5.0 +one_shot = true + +[connection signal="body_entered" from="DetectionArea" to="." method="_on_detection_area_body_entered"] +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/Scenes/Entities/Enemies/Statue.gd b/Scenes/Entities/Enemies/Statue.gd new file mode 100644 index 0000000..7f1231b --- /dev/null +++ b/Scenes/Entities/Enemies/Statue.gd @@ -0,0 +1,27 @@ +extends StaticBody2D + + +var projectile + +@onready var ProjectileScene = preload("res://Scenes/Entities/Enemies/Projectile.tscn") + + +func _on_timer_timeout(): + if projectile: + await projectile.tree_exited + + projectile = ProjectileScene.instantiate() + + projectile.tree_exited.connect(func(): + projectile = null + ) + projectile.hit.connect(func(): + Global.player.take_damage(1) + ) + + projectile.global_position = $ProjectileStart.global_position + projectile.target = Global.player.position + projectile.scale = Vector2(0.75, 0.75) + projectile.speed = 60 + + get_tree().current_scene.add_child(projectile) diff --git a/Scenes/Entities/Enemies/Statue.tscn b/Scenes/Entities/Enemies/Statue.tscn new file mode 100644 index 0000000..50d8bf2 --- /dev/null +++ b/Scenes/Entities/Enemies/Statue.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=4 format=3 uid="uid://c2l6n3sjgpy5"] + +[ext_resource type="Script" path="res://Scenes/Entities/Enemies/Statue.gd" id="1_n74bh"] +[ext_resource type="Texture2D" uid="uid://td1476flhtb5" path="res://Assets/Enemies/Statue_2.png" id="2_ra1ju"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_oavvo"] +size = Vector2(16, 32) + +[node name="Statue" type="StaticBody2D"] +collision_layer = 8 +collision_mask = 0 +script = ExtResource("1_n74bh") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture_filter = 1 +position = Vector2(0, -8) +texture = ExtResource("2_ra1ju") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(0, -8) +shape = SubResource("RectangleShape2D_oavvo") + +[node name="Timer" type="Timer" parent="."] +wait_time = 3.0 +autostart = true + +[node name="ProjectileStart" type="Node2D" parent="."] +position = Vector2(0, -8) + +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] diff --git a/Scenes/Entities/Objects/BaseDoor.gd b/Scenes/Entities/Objects/BaseDoor.gd new file mode 100644 index 0000000..7a6c8d4 --- /dev/null +++ b/Scenes/Entities/Objects/BaseDoor.gd @@ -0,0 +1,21 @@ +extends StaticBody2D + + +@export var enabled: bool = true + + +func _ready(): + if enabled: + enable() + else: + disable() + + +func enable(): + visible = true + process_mode = Node.PROCESS_MODE_INHERIT + + +func disable(): + visible = false + process_mode = Node.PROCESS_MODE_DISABLED diff --git a/Scenes/Entities/Objects/BaseDoor.tscn b/Scenes/Entities/Objects/BaseDoor.tscn new file mode 100644 index 0000000..845c35d --- /dev/null +++ b/Scenes/Entities/Objects/BaseDoor.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=3 uid="uid://bkb3qv5y0sp8d"] + +[ext_resource type="Texture2D" uid="uid://br534x61nyy8k" path="res://Assets/Stages/core_indoor_walls.png" id="1_jqsa6"] +[ext_resource type="Script" path="res://Scenes/Entities/Objects/BaseDoor.gd" id="1_silnh"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5r3qy"] +size = Vector2(16, 16) + +[node name="BaseDoor" type="StaticBody2D"] +collision_layer = 8 +collision_mask = 0 +script = ExtResource("1_silnh") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource("RectangleShape2D_5r3qy") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_jqsa6") +region_enabled = true +region_rect = Rect2(560, 96, 16, 16) diff --git a/Scenes/Entities/Objects/Wood.tscn b/Scenes/Entities/Objects/Wood.tscn index d9cd90e..c81a498 100644 --- a/Scenes/Entities/Objects/Wood.tscn +++ b/Scenes/Entities/Objects/Wood.tscn @@ -4,6 +4,7 @@ [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1je2f"] radius = 7.0 +height = 28.0 [node name="Wood" type="StaticBody2D"] z_index = -1 diff --git a/Scenes/Entities/Player.gd b/Scenes/Entities/Player.gd index 77dfac5..1e4b0c2 100644 --- a/Scenes/Entities/Player.gd +++ b/Scenes/Entities/Player.gd @@ -183,7 +183,7 @@ func plant_bomb(): self.bombs.append(bomb) self.last_planted_bomb = bomb - bomb.connect("exploded", func(_bomb): + bomb.tree_exited.connect(func(): self.bombs.erase(bomb) if self.last_planted_bomb == bomb: self.last_planted_bomb = null diff --git a/Scenes/Maps/Base01.gd b/Scenes/Maps/Base01.gd index adeac93..83947e4 100644 --- a/Scenes/Maps/Base01.gd +++ b/Scenes/Maps/Base01.gd @@ -10,6 +10,32 @@ func _ready(): [], get_node("Areas/MapArea/Transitions").get_children() ) + + place_boxes( + get_node("Areas/MapArea2/TileMap"), + 40, + [], + get_node("Areas/MapArea2/Objects").get_children() + ) + get_node("Areas/MapArea2").transitioned_to.connect(func(): + handle_doors( + get_node("Areas/MapArea2/Objects").get_children(), + door_condition_enemies(Utilities.get_enemy_children(get_node("Areas/MapArea2/TileMap"))) + ) + ) + + place_boxes( + get_node("Areas/MapArea6/TileMap"), + 40, + [], + get_node("Areas/MapArea6/Objects").get_children() + ) + get_node("Areas/MapArea6").transitioned_to.connect(func(): + handle_doors( + get_node("Areas/MapArea6/Objects").get_children(), + door_condition_enemies(Utilities.get_enemy_children(get_node("Areas/MapArea6/TileMap"))) + ) + ) # set box to random position without polygon points @@ -71,3 +97,34 @@ func place_boxes( var box = BoxScene.instantiate() box.position = tilemap.map_to_local(placeable_cells[number]) tilemap.add_child(box) + + +func handle_doors(doors: Array, condition): + for door in doors: + door.enable() + + if condition.check(): + for door in doors: + door.disable() + + condition.fulfilled.connect(func(): + for door in doors: + door.disable() + ) + +func door_condition_enemies(enemies: Array): + var condition = Utilities.Condition.new() + condition.function = func(): + for enemy in enemies: + enemy.tree_exited.connect(func(): + enemies.erase(enemy) + if enemies.is_empty(): + condition.fulfilled.emit() + ) + + if enemies.is_empty(): + return true + + return false + + return condition diff --git a/Scenes/Maps/Base01.tscn b/Scenes/Maps/Base01.tscn index 2210414..129a7fe 100644 --- a/Scenes/Maps/Base01.tscn +++ b/Scenes/Maps/Base01.tscn @@ -1,12 +1,31 @@ -[gd_scene load_steps=5 format=3 uid="uid://ql22m2nsgher"] +[gd_scene load_steps=12 format=3 uid="uid://ql22m2nsgher"] [ext_resource type="Script" path="res://Scenes/Maps/Base01.gd" id="1_i08jr"] [ext_resource type="PackedScene" uid="uid://difwuijv2rlx5" path="res://Scenes/Components/MapArea.tscn" id="2_xlqsv"] [ext_resource type="PackedScene" uid="uid://c5ix2njry0181" path="res://Scenes/Components/SceneTransition.tscn" id="3_jhyaq"] +[ext_resource type="PackedScene" uid="uid://bkb3qv5y0sp8d" path="res://Scenes/Entities/Objects/BaseDoor.tscn" id="4_8mtye"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_3l0op"] size = Vector2(240, 176) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_bq2rc"] +size = Vector2(240, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_jitg3"] +size = Vector2(240, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5ef3l"] +size = Vector2(240, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_hn3sh"] +size = Vector2(240, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_64tye"] +size = Vector2(240, 176) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_gndue"] +size = Vector2(240, 176) + [node name="Base01" type="Node2D"] script = ExtResource("1_i08jr") @@ -16,7 +35,7 @@ script = ExtResource("1_i08jr") [node name="TileMap" parent="Areas/MapArea" index="0"] layer_0/tile_data = PackedInt32Array(1, 524296, 17, 2, 524296, 17, 3, 524296, 17, 4, 524296, 17, 5, 524296, 17, 6, 524296, 17, 7, 524296, 17, 8, 524296, 17, 9, 524296, 17, 10, 524296, 17, 11, 524296, 17, 12, 524296, 17, 13, 524296, 17, 14, 524296, 17, 0, 524296, 17, 65536, 524296, 17, 131072, 524296, 17, 196608, 524296, 17, 262144, 524296, 17, 327680, 524296, 17, 393216, 524296, 17, 458752, 524296, 17, 524288, 524296, 17, 589824, 524296, 17, 589825, 524296, 17, 589826, 524296, 17, 589827, 524296, 17, 589828, 524296, 17, 589829, 524296, 17, 589830, 524296, 17, 589832, 524296, 17, 589833, 524296, 17, 589834, 524296, 17, 589835, 524296, 17, 589836, 524296, 17, 589837, 524296, 17, 589838, 524296, 17, 524302, 524296, 17, 458766, 524296, 17, 393230, 524296, 17, 327694, 524296, 17, 262158, 524296, 17, 196622, 524296, 17, 131086, 524296, 17, 65550, 524296, 17, 65537, 524296, 17, 131073, 524296, 17, 196609, 524296, 17, 262145, 524296, 17, 327681, 524296, 17, 393217, 524296, 17, 458753, 524296, 17, 524289, 524296, 17, 65538, 524296, 17, 131074, 524296, 17, 196610, 524296, 17, 262146, 524296, 17, 327682, 524296, 17, 393218, 524296, 17, 458754, 524296, 17, 524290, 524296, 17, 65539, 524296, 17, 131075, 524296, 17, 196611, 524296, 17, 262147, 524296, 17, 327683, 524296, 17, 393219, 524296, 17, 458755, 524296, 17, 524291, 524296, 17, 65540, 524296, 17, 131076, 524296, 17, 196612, 524296, 17, 262148, 524296, 17, 327684, 524296, 17, 393220, 524296, 17, 458756, 524296, 17, 524292, 524296, 17, 65541, 524296, 17, 131077, 524296, 17, 196613, 524296, 17, 262149, 524296, 17, 327685, 524296, 17, 393221, 524296, 17, 458757, 524296, 17, 524293, 524296, 17, 65542, 524296, 17, 131078, 524296, 17, 196614, 524296, 17, 262150, 524296, 17, 327686, 524296, 17, 393222, 524296, 17, 458758, 524296, 17, 524294, 524296, 17, 65543, 524296, 17, 131079, 524296, 17, 196615, 524296, 17, 262151, 524296, 17, 327687, 524296, 17, 393223, 524296, 17, 458759, 524296, 17, 524295, 524296, 17, 65544, 524296, 17, 131080, 524296, 17, 196616, 524296, 17, 262152, 524296, 17, 327688, 524296, 17, 393224, 524296, 17, 458760, 524296, 17, 524296, 524296, 17, 65545, 524296, 17, 131081, 524296, 17, 196617, 524296, 17, 262153, 524296, 17, 327689, 524296, 17, 393225, 524296, 17, 458761, 524296, 17, 524297, 524296, 17, 65546, 524296, 17, 131082, 524296, 17, 196618, 524296, 17, 262154, 524296, 17, 327690, 524296, 17, 393226, 524296, 17, 458762, 524296, 17, 524298, 524296, 17, 65547, 524296, 17, 131083, 524296, 17, 196619, 524296, 17, 262155, 524296, 17, 327691, 524296, 17, 393227, 524296, 17, 458763, 524296, 17, 524299, 524296, 17, 65548, 524296, 17, 131084, 524296, 17, 196620, 524296, 17, 262156, 524296, 17, 327692, 524296, 17, 393228, 524296, 17, 458764, 524296, 17, 524300, 524296, 17, 65549, 524296, 17, 131085, 524296, 17, 196621, 524296, 17, 262157, 524296, 17, 327693, 524296, 17, 393229, 524296, 17, 458765, 524296, 17, 524301, 524296, 17, 589831, 524296, 17, 655360, 524296, 17, 655361, 524296, 17, 655362, 524296, 17, 655363, 524296, 17, 655364, 524296, 17, 655365, 524296, 17, 655366, 524296, 17, 655367, 524296, 17, 655368, 524296, 17, 655369, 524296, 17, 655370, 524296, 17, 655371, 524296, 17, 655372, 524296, 17, 655373, 524296, 17, 655374, 524296, 17) -layer_2/tile_data = PackedInt32Array(458763, 2, 196608, 196619, 2, 196608, 196611, 2, 196608) +layer_2/tile_data = PackedInt32Array(196611, 2, 196608, 196619, 2, 196608, 458763, 2, 196608) layer_5/tile_data = PackedInt32Array(0, 458760, 14, 1, 524296, 14, 2, 524296, 14, 3, 524296, 14, 4, 524296, 14, 5, 524296, 14, 6, 524296, 14, 7, 524296, 14, 8, 524296, 14, 9, 524296, 14, 10, 524296, 14, 11, 524296, 14, 12, 720904, 14, 13, 524296, 14, 14, 589832, 14, 131072, 458760, 15, 196608, 458760, 15, 262144, 589832, 16, 393216, 589832, 14, 458752, 458760, 15, 524288, 458760, 15, 589824, 458760, 15, 262150, 458760, 14, 327686, 458760, 15, 262151, 524296, 14, 327687, 655368, 19, 262152, 589832, 14, 327688, 589832, 15, 524300, 458760, 14, 589836, 458760, 15, 524301, 524296, 14, 589837, 655368, 19, 131086, 786440, 15, 196622, 589832, 15, 262158, 589832, 15, 327694, 589832, 15, 393230, 589832, 15, 458766, 589832, 15, 524302, 786440, 15, 589838, 589832, 15, 655360, 458760, 16, 393217, 655368, 19, 655361, 524296, 16, 131074, 655368, 19, 262146, 655368, 19, 393218, 655368, 19, 524290, 655368, 19, 655362, 524296, 16, 393219, 655368, 19, 655363, 524296, 16, 131076, 655368, 19, 262148, 655368, 19, 393220, 655368, 19, 524292, 655368, 19, 655364, 524296, 16, 393221, 655368, 19, 655365, 524296, 16, 131078, 655368, 19, 393222, 458760, 16, 524294, 655368, 19, 655366, 589832, 14, 393223, 524296, 16, 131080, 655368, 19, 393224, 589832, 16, 524296, 655368, 19, 655368, 458760, 14, 655369, 524296, 16, 655370, 524296, 16, 655371, 524296, 16, 131084, 458760, 16, 655372, 786440, 14, 655373, 524296, 16, 655374, 589832, 16, 65536, 458760, 15, 65550, 589832, 15, 65548, 458760, 15, 131085, 524296, 16, 65549, 655368, 19, 262156, 655368, 19, 393228, 655368, 19, 524298, 655368, 19, 393226, 655368, 19, 262154, 655368, 19, 131082, 655368, 19) [node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea"] @@ -33,7 +52,93 @@ targetPlayerPositionNodePath = "Areas/Beta02/Transitions/Base01" [node name="In" type="Node2D" parent="Areas/MapArea/Transitions"] position = Vector2(120, 152) +[node name="MapArea2" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="TileMap" parent="Areas/MapArea2" index="0"] +layer_0/tile_data = PackedInt32Array(65521, 524296, 17, 131057, 524296, 17, 196593, 524296, 17, 262129, 524296, 17, 327665, 524296, 17, 393201, 524296, 17, 458737, 524296, 17, 524273, 524296, 17, 589809, 524296, 17, 655345, 524296, 17, 720881, 524296, 17, 65522, 524296, 17, 131058, 524296, 17, 196594, 524296, 17, 262130, 524296, 17, 327666, 524296, 17, 393202, 524296, 17, 458738, 524296, 17, 524274, 524296, 17, 589810, 524296, 17, 655346, 524296, 17, 720882, 524296, 17, 65523, 524296, 17, 131059, 524296, 17, 196595, 524296, 17, 262131, 524296, 17, 327667, 524296, 17, 393203, 524296, 17, 458739, 524296, 17, 524275, 524296, 17, 589811, 524296, 17, 655347, 524296, 17, 720883, 524296, 17, 65524, 524296, 17, 131060, 524296, 17, 196596, 524296, 17, 262132, 524296, 17, 327668, 524296, 17, 393204, 524296, 17, 458740, 524296, 17, 524276, 524296, 17, 589812, 524296, 17, 655348, 524296, 17, 720884, 524296, 17, 65525, 524296, 17, 131061, 524296, 17, 196597, 524296, 17, 262133, 524296, 17, 327669, 524296, 17, 393205, 524296, 17, 458741, 524296, 17, 524277, 524296, 17, 589813, 524296, 17, 655349, 524296, 17, 720885, 524296, 17, 65526, 524296, 17, 131062, 524296, 17, 196598, 524296, 17, 262134, 524296, 17, 327670, 524296, 17, 393206, 524296, 17, 458742, 524296, 17, 524278, 524296, 17, 589814, 524296, 17, 655350, 524296, 17, 720886, 524296, 17, 65527, 524296, 17, 131063, 524296, 17, 196599, 524296, 17, 262135, 524296, 17, 327671, 524296, 17, 393207, 524296, 17, 458743, 524296, 17, 524279, 524296, 17, 589815, 524296, 17, 655351, 524296, 17, 720887, 524296, 17, 65528, 524296, 17, 131064, 524296, 17, 196600, 524296, 17, 262136, 524296, 17, 327672, 524296, 17, 393208, 524296, 17, 458744, 524296, 17, 524280, 524296, 17, 589816, 524296, 17, 655352, 524296, 17, 720888, 524296, 17, 65529, 524296, 17, 131065, 524296, 17, 196601, 524296, 17, 262137, 524296, 17, 327673, 524296, 17, 393209, 524296, 17, 458745, 524296, 17, 524281, 524296, 17, 589817, 524296, 17, 655353, 524296, 17, 720889, 524296, 17, 65530, 524296, 17, 131066, 524296, 17, 196602, 524296, 17, 262138, 524296, 17, 327674, 524296, 17, 393210, 524296, 17, 458746, 524296, 17, 524282, 524296, 17, 589818, 524296, 17, 655354, 524296, 17, 720890, 524296, 17, 65531, 524296, 17, 131067, 524296, 17, 196603, 524296, 17, 262139, 524296, 17, 327675, 524296, 17, 393211, 524296, 17, 458747, 524296, 17, 524283, 524296, 17, 589819, 524296, 17, 655355, 524296, 17, 720891, 524296, 17, 65532, 524296, 17, 131068, 524296, 17, 196604, 524296, 17, 262140, 524296, 17, 327676, 524296, 17, 393212, 524296, 17, 458748, 524296, 17, 524284, 524296, 17, 589820, 524296, 17, 655356, 524296, 17, 720892, 524296, 17, 65533, 524296, 17, 131069, 524296, 17, 196605, 524296, 17, 262141, 524296, 17, 327677, 524296, 17, 393213, 524296, 17, 458749, 524296, 17, 524285, 524296, 17, 589821, 524296, 17, 655357, 524296, 17, 720893, 524296, 17, 65534, 524296, 17, 131070, 524296, 17, 196606, 524296, 17, 262142, 524296, 17, 327678, 524296, 17, 393214, 524296, 17, 458750, 524296, 17, 524286, 524296, 17, 589822, 524296, 17, 655358, 524296, 17, 720894, 524296, 17, 65535, 524296, 17, 131071, 524296, 17, 196607, 524296, 17, 262143, 524296, 17, 327679, 524296, 17, 393215, 524296, 17, 458751, 524296, 17, 524287, 524296, 17, 589823, 524296, 17, 655359, 524296, 17, 720895, 524296, 17) +layer_2/tile_data = PackedInt32Array(524285, 2, 720896, 524277, 2, 720896, 262136, 2, 720896) +layer_5/tile_data = PackedInt32Array(131057, 458760, 15, 196593, 458760, 15, 262129, 458760, 15, 327665, 458760, 15, 393201, 458760, 15, 458737, 458760, 15, 524273, 458760, 15, 589809, 458760, 15, 655345, 458760, 15, 131071, 589832, 15, 196607, 589832, 15, 262143, 589832, 15, 524287, 589832, 15, 589823, 589832, 15, 655359, 589832, 15, 720895, 589832, 16, 720894, 524296, 16, 720893, 524296, 16, 720892, 524296, 16, 720891, 524296, 16, 720890, 524296, 16, 720889, 524296, 16, 720888, 524296, 16, 720887, 524296, 16, 720886, 524296, 16, 720885, 524296, 16, 720884, 524296, 16, 720883, 524296, 16, 720882, 524296, 16, 720881, 458760, 16, 65521, 458760, 14, 65535, 589832, 14, 65534, 524296, 14, 65533, 524296, 14, 65532, 524296, 14, 65531, 524296, 14, 65530, 524296, 14, 65527, 589832, 16, 65526, 524296, 14, 65525, 524296, 14, 65524, 524296, 14, 65523, 524296, 14, 65522, 524296, 14, 327679, 458760, 16, 458751, 458760, 14, 65529, 458760, 16, 196605, 655368, 19, 196603, 655368, 19, 196601, 655368, 19, 196599, 655368, 19, 196597, 655368, 19, 196595, 655368, 19, 327667, 655368, 19, 458739, 655368, 19, 589811, 655368, 19, 589813, 655368, 19, 589815, 655368, 19, 589817, 655368, 19, 589819, 655368, 19, 589821, 655368, 19, 458749, 655368, 19, 458747, 655368, 19, 458745, 655368, 19, 458743, 655368, 19, 458741, 655368, 19, 327669, 655368, 19, 327671, 655368, 19, 327673, 655368, 19, 327675, 655368, 19, 327677, 655368, 19) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea2"] +position = Vector2(-120, 88) +shape = SubResource("RectangleShape2D_bq2rc") + +[node name="Objects" type="Node" parent="Areas/MapArea2"] + +[node name="BaseDoor" parent="Areas/MapArea2/Objects" instance=ExtResource("4_8mtye")] +position = Vector2(-8, 88) +enabled = false + +[node name="BaseDoor2" parent="Areas/MapArea2/Objects" instance=ExtResource("4_8mtye")] +position = Vector2(-120, 8) +enabled = false + +[node name="MapArea3" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="TileMap" parent="Areas/MapArea3" index="0"] +layer_0/tile_data = PackedInt32Array(-655375, 524296, 17, -589839, 524296, 17, -524303, 524296, 17, -458767, 524296, 17, -393231, 524296, 17, -327695, 524296, 17, -262159, 524296, 17, -196623, 524296, 17, -131087, 524296, 17, -65551, 524296, 17, -15, 524296, 17, -655374, 524296, 17, -589838, 524296, 17, -524302, 524296, 17, -458766, 524296, 17, -393230, 524296, 17, -327694, 524296, 17, -262158, 524296, 17, -196622, 524296, 17, -131086, 524296, 17, -65550, 524296, 17, -14, 524296, 17, -655373, 524296, 17, -589837, 524296, 17, -524301, 524296, 17, -458765, 524296, 17, -393229, 524296, 17, -327693, 524296, 17, -262157, 524296, 17, -196621, 524296, 17, -131085, 524296, 17, -65549, 524296, 17, -13, 524296, 17, -655372, 524296, 17, -589836, 524296, 17, -524300, 524296, 17, -458764, 524296, 17, -393228, 524296, 17, -327692, 524296, 17, -262156, 524296, 17, -196620, 524296, 17, -131084, 524296, 17, -65548, 524296, 17, -12, 524296, 17, -655371, 524296, 17, -589835, 524296, 17, -524299, 524296, 17, -458763, 524296, 17, -393227, 524296, 17, -327691, 524296, 17, -262155, 524296, 17, -196619, 524296, 17, -131083, 524296, 17, -65547, 524296, 17, -11, 524296, 17, -655370, 524296, 17, -589834, 524296, 17, -524298, 524296, 17, -458762, 524296, 17, -393226, 524296, 17, -327690, 524296, 17, -262154, 524296, 17, -196618, 524296, 17, -131082, 524296, 17, -65546, 524296, 17, -10, 524296, 17, -655369, 524296, 17, -589833, 524296, 17, -524297, 524296, 17, -458761, 524296, 17, -393225, 524296, 17, -327689, 524296, 17, -262153, 524296, 17, -196617, 524296, 17, -131081, 524296, 17, -65545, 524296, 17, -9, 524296, 17, -655368, 524296, 17, -589832, 524296, 17, -524296, 524296, 17, -458760, 524296, 17, -393224, 524296, 17, -327688, 524296, 17, -262152, 524296, 17, -196616, 524296, 17, -131080, 524296, 17, -65544, 524296, 17, -8, 524296, 17, -655367, 524296, 17, -589831, 524296, 17, -524295, 524296, 17, -458759, 524296, 17, -393223, 524296, 17, -327687, 524296, 17, -262151, 524296, 17, -196615, 524296, 17, -131079, 524296, 17, -65543, 524296, 17, -7, 524296, 17, -655366, 524296, 17, -589830, 524296, 17, -524294, 524296, 17, -458758, 524296, 17, -393222, 524296, 17, -327686, 524296, 17, -262150, 524296, 17, -196614, 524296, 17, -131078, 524296, 17, -65542, 524296, 17, -6, 524296, 17, -655365, 524296, 17, -589829, 524296, 17, -524293, 524296, 17, -458757, 524296, 17, -393221, 524296, 17, -327685, 524296, 17, -262149, 524296, 17, -196613, 524296, 17, -131077, 524296, 17, -65541, 524296, 17, -5, 524296, 17, -655364, 524296, 17, -589828, 524296, 17, -524292, 524296, 17, -458756, 524296, 17, -393220, 524296, 17, -327684, 524296, 17, -262148, 524296, 17, -196612, 524296, 17, -131076, 524296, 17, -65540, 524296, 17, -4, 524296, 17, -655363, 524296, 17, -589827, 524296, 17, -524291, 524296, 17, -458755, 524296, 17, -393219, 524296, 17, -327683, 524296, 17, -262147, 524296, 17, -196611, 524296, 17, -131075, 524296, 17, -65539, 524296, 17, -3, 524296, 17, -655362, 524296, 17, -589826, 524296, 17, -524290, 524296, 17, -458754, 524296, 17, -393218, 524296, 17, -327682, 524296, 17, -262146, 524296, 17, -196610, 524296, 17, -131074, 524296, 17, -65538, 524296, 17, -2, 524296, 17, -655361, 524296, 17, -589825, 524296, 17, -524289, 524296, 17, -458753, 524296, 17, -393217, 524296, 17, -327681, 524296, 17, -262145, 524296, 17, -196609, 524296, 17, -131073, 524296, 17, -65537, 524296, 17, -1, 524296, 17) +layer_2/tile_data = PackedInt32Array(-327688, 2, 196608) +layer_5/tile_data = PackedInt32Array(-655375, 458760, 14, -15, 458760, 16, -1, 589832, 16, -655361, 589832, 14, -589825, 589832, 15, -524289, 589832, 15, -458753, 589832, 15, -393217, 589832, 15, -327681, 589832, 15, -262145, 589832, 15, -196609, 589832, 15, -131073, 786440, 15, -65537, 589832, 15, -2, 524296, 16, -3, 786440, 14, -4, 524296, 16, -5, 524296, 16, -6, 524296, 16, -10, 524296, 16, -11, 524296, 16, -12, 524296, 16, -13, 786440, 14, -14, 524296, 16, -65551, 458760, 15, -131087, 720904, 15, -196623, 458760, 15, -262159, 458760, 15, -327695, 458760, 15, -393231, 458760, 15, -458767, 458760, 15, -524303, 458760, 15, -589839, 458760, 15, -655374, 524296, 14, -655373, 524296, 14, -655372, 524296, 14, -655371, 524296, 14, -655370, 524296, 14, -655366, 524296, 14, -655365, 524296, 14, -655364, 524296, 14, -655363, 524296, 14, -655362, 524296, 14, -9, 589832, 14, -7, 458760, 14, -655367, 458760, 16, -655369, 589832, 16, -131081, 655368, 19, -131079, 655368, 19, -131083, 655368, 19, -131077, 655368, 19, -262149, 655368, 19, -262150, 655368, 19, -262151, 655368, 19, -262152, 655368, 19, -262153, 655368, 19, -262154, 655368, 19, -262155, 655368, 19, -262157, 655368, 19, -262147, 655368, 19, -458760, 655368, 19, -393225, 655368, 19, -393223, 655368, 19, -524297, 655368, 19, -524295, 655368, 19, -524301, 458760, 14, -524300, 524296, 14, -524299, 589832, 14, -458763, 589832, 15, -393227, 589832, 16, -393228, 524296, 16, -393229, 458760, 16, -458765, 458760, 15, -458764, 655368, 19, -524293, 458760, 14, -458757, 458760, 15, -393221, 458760, 16, -524292, 524296, 14, -393220, 524296, 16, -524291, 589832, 14, -458755, 589832, 15, -393219, 589832, 16, -458756, 655368, 19, -131085, 589832, 14, -131086, 524296, 14, -65549, 589832, 15, -65539, 458760, 15, -131075, 458760, 14, -131074, 524296, 14, -65538, 655368, 19, -65550, 655368, 19) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea3"] +position = Vector2(-120, -88) +shape = SubResource("RectangleShape2D_jitg3") + +[node name="MapArea4" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="TileMap" parent="Areas/MapArea4" index="0"] +layer_0/tile_data = PackedInt32Array(-1376271, 524296, 17, -1310735, 524296, 17, -1245199, 524296, 17, -1179663, 524296, 17, -1114127, 524296, 17, -1048591, 524296, 17, -983055, 524296, 17, -917519, 524296, 17, -851983, 524296, 17, -786447, 524296, 17, -720911, 524296, 17, -1376270, 524296, 17, -1310734, 524296, 17, -1245198, 524296, 17, -1179662, 524296, 17, -1114126, 524296, 17, -1048590, 524296, 17, -983054, 524296, 17, -917518, 524296, 17, -851982, 524296, 17, -786446, 524296, 17, -720910, 524296, 17, -1376269, 524296, 17, -1310733, 524296, 17, -1245197, 524296, 17, -1179661, 524296, 17, -1114125, 524296, 17, -1048589, 524296, 17, -983053, 524296, 17, -917517, 524296, 17, -851981, 524296, 17, -786445, 524296, 17, -720909, 524296, 17, -1376268, 524296, 17, -1310732, 524296, 17, -1245196, 524296, 17, -1179660, 524296, 17, -1114124, 524296, 17, -1048588, 524296, 17, -983052, 524296, 17, -917516, 524296, 17, -851980, 524296, 17, -786444, 524296, 17, -720908, 524296, 17, -1376267, 524296, 17, -1310731, 524296, 17, -1245195, 524296, 17, -1179659, 524296, 17, -1114123, 524296, 17, -1048587, 524296, 17, -983051, 524296, 17, -917515, 524296, 17, -851979, 524296, 17, -786443, 524296, 17, -720907, 524296, 17, -1376266, 524296, 17, -1310730, 524296, 17, -1245194, 524296, 17, -1179658, 524296, 17, -1114122, 524296, 17, -1048586, 524296, 17, -983050, 524296, 17, -917514, 524296, 17, -851978, 524296, 17, -786442, 524296, 17, -720906, 524296, 17, -1376265, 524296, 17, -1310729, 524296, 17, -1245193, 524296, 17, -1179657, 524296, 17, -1114121, 524296, 17, -1048585, 524296, 17, -983049, 524296, 17, -917513, 524296, 17, -851977, 524296, 17, -786441, 524296, 17, -720905, 524296, 17, -1376264, 524296, 17, -1310728, 524296, 17, -1245192, 524296, 17, -1179656, 524296, 17, -1114120, 524296, 17, -1048584, 524296, 17, -983048, 524296, 17, -917512, 524296, 17, -851976, 524296, 17, -786440, 524296, 17, -720904, 524296, 17, -1376263, 524296, 17, -1310727, 524296, 17, -1245191, 524296, 17, -1179655, 524296, 17, -1114119, 524296, 17, -1048583, 524296, 17, -983047, 524296, 17, -917511, 524296, 17, -851975, 524296, 17, -786439, 524296, 17, -720903, 524296, 17, -1376262, 524296, 17, -1310726, 524296, 17, -1245190, 524296, 17, -1179654, 524296, 17, -1114118, 524296, 17, -1048582, 524296, 17, -983046, 524296, 17, -917510, 524296, 17, -851974, 524296, 17, -786438, 524296, 17, -720902, 524296, 17, -1376261, 524296, 17, -1310725, 524296, 17, -1245189, 524296, 17, -1179653, 524296, 17, -1114117, 524296, 17, -1048581, 524296, 17, -983045, 524296, 17, -917509, 524296, 17, -851973, 524296, 17, -786437, 524296, 17, -720901, 524296, 17, -1376260, 524296, 17, -1310724, 524296, 17, -1245188, 524296, 17, -1179652, 524296, 17, -1114116, 524296, 17, -1048580, 524296, 17, -983044, 524296, 17, -917508, 524296, 17, -851972, 524296, 17, -786436, 524296, 17, -720900, 524296, 17, -1376259, 524296, 17, -1310723, 524296, 17, -1245187, 524296, 17, -1179651, 524296, 17, -1114115, 524296, 17, -1048579, 524296, 17, -983043, 524296, 17, -917507, 524296, 17, -851971, 524296, 17, -786435, 524296, 17, -720899, 524296, 17, -1376258, 524296, 17, -1310722, 524296, 17, -1245186, 524296, 17, -1179650, 524296, 17, -1114114, 524296, 17, -1048578, 524296, 17, -983042, 524296, 17, -917506, 524296, 17, -851970, 524296, 17, -786434, 524296, 17, -720898, 524296, 17, -1376257, 524296, 17, -1310721, 524296, 17, -1245185, 524296, 17, -1179649, 524296, 17, -1114113, 524296, 17, -1048577, 524296, 17, -983041, 524296, 17, -917505, 524296, 17, -851969, 524296, 17, -786433, 524296, 17, -720897, 524296, 17) +layer_2/tile_data = PackedInt32Array(-1048577, 2, 458752, -1245186, 2, 786432, -1245198, 2, 786432) +layer_5/tile_data = PackedInt32Array(-1376271, 458760, 14, -1376257, 589832, 14, -720897, 589832, 16, -720911, 458760, 16, -720910, 524296, 16, -720909, 524296, 16, -720908, 524296, 16, -720907, 524296, 16, -720906, 524296, 16, -720898, 524296, 16, -720899, 524296, 16, -720900, 524296, 16, -720901, 524296, 16, -720902, 524296, 16, -720905, 589832, 14, -720903, 458760, 14, -1310735, 458760, 15, -1245199, 458760, 15, -1179663, 458760, 15, -1114127, 458760, 15, -1048591, 458760, 15, -983055, 458760, 15, -917519, 458760, 15, -851983, 458760, 15, -786447, 458760, 15, -1310721, 589832, 15, -1245185, 589832, 15, -1179649, 589832, 15, -1114113, 589832, 15, -983041, 589832, 15, -917505, 589832, 15, -851969, 589832, 15, -786433, 589832, 15, -1376263, 458760, 16, -1376266, 524296, 16, -1376267, 524296, 14, -1376268, 524296, 14, -1376269, 524296, 14, -1376270, 524296, 14, -1376262, 524296, 14, -1376261, 524296, 14, -1376260, 524296, 14, -1376259, 524296, 14, -1376258, 524296, 14, -851981, 1114119, 25, -851980, 1114119, 25, -851979, 1114119, 25, -851978, 1114119, 25, -851977, 1114119, 25, -851976, 1114119, 25, -851975, 1114119, 25, -851974, 1114119, 25, -851973, 1114119, 25, -851972, 1114119, 25, -851971, 1114119, 25, -917507, 1114119, 25, -983043, 1114119, 25, -917517, 1114119, 25, -983053, 1114119, 25, -983051, 1114119, 25, -983050, 1114119, 25, -983045, 1114119, 25, -983046, 1114119, 25, -983047, 1114119, 25, -983049, 1114119, 25, -1048587, 1114119, 25, -1114123, 1114119, 25, -1114124, 1114119, 25, -1114125, 1114119, 25, -1179661, 1114119, 25, -1245197, 1114119, 25, -1048581, 1114119, 25, -1114117, 1114119, 25, -1114116, 1114119, 25, -1114115, 1114119, 25, -1179651, 1114119, 25, -1245187, 1114119, 25, -1245189, 1114119, 25, -1245190, 1114119, 25, -1245191, 1114119, 25, -1179655, 1114119, 25, -1114119, 1114119, 25, -1114120, 1114119, 25, -1114121, 1114119, 25, -1179657, 1114119, 25, -1245193, 1114119, 25, -1245194, 1114119, 25, -1245195, 1114119, 25, -1376265, 589832, 16) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea4"] +position = Vector2(-120, -264) +shape = SubResource("RectangleShape2D_5ef3l") + +[node name="MapArea5" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea5"] +position = Vector2(120, -264) +shape = SubResource("RectangleShape2D_hn3sh") + +[node name="MapArea6" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="TileMap" parent="Areas/MapArea6" index="0"] +layer_0/tile_data = PackedInt32Array(-2097167, 524296, 17, -2031631, 524296, 17, -1966095, 524296, 17, -1900559, 524296, 17, -1835023, 524296, 17, -1769487, 524296, 17, -1703951, 524296, 17, -1638415, 524296, 17, -1572879, 524296, 17, -1507343, 524296, 17, -1441807, 524296, 17, -2097166, 524296, 17, -2031630, 524296, 17, -1966094, 524296, 17, -1900558, 524296, 17, -1835022, 524296, 17, -1769486, 524296, 17, -1703950, 524296, 17, -1638414, 524296, 17, -1572878, 524296, 17, -1507342, 524296, 17, -1441806, 524296, 17, -2097165, 524296, 17, -2031629, 524296, 17, -1966093, 524296, 17, -1900557, 524296, 17, -1835021, 524296, 17, -1769485, 524296, 17, -1703949, 524296, 17, -1638413, 524296, 17, -1572877, 524296, 17, -1507341, 524296, 17, -1441805, 524296, 17, -2097164, 524296, 17, -2031628, 524296, 17, -1966092, 524296, 17, -1900556, 524296, 17, -1835020, 524296, 17, -1769484, 524296, 17, -1703948, 524296, 17, -1638412, 524296, 17, -1572876, 524296, 17, -1507340, 524296, 17, -1441804, 524296, 17, -2097163, 524296, 17, -2031627, 524296, 17, -1966091, 524296, 17, -1900555, 524296, 17, -1835019, 524296, 17, -1769483, 524296, 17, -1703947, 524296, 17, -1638411, 524296, 17, -1572875, 524296, 17, -1507339, 524296, 17, -1441803, 524296, 17, -2097162, 524296, 17, -2031626, 524296, 17, -1966090, 524296, 17, -1900554, 524296, 17, -1835018, 524296, 17, -1769482, 524296, 17, -1703946, 524296, 17, -1638410, 524296, 17, -1572874, 524296, 17, -1507338, 524296, 17, -1441802, 524296, 17, -2097161, 524296, 17, -2031625, 524296, 17, -1966089, 524296, 17, -1900553, 524296, 17, -1835017, 524296, 17, -1769481, 524296, 17, -1703945, 524296, 17, -1638409, 524296, 17, -1572873, 524296, 17, -1507337, 524296, 17, -1441801, 524296, 17, -2097160, 524296, 17, -2031624, 524296, 17, -1966088, 524296, 17, -1900552, 524296, 17, -1835016, 524296, 17, -1769480, 524296, 17, -1703944, 524296, 17, -1638408, 524296, 17, -1572872, 524296, 17, -1507336, 524296, 17, -1441800, 524296, 17, -2097159, 524296, 17, -2031623, 524296, 17, -1966087, 524296, 17, -1900551, 524296, 17, -1835015, 524296, 17, -1769479, 524296, 17, -1703943, 524296, 17, -1638407, 524296, 17, -1572871, 524296, 17, -1507335, 524296, 17, -1441799, 524296, 17, -2097158, 524296, 17, -2031622, 524296, 17, -1966086, 524296, 17, -1900550, 524296, 17, -1835014, 524296, 17, -1769478, 524296, 17, -1703942, 524296, 17, -1638406, 524296, 17, -1572870, 524296, 17, -1507334, 524296, 17, -1441798, 524296, 17, -2097157, 524296, 17, -2031621, 524296, 17, -1966085, 524296, 17, -1900549, 524296, 17, -1835013, 524296, 17, -1769477, 524296, 17, -1703941, 524296, 17, -1638405, 524296, 17, -1572869, 524296, 17, -1507333, 524296, 17, -1441797, 524296, 17, -2097156, 524296, 17, -2031620, 524296, 17, -1966084, 524296, 17, -1900548, 524296, 17, -1835012, 524296, 17, -1769476, 524296, 17, -1703940, 524296, 17, -1638404, 524296, 17, -1572868, 524296, 17, -1507332, 524296, 17, -1441796, 524296, 17, -2097155, 524296, 17, -2031619, 524296, 17, -1966083, 524296, 17, -1900547, 524296, 17, -1835011, 524296, 17, -1769475, 524296, 17, -1703939, 524296, 17, -1638403, 524296, 17, -1572867, 524296, 17, -1507331, 524296, 17, -1441795, 524296, 17, -2097154, 524296, 17, -2031618, 524296, 17, -1966082, 524296, 17, -1900546, 524296, 17, -1835010, 524296, 17, -1769474, 524296, 17, -1703938, 524296, 17, -1638402, 524296, 17, -1572866, 524296, 17, -1507330, 524296, 17, -1441794, 524296, 17, -2097153, 524296, 17, -2031617, 524296, 17, -1966081, 524296, 17, -1900545, 524296, 17, -1835009, 524296, 17, -1769473, 524296, 17, -1703937, 524296, 17, -1638401, 524296, 17, -1572865, 524296, 17, -1507329, 524296, 17, -1441793, 524296, 17) +layer_2/tile_data = PackedInt32Array(-1900556, 2, 720896, -1900548, 2, 720896) +layer_5/tile_data = PackedInt32Array(-2097167, 458760, 14, -2097153, 589832, 14, -1441793, 589832, 16, -1441807, 458760, 16, -1441799, 458760, 14, -1703951, 589832, 14, -1835023, 589832, 16, -1835009, 458760, 16, -1703937, 458760, 14, -1441801, 589832, 14, -1572873, 655368, 19, -1703945, 655368, 19, -1703943, 655368, 19, -1572871, 655368, 19, -1703947, 655368, 19, -1703949, 655368, 19, -1572877, 655368, 19, -1572875, 655368, 19, -1572869, 655368, 19, -1703941, 655368, 19, -1703939, 655368, 19, -1572867, 655368, 19, -1835011, 655368, 19, -1835013, 655368, 19, -1966085, 655368, 19, -1966083, 655368, 19, -1966093, 655368, 19, -1966091, 655368, 19, -1835019, 655368, 19, -1835021, 655368, 19, -1835017, 458760, 16, -1835015, 589832, 16, -1835016, 524296, 16, -1900553, 458760, 15, -1966089, 458760, 15, -2031625, 458760, 15, -1900551, 589832, 15, -1966087, 589832, 15, -2031623, 589832, 15, -2097159, 458760, 14, -2097161, 589832, 14, -2097160, 655368, 19, -2031624, 655368, 19, -1966088, 655368, 19, -1900552, 655368, 19, -2097162, 524296, 14, -2097163, 524296, 14, -2097164, 524296, 14, -2097165, 524296, 14, -2097166, 524296, 14, -2097158, 524296, 14, -2097157, 524296, 14, -2097156, 524296, 14, -2097155, 524296, 14, -2097154, 524296, 14, -2031631, 458760, 15, -1966095, 458760, 15, -1900559, 458760, 15, -1638415, 458760, 15, -1572879, 458760, 15, -1507343, 458760, 15, -1638401, 589832, 15, -1572865, 589832, 15, -1507329, 589832, 15, -2031617, 589832, 15, -1966081, 589832, 15, -1900545, 589832, 15, -1441794, 524296, 16, -1441795, 524296, 16, -1441796, 524296, 16, -1441797, 524296, 16, -1441802, 524296, 16, -1441803, 524296, 16, -1441804, 524296, 16, -1441805, 524296, 16, -1441806, 524296, 16, -1441798, 524296, 16) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea6"] +position = Vector2(-120, -440) +shape = SubResource("RectangleShape2D_64tye") + +[node name="Objects" type="Node" parent="Areas/MapArea6"] + +[node name="BaseDoor" parent="Areas/MapArea6/Objects" instance=ExtResource("4_8mtye")] +position = Vector2(-120, -360) +enabled = false + +[node name="BaseDoor2" parent="Areas/MapArea6/Objects" instance=ExtResource("4_8mtye")] +position = Vector2(-232, -440) +enabled = false + +[node name="BaseDoor3" parent="Areas/MapArea6/Objects" instance=ExtResource("4_8mtye")] +position = Vector2(-8, -440) +enabled = false + +[node name="MapArea7" parent="Areas" instance=ExtResource("2_xlqsv")] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/MapArea7"] +position = Vector2(-360, -440) +shape = SubResource("RectangleShape2D_gndue") + [node name="InitialPlayerPosition" type="Node2D" parent="."] -position = Vector2(120, 152) +position = Vector2(-120, -328) [editable path="Areas/MapArea"] +[editable path="Areas/MapArea2"] +[editable path="Areas/MapArea3"] +[editable path="Areas/MapArea4"] +[editable path="Areas/MapArea5"] +[editable path="Areas/MapArea6"] +[editable path="Areas/MapArea7"] diff --git a/Scenes/Maps/World3.tscn b/Scenes/Maps/World3.tscn index cfb3e7c..0962a38 100644 --- a/Scenes/Maps/World3.tscn +++ b/Scenes/Maps/World3.tscn @@ -385,9 +385,9 @@ layer_1/tile_data = PackedInt32Array(-3866694, 2, 65536, -3735622, 2, 65536, -36 layer_2/tile_data = PackedInt32Array(-3080264, 2, 655360, -3735646, 2, 655360, -3407951, 1572871, 36, -3407950, 1638407, 36, -2883671, 2, 655360, -3604568, 2, 262144, -2818124, 2, 262144, -2752592, 1572871, 36, -2752591, 1638407, 36) layer_4/tile_data = PackedInt32Array(-3473487, 1572871, 35, -3473486, 1638407, 35, -2818128, 1572871, 35, -2818127, 1638407, 35) layer_5/tile_data = PackedInt32Array(-2687045, 327684, 1, -2752581, 327684, 1, -2818117, 327684, 1, -2883653, 327684, 1, -2949189, 327684, 1, -3014725, 327684, 1, -3080261, 327684, 1, -3145797, 327684, 1, -3211333, 327684, 0, -3473477, 327684, 2, -3539013, 327684, 1, -3604549, 327684, 1, -3670085, 327684, 1, -3735621, 327684, 1, -3801157, 327684, 1, -3866693, 327684, 1, -3932229, 65540, 4, -3932230, 393220, 2, -3932231, 393220, 2, -3932232, 393220, 2, -3932233, 393220, 2, -3932234, 393220, 2, -3932235, 393220, 2, -3932236, 393220, 2, -3932237, 393220, 2, -3932238, 393220, 2, -3932239, 393220, 2, -3932240, 393220, 2, -3932241, 393220, 2, -3932242, 393220, 2, -3932243, 393220, 2, -3932244, 393220, 2, -3932245, 393220, 2, -3932246, 393220, 2, -3932247, 393220, 2, -3932248, 393220, 2, -3932249, 393220, 2, -3932250, 393220, 2, -3932251, 393220, 2, -3932252, 393220, 2, -3932253, 393220, 2, -3932254, 393220, 2, -3932255, 393220, 2, -3932256, 393220, 2, -3932257, 4, 4, -2621509, 65540, 5, -2621510, 393220, 0, -2621511, 393220, 0, -2621512, 327684, 0, -2621513, 983044, 0, -3604555, 983044, 0, -3670092, 983044, 0, -3670093, 917508, 0, -3670094, 917508, 0, -3670095, 917508, 0, -3670096, 917508, 0, -3670097, 917508, 0, -3670098, 917508, 0, -3670099, 917508, 0, -3670100, 917508, 0, -3670101, 917508, 0, -3670102, 917508, 0, -3670103, 917508, 0, -3670104, 917508, 0, -3670105, 851972, 0, -3539019, 983044, 1, -3473483, 983044, 1, -3407947, 983044, 1, -3342411, 983044, 1, -3276875, 983044, 1, -3211339, 983044, 1, -3145803, 983044, 1, -3080267, 983044, 1, -3014731, 983044, 1, -2949195, 983044, 1, -2883659, 983044, 1, -2818123, 983044, 1, -2752587, 983044, 1, -3604556, 524292, 5, -3866721, 458756, 1, -3801185, 458756, 1, -3735649, 458756, 1, -3670113, 458756, 1, -3604577, 458756, 1, -3539041, 458756, 1, -3473505, 458756, 1, -3407969, 458756, 1, -3342433, 458756, 1, -3276897, 458756, 1, -3211361, 458756, 1, -3145825, 458756, 1, -3080289, 458756, 1, -3014753, 458756, 1, -2949217, 458756, 1, -2883681, 458756, 1, -2818145, 458756, 1, -2752609, 458756, 1, -2687073, 458756, 1, -2621537, 4, 5, -2621536, 393220, 0, -2621535, 393220, 0, -2621534, 393220, 0, -2621533, 393220, 0, -2621532, 393220, 0, -2621531, 393220, 0, -2621530, 393220, 0, -2621529, 393220, 0, -2621528, 393220, 0, -3604571, 851972, 0, -3539035, 851972, 1, -3473499, 851972, 1, -3276890, 851972, 1, -3211354, 851972, 1, -3145818, 851972, 1, -3080282, 851972, 2, -3080279, 917508, 3, -3604570, 917508, 0, -3604569, 589828, 5, -3080280, 917508, 2, -3080281, 917508, 2, -3080278, 917508, 2, -3080277, 983044, 3, -3080276, 917508, 2, -3080275, 917508, 2, -3014738, 851972, 1, -2949202, 851972, 1, -2883666, 851972, 1, -2818130, 851972, 1, -2752594, 589828, 5, -3080274, 589828, 4, -2621523, 851972, 1, -2621527, 393220, 0, -2621526, 393220, 0, -2621525, 393220, 0, -2621524, 458756, 0, -2752595, 851972, 0, -2687059, 851972, 1, -2752606, 917508, 2, -2752607, 851972, 2, -2818143, 851972, 1, -2883678, 524292, 0, -2949215, 851972, 0, -2883679, 851972, 1, -2949214, 917508, 0, -2949213, 983044, 0, -2752605, 917508, 2, -2818141, 589828, 1, -2818142, 589828, 0, -2752604, 917508, 2, -2752603, 917508, 3, -2883677, 524292, 5, -3407963, 851972, 2, -3407962, 589828, 4, -3342426, 851972, 1, -2818140, 524292, 1, -2883676, 917508, 0, -2883674, 983044, 0, -2883675, 917508, 0, -2818138, 983044, 1, -2752602, 983044, 2, -2818139, 524292, 0, -2687050, 983044, 0, -2621514, 524292, 5, -2687051, 524292, 5) -layer_6/tile_data = PackedInt32Array(-3473483, 983044, 0, -3473484, 917508, 0, -3604557, 983044, 0, -3604564, 917508, 0, -3473492, 917508, 2, -3539028, 524292, 1, -3604565, 917508, 0, -3604566, 851972, 0, -3473494, 851972, 2, -3539030, 851972, 1, -3539026, 524292, 0, -3604561, 917508, 0, -3473490, 589828, 4, -3604560, 917508, 0, -3604559, 917508, 0, -3604558, 917508, 0, -3539021, 983044, 1, -3473485, 524292, 5, -3145809, 917508, 2, -3145808, 917508, 2, -3407947, 983044, 1, -3342411, 983044, 1, -3276875, 983044, 1, -3211339, 983044, 1, -3145803, 983044, 1, -3407954, 851972, 1, -3342418, 851972, 1, -3276882, 851972, 1, -3211346, 851972, 1, -3539025, 589828, 0, -2949197, 917508, 3, -3080267, 983044, 1, -3014731, 983044, 1, -2949195, 983044, 2, -2949196, 917508, 2, -2949198, 917508, 2, -2949199, 851972, 2, -3014735, 851972, 1, -3080271, 851972, 1, -3145807, 589828, 4, -3604562, 917508, 0, -3604563, 917508, 0, -3539027, 589828, 0, -3473491, 917508, 2, -3145810, 851972, 2, -3473493, 917508, 3) +layer_6/tile_data = PackedInt32Array(-3473483, 983044, 0, -3473484, 917508, 0, -3604557, 983044, 0, -3604564, 917508, 0, -3473492, 917508, 2, -3539028, 524292, 1, -3604566, 851972, 0, -3473494, 851972, 2, -3539030, 851972, 1, -3539026, 524292, 0, -3604561, 917508, 0, -3473490, 589828, 4, -3604560, 917508, 0, -3604559, 917508, 0, -3604558, 917508, 0, -3539021, 983044, 1, -3473485, 524292, 5, -3145809, 917508, 2, -3145808, 917508, 2, -3407947, 983044, 1, -3342411, 983044, 1, -3276875, 983044, 1, -3211339, 983044, 1, -3145803, 983044, 1, -3342418, 851972, 1, -3276882, 851972, 1, -3211346, 851972, 1, -3539025, 589828, 0, -2949197, 917508, 3, -3080267, 983044, 1, -3014731, 983044, 1, -2949195, 983044, 2, -2949196, 917508, 2, -2949198, 917508, 2, -2949199, 851972, 2, -3014735, 851972, 1, -3080271, 851972, 1, -3145807, 589828, 4, -3604562, 917508, 0, -3604563, 917508, 0, -3539027, 589828, 0, -3473491, 917508, 2, -3145810, 851972, 2, -3473493, 917508, 3, -3407954, 851972, 1) layer_7/tile_data = PackedInt32Array(-3604571, 851972, 0, -3604570, 917508, 0, -3670105, 851972, 0, -3670104, 917508, 0, -3670103, 917508, 0, -3670102, 917508, 0, -3670101, 917508, 0, -3670100, 917508, 0, -3670099, 917508, 0, -3670098, 917508, 0, -3670097, 917508, 0, -3670096, 917508, 0, -3670095, 917508, 0, -3670094, 917508, 0, -3670093, 917508, 0, -3670092, 983044, 0, -3604555, 983044, 0) -layer_8/tile_data = PackedInt32Array(-3604566, 851972, 0, -3604565, 917508, 0, -3604564, 917508, 0, -3604563, 917508, 0, -3604562, 917508, 0, -3604561, 917508, 0, -3604560, 917508, 0, -3604559, 917508, 0, -3604558, 917508, 0, -3604557, 983044, 0, -3473483, 983044, 0, -3539021, 983044, 1, -3473484, 917508, 0) +layer_8/tile_data = PackedInt32Array(-3604566, 851972, 0, -3604564, 917508, 0, -3604563, 917508, 0, -3604562, 917508, 0, -3604561, 917508, 0, -3604560, 917508, 0, -3604559, 917508, 0, -3604558, 917508, 0, -3604557, 983044, 0, -3473483, 983044, 0, -3539021, 983044, 1, -3473484, 917508, 0, -3604565, 917508, 0) [node name="CollisionShape2D" type="CollisionShape2D" parent="Areas/Beta01"] position = Vector2(-1320, -808) @@ -405,7 +405,8 @@ position = Vector2(-1496, -712) position = Vector2(-1448, -688) [node name="Wood2" parent="Areas/Beta01/Objects" instance=ExtResource("9_o11s5")] -position = Vector2(-1352, -864) +z_index = 0 +position = Vector2(-1352, -856) [node name="Transitions" type="Node" parent="Areas/Beta01"] @@ -420,6 +421,9 @@ polygon = PackedVector2Array(-1320, -652, -1176, -652, -1176, -664, -1192, -664, [node name="CollisionPolygon2D2" type="CollisionPolygon2D" parent="Areas/Beta01/Transitions/Height1"] polygon = PackedVector2Array(-1192, -864, -1192, -888, -1208, -888, -1208, -904, -1416, -904, -1416, -888, -1448, -888, -1448, -848, -1432, -848, -1432, -768, -1320, -768, -1320, -848, -1384, -848, -1384, -896, -1216, -896, -1216, -864) +[node name="CollisionPolygon2D3" type="CollisionPolygon2D" parent="Areas/Beta01/Transitions/Height1"] +polygon = PackedVector2Array(-1432, -688, -1512, -688, -1512, -728, -1480, -728, -1480, -712, -1432, -712) + [node name="Height2" type="Area2D" parent="Areas/Beta01/Transitions"] z_index = 2 collision_layer = 0 diff --git a/Scenes/Start.gd b/Scenes/Start.gd index de9cdb1..5f1d810 100644 --- a/Scenes/Start.gd +++ b/Scenes/Start.gd @@ -2,7 +2,7 @@ extends Node func _ready(): - var scene = preload("res://Scenes/Maps/World3.tscn").instantiate() + var scene = preload("res://Scenes/Maps/Base01.tscn").instantiate() var player = preload("res://Scenes/Entities/Player.tscn").instantiate() Utilities.change_scene_with_player_to_position( scene, player, NodePath("InitialPlayerPosition"), "down" diff --git a/Scenes/Utilities.gd b/Scenes/Utilities.gd index f43a359..87c3539 100644 --- a/Scenes/Utilities.gd +++ b/Scenes/Utilities.gd @@ -100,6 +100,12 @@ func dialog(timeline: Variant): self.has_dialog = false +func get_enemy_children(parent: Node): + return parent.get_children().filter( + func(child: Node2D): return child.is_in_group("enemies") + ) + + func get_collision_shape_bounds(collision_shape: CollisionShape2D): var shape: Shape2D = collision_shape.shape var bounds @@ -175,3 +181,11 @@ class Collision: const SOLID = 4 const ENEMY = 5 const EXPLOSION = 6 + + +class Condition: + signal fulfilled + var function: Callable + + func check(): + return function.call() |