Added collision boxes to level

This commit is contained in:
2024-09-09 17:21:09 +03:00
parent 18b9c4a63e
commit 6776086c3e
5 changed files with 63 additions and 7 deletions
+45 -3
View File
@@ -1,8 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://c1h0h1viac0gy"]
[gd_scene load_steps=13 format=3 uid="uid://c1h0h1viac0gy"]
[ext_resource type="Script" path="res://level.gd" id="1_t0agp"]
[ext_resource type="Texture2D" uid="uid://b6wbb26dayco1" path="res://data/images/Forest.png" id="2_acuqw"]
[ext_resource type="Texture2D" uid="uid://cueeywtu6xdbv" path="res://data/images/Fierd.png" id="3_uas50"]
[ext_resource type="Texture2D" uid="uid://cueeywtu6xdbv" path="res://data/images/Field.png" id="3_uas50"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ux773"]
texture = ExtResource("2_acuqw")
@@ -54,8 +54,50 @@ texture = ExtResource("3_uas50")
sources/0 = SubResource("TileSetAtlasSource_ux773")
sources/1 = SubResource("TileSetAtlasSource_yfk20")
[node name="Level" type="Node2D"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5p18l"]
size = Vector2(16, 176)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5hg31"]
size = Vector2(16, 176)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_j8f03"]
size = Vector2(16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0blxn"]
size = Vector2(16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tnbqo"]
size = Vector2(16, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_531kt"]
size = Vector2(16, 16)
[node name="Level" type="StaticBody2D"]
script = ExtResource("1_t0agp")
[node name="TileMapLayer" type="TileMapLayer" parent="."]
tile_set = SubResource("TileSet_e0bu0")
[node name="CollisionBoxLeft" type="CollisionShape2D" parent="."]
position = Vector2(8, 88)
shape = SubResource("RectangleShape2D_5p18l")
[node name="CollisionBoxRight" type="CollisionShape2D" parent="."]
position = Vector2(312, 88)
shape = SubResource("RectangleShape2D_5hg31")
[node name="CollisionBoxTopLeft" type="CollisionShape2D" parent="."]
position = Vector2(24, 8)
shape = SubResource("RectangleShape2D_j8f03")
[node name="CollisionBoxTopRight" type="CollisionShape2D" parent="."]
position = Vector2(296, 8)
shape = SubResource("RectangleShape2D_0blxn")
[node name="CollisionBoxBottomLeft" type="CollisionShape2D" parent="."]
position = Vector2(24, 168)
shape = SubResource("RectangleShape2D_tnbqo")
[node name="CollisionBoxBottomRight" type="CollisionShape2D" parent="."]
position = Vector2(296, 168)
shape = SubResource("RectangleShape2D_531kt")