added collision

This commit is contained in:
2022-11-12 12:59:30 +01:00
parent 906738514b
commit b8e6fe9426
6 changed files with 57 additions and 22 deletions

View File

@@ -1,7 +1,23 @@
[gd_resource type="TileSet" load_steps=2 format=2]
[gd_resource type="TileSet" load_steps=7 format=2]
[ext_resource path="res://assets/textures/cupcake.png" type="Texture" id=1]
[sub_resource type="NavigationPolygon" id=1]
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
outlines = [ PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) ]
[sub_resource type="OccluderPolygon2D" id=2]
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
[sub_resource type="ConcavePolygonShape2D" id=3]
segments = PoolVector2Array( 0, 0, 64, 0, 64, 0, 64, 64, 64, 64, 0, 64, 0, 64, 0, 0 )
[sub_resource type="ConcavePolygonShape2D" id=4]
segments = PoolVector2Array( 64, 64, 0, 64, 0, 64, 0, 0, 0, 0, 64, 0, 64, 0, 64, 64 )
[sub_resource type="ConvexPolygonShape2D" id=5]
[resource]
0/name = "cupcake.png 0"
0/texture = ExtResource( 1 )
@@ -10,16 +26,31 @@
0/region = Rect2( 0, 0, 64, 64 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/occluder = SubResource( 2 )
0/navigation_offset = Vector2( 0, 0 )
0/navigation = SubResource( 1 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = SubResource( 3 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": null,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
0/z_index = 0