summaryrefslogtreecommitdiff
path: root/Scenes/Maps
diff options
context:
space:
mode:
Diffstat (limited to 'Scenes/Maps')
-rw-r--r--Scenes/Maps/Base01.gd32
-rw-r--r--Scenes/Maps/Base01.tscn2
-rw-r--r--Scenes/Maps/World3.gd12
-rw-r--r--Scenes/Maps/World3.tscn2
4 files changed, 18 insertions, 30 deletions
diff --git a/Scenes/Maps/Base01.gd b/Scenes/Maps/Base01.gd
index 83947e4..96e5520 100644
--- a/Scenes/Maps/Base01.gd
+++ b/Scenes/Maps/Base01.gd
@@ -69,18 +69,20 @@ func place_boxes(
var tile_size = tilemap.tile_set.tile_size
for entity in entry_entities:
placeable_cells.erase(tilemap.local_to_map(entity.position))
- placeable_cells.erase(tilemap.local_to_map(
- entity.position + Vector2(0, tile_size.y)
- ))
- placeable_cells.erase(tilemap.local_to_map(
- entity.position + Vector2(tile_size.x, 0)
- ))
- placeable_cells.erase(tilemap.local_to_map(
- entity.position + Vector2(0, -tile_size.y)
- ))
- placeable_cells.erase(tilemap.local_to_map(
- entity.position + Vector2(-tile_size.x, 0)
- ))
+ # erase in 2 times around
+ for n in range(1, 3):
+ placeable_cells.erase(tilemap.local_to_map(
+ entity.position + Vector2(0, tile_size.y * n)
+ ))
+ placeable_cells.erase(tilemap.local_to_map(
+ entity.position + Vector2(tile_size.x * n, 0)
+ ))
+ placeable_cells.erase(tilemap.local_to_map(
+ entity.position + Vector2(0, -tile_size.y * n)
+ ))
+ placeable_cells.erase(tilemap.local_to_map(
+ entity.position + Vector2(-tile_size.x * n, 0)
+ ))
if include_edges:
var rect := tilemap.get_used_rect()
@@ -103,14 +105,12 @@ 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()
)
+
+ condition.check()
func door_condition_enemies(enemies: Array):
var condition = Utilities.Condition.new()
diff --git a/Scenes/Maps/Base01.tscn b/Scenes/Maps/Base01.tscn
index 129a7fe..a8d209a 100644
--- a/Scenes/Maps/Base01.tscn
+++ b/Scenes/Maps/Base01.tscn
@@ -133,7 +133,7 @@ position = Vector2(-360, -440)
shape = SubResource("RectangleShape2D_gndue")
[node name="InitialPlayerPosition" type="Node2D" parent="."]
-position = Vector2(-120, -328)
+position = Vector2(-120, -376)
[editable path="Areas/MapArea"]
[editable path="Areas/MapArea2"]
diff --git a/Scenes/Maps/World3.gd b/Scenes/Maps/World3.gd
index d9e8399..1daecb9 100644
--- a/Scenes/Maps/World3.gd
+++ b/Scenes/Maps/World3.gd
@@ -31,31 +31,19 @@ func _ready():
get_node("Areas/Beta01/Transitions/Height1").body_entered.connect(func(body):
body.z_index = 3
- if body is Player:
- print(body.z_index)
)
get_node("Areas/Beta01/Transitions/Height1").body_exited.connect(func(body):
body.z_index = 0
- if body is Player:
- print(body.z_index)
)
get_node("Areas/Beta01/Transitions/Height2").body_entered.connect(func(body):
body.z_index = 5
- if body is Player:
- print(body.z_index)
)
get_node("Areas/Beta01/Transitions/Height2").body_exited.connect(func(body):
body.z_index = 3
- if body is Player:
- print(body.z_index)
)
get_node("Areas/Beta02/Transitions/Height1").body_entered.connect(func(body):
body.z_index = 3
- if body is Player:
- print(body.z_index)
)
get_node("Areas/Beta02/Transitions/Height1").body_exited.connect(func(body):
body.z_index = 0
- if body is Player:
- print(body.z_index)
)
diff --git a/Scenes/Maps/World3.tscn b/Scenes/Maps/World3.tscn
index 0962a38..698a979 100644
--- a/Scenes/Maps/World3.tscn
+++ b/Scenes/Maps/World3.tscn
@@ -480,7 +480,7 @@ collision_mask = 18
polygon = PackedVector2Array(-1296, -592, -1160, -592, -1160, -636, -1328, -637, -1328, -616, -1368, -616, -1368, -496, -1352, -496, -1352, -464, -1256, -464, -1256, -504, -1288, -504, -1288, -488, -1320, -488, -1320, -520, -1336, -520, -1336, -592)
[node name="InitialPlayerPosition" type="Node2D" parent="."]
-position = Vector2(-1416, -528)
+position = Vector2(24, 128)
[editable path="Areas/Alpha"]
[editable path="Areas/LForest1"]