summaryrefslogtreecommitdiff
path: root/Assets/Map
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-09-28 15:27:57 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-09-28 15:27:57 +0200
commit6032b3dc82ccbb3710061059c90b7db40df19673 (patch)
treea99682fb23bcd8a1ddd01f4f137bee2d46fa4b1f /Assets/Map
parenta38f65c261e9d7b23d046cb76b5aeedc05c4b54d (diff)
next commitHEADmain
Diffstat (limited to 'Assets/Map')
-rw-r--r--Assets/Map/DroppablePlatform01.tscn23
-rw-r--r--Assets/Map/DroppablePlatform02.tscn29
-rw-r--r--Assets/Map/DroppablePlatform03.tscn35
-rw-r--r--Assets/Map/TileMapLayer.tscn20
-rw-r--r--Assets/Map/droppable_platform_01.gd20
-rw-r--r--Assets/Map/potion.png~bin0 -> 224 bytes
-rw-r--r--Assets/Map/tileset.pngbin40520 -> 40587 bytes
-rw-r--r--Assets/Map/tileset.png~bin40529 -> 40588 bytes
8 files changed, 126 insertions, 1 deletions
diff --git a/Assets/Map/DroppablePlatform01.tscn b/Assets/Map/DroppablePlatform01.tscn
new file mode 100644
index 0000000..345fd4b
--- /dev/null
+++ b/Assets/Map/DroppablePlatform01.tscn
@@ -0,0 +1,23 @@
+[gd_scene load_steps=4 format=3 uid="uid://cltusavcxucip"]
+
+[ext_resource type="Script" path="res://Assets/Map/droppable_platform_01.gd" id="1_npqdr"]
+[ext_resource type="Texture2D" uid="uid://mcgvpb1lh3ve" path="res://Assets/Map/tileset.png" id="2_s554b"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_fmc1n"]
+size = Vector2(48, 1)
+
+[node name="DroppablePlatform01" type="StaticBody2D" groups=["droppable_platforms"]]
+collision_layer = 4112
+collision_mask = 0
+script = ExtResource("1_npqdr")
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+texture_filter = 1
+texture = ExtResource("2_s554b")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+position = Vector2(0, -7.5)
+shape = SubResource("RectangleShape2D_fmc1n")
+one_way_collision = true
diff --git a/Assets/Map/DroppablePlatform02.tscn b/Assets/Map/DroppablePlatform02.tscn
new file mode 100644
index 0000000..1050b8c
--- /dev/null
+++ b/Assets/Map/DroppablePlatform02.tscn
@@ -0,0 +1,29 @@
+[gd_scene load_steps=3 format=3 uid="uid://dhkkcjjqk7xmc"]
+
+[ext_resource type="Texture2D" uid="uid://mcgvpb1lh3ve" path="res://Assets/Map/tileset.png" id="1_ipgq4"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_fmc1n"]
+size = Vector2(32, 1)
+
+[node name="DroppablePlatform01" type="StaticBody2D" groups=["droppable_platforms"]]
+collision_layer = 16
+collision_mask = 0
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+texture_filter = 1
+position = Vector2(-8, 0)
+texture = ExtResource("1_ipgq4")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="Sprite2D2" type="Sprite2D" parent="."]
+texture_filter = 1
+position = Vector2(8, 0)
+texture = ExtResource("1_ipgq4")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+position = Vector2(0, -7.5)
+shape = SubResource("RectangleShape2D_fmc1n")
+one_way_collision = true
diff --git a/Assets/Map/DroppablePlatform03.tscn b/Assets/Map/DroppablePlatform03.tscn
new file mode 100644
index 0000000..03f680b
--- /dev/null
+++ b/Assets/Map/DroppablePlatform03.tscn
@@ -0,0 +1,35 @@
+[gd_scene load_steps=3 format=3 uid="uid://cdtfard8j7uj"]
+
+[ext_resource type="Texture2D" uid="uid://mcgvpb1lh3ve" path="res://Assets/Map/tileset.png" id="1_s4aiw"]
+
+[sub_resource type="RectangleShape2D" id="RectangleShape2D_fmc1n"]
+size = Vector2(48, 0.5)
+
+[node name="DroppablePlatform01" type="StaticBody2D" groups=["droppable_platforms"]]
+collision_layer = 16
+collision_mask = 0
+
+[node name="Sprite2D" type="Sprite2D" parent="."]
+texture_filter = 1
+position = Vector2(-16, 0)
+texture = ExtResource("1_s4aiw")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="Sprite2D2" type="Sprite2D" parent="."]
+texture_filter = 1
+texture = ExtResource("1_s4aiw")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="Sprite2D3" type="Sprite2D" parent="."]
+texture_filter = 1
+position = Vector2(16, 0)
+texture = ExtResource("1_s4aiw")
+region_enabled = true
+region_rect = Rect2(91, 19, 16, 16)
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+position = Vector2(0, -7.75)
+shape = SubResource("RectangleShape2D_fmc1n")
+one_way_collision = true
diff --git a/Assets/Map/TileMapLayer.tscn b/Assets/Map/TileMapLayer.tscn
index f304f16..49b6be9 100644
--- a/Assets/Map/TileMapLayer.tscn
+++ b/Assets/Map/TileMapLayer.tscn
@@ -1,7 +1,10 @@
-[gd_scene load_steps=6 format=3 uid="uid://b1si77qfmut5x"]
+[gd_scene load_steps=10 format=3 uid="uid://b1si77qfmut5x"]
[ext_resource type="Texture2D" uid="uid://mcgvpb1lh3ve" path="res://Assets/Map/tileset.png" id="1_odmhe"]
+[ext_resource type="PackedScene" uid="uid://cltusavcxucip" path="res://Assets/Map/DroppablePlatform01.tscn" id="2_5xc4i"]
[ext_resource type="Script" path="res://Assets/Map/tile_map_layer.gd" id="2_qi2a0"]
+[ext_resource type="PackedScene" uid="uid://dhkkcjjqk7xmc" path="res://Assets/Map/DroppablePlatform02.tscn" id="3_2l35j"]
+[ext_resource type="PackedScene" uid="uid://cdtfard8j7uj" path="res://Assets/Map/DroppablePlatform03.tscn" id="4_3obh5"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_3qgmv"]
friction = 0.0
@@ -42,6 +45,9 @@ separation = Vector2i(2, 2)
3:1/0 = 0
4:1/0 = 0
5:1/0 = 0
+5:1/0/y_sort_origin = -8
+5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, -3, 8, -3, 8, -8)
+5:1/0/physics_layer_0/polygon_0/one_way = true
6:1/0 = 0
7:1/0 = 0
8:1/0 = 0
@@ -90,6 +96,7 @@ separation = Vector2i(2, 2)
28:2/0 = 0
29:2/0 = 0
0:3/0 = 0
+0:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, 8, 8, 8, 8, -8)
1:3/0 = 0
2:3/0 = 0
3:3/0 = 0
@@ -106,10 +113,14 @@ separation = Vector2i(2, 2)
14:3/0 = 0
15:3/0 = 0
16:3/0 = 0
+16:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, 8, 8, 8, 8, -8)
17:3/0 = 0
+17:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, 8, 8, 8, 8, -8)
18:3/0 = 0
+18:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, 8, 8, 8, 8, -8)
19:3/0 = 0
20:3/0 = 0
+20:3/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
23:3/0 = 0
24:3/0 = 0
25:3/0 = 0
@@ -501,6 +512,12 @@ separation = Vector2i(2, 2)
26:6/animation_frame_1/duration = 0.5
26:6/0 = 0
26:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, -8, 8, 8, 8, 8, -8)
+29:8/0 = 0
+
+[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_pe6ej"]
+scenes/1/scene = ExtResource("2_5xc4i")
+scenes/4/scene = ExtResource("3_2l35j")
+scenes/5/scene = ExtResource("4_3obh5")
[sub_resource type="TileSet" id="TileSet_8jo18"]
physics_layer_0/collision_layer = 16
@@ -509,6 +526,7 @@ physics_layer_1/collision_layer = 128
physics_layer_1/collision_mask = 0
physics_layer_1/physics_material = SubResource("PhysicsMaterial_3qgmv")
sources/0 = SubResource("TileSetAtlasSource_iu5yc")
+sources/1 = SubResource("TileSetScenesCollectionSource_pe6ej")
[node name="TileMapLayer" type="TileMapLayer"]
texture_filter = 1
diff --git a/Assets/Map/droppable_platform_01.gd b/Assets/Map/droppable_platform_01.gd
new file mode 100644
index 0000000..7f8b276
--- /dev/null
+++ b/Assets/Map/droppable_platform_01.gd
@@ -0,0 +1,20 @@
+@tool
+extends StaticBody2D
+
+
+@export var width = 1
+
+
+func _ready() -> void:
+ var sprite_width = $Sprite2D.region_rect.size.x
+
+ if width > 1:
+ for n in range(width - 1):
+ var next_sprite = $Sprite2D.duplicate()
+ if Engine.is_editor_hint():
+ next_sprite.owner = get_tree().edited_scene_root
+ next_sprite.position.x = sprite_width * (n + 1)
+ add_child(next_sprite)
+
+ $CollisionShape2D.shape.size.x = sprite_width * width
+ $CollisionShape2D.position.x = ((sprite_width * width) / 2) - (sprite_width / 2)
diff --git a/Assets/Map/potion.png~ b/Assets/Map/potion.png~
new file mode 100644
index 0000000..acf9eaa
--- /dev/null
+++ b/Assets/Map/potion.png~
Binary files differ
diff --git a/Assets/Map/tileset.png b/Assets/Map/tileset.png
index ee740c1..e9cc47a 100644
--- a/Assets/Map/tileset.png
+++ b/Assets/Map/tileset.png
Binary files differ
diff --git a/Assets/Map/tileset.png~ b/Assets/Map/tileset.png~
index abbf411..a764e16 100644
--- a/Assets/Map/tileset.png~
+++ b/Assets/Map/tileset.png~
Binary files differ