From 855ba9f0e276f377583b1ab3bc1f18af34882dcb Mon Sep 17 00:00:00 2001 From: vaporvee Date: Sun, 13 Nov 2022 13:40:58 +0100 Subject: [PATCH] changed speed --- src/Player.cs | 2 +- tilesets/Background.tres | 115 +++++++++++++++++++++++++++++++++- tilesets/foreground_test.tres | 10 +-- 3 files changed, 118 insertions(+), 9 deletions(-) diff --git a/src/Player.cs b/src/Player.cs index d2e4af6..11bc8af 100644 --- a/src/Player.cs +++ b/src/Player.cs @@ -4,7 +4,7 @@ using System; public class Player : KinematicBody2D { [Export] - public int speed = 600; + public int speed = 400; public override void _PhysicsProcess(float delta) { diff --git a/tilesets/Background.tres b/tilesets/Background.tres index 13a5edf..8cfb633 100644 --- a/tilesets/Background.tres +++ b/tilesets/Background.tres @@ -1,7 +1,43 @@ -[gd_resource type="TileSet" load_steps=2 format=2] +[gd_resource type="TileSet" load_steps=14 format=2] [ext_resource path="res://assets/textures/test_background_tileset.png" type="Texture" id=1] +[sub_resource type="ConvexPolygonShape2D" id=1] +points = PoolVector2Array( 512, 512, 480, 512, 480, 0, 512, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] +points = PoolVector2Array( 512, 512, 480, 512, 480, 32, 512, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] +points = PoolVector2Array( 512, 32, 0, 32, 0, 0, 512, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] +points = PoolVector2Array( 512, 32, 0, 32, 0, 0, 512, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] +points = PoolVector2Array( 0, 0, 512, 0, 512, 32, 0, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] +points = PoolVector2Array( 0, 32, 32, 32, 32, 512, 0, 512 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] +points = PoolVector2Array( 32, 512, 0, 512, 0, 0, 32, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] +points = PoolVector2Array( 512, 512, 0, 512, 0, 480, 512, 480 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] +points = PoolVector2Array( 32, 512, 0, 512, 0, 0, 32, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] +points = PoolVector2Array( 32, 480, 512, 480, 512, 512, 32, 512 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] +points = PoolVector2Array( 512, 512, 480, 512, 480, 0, 512, 0 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] +points = PoolVector2Array( 480, 512, 0, 512, 0, 480, 480, 480 ) + [resource] 0/name = "test_background_tileset.png 0" 0/texture = ExtResource( 1 ) @@ -22,7 +58,80 @@ 0/navigation_offset = Vector2( 0, 0 ) 0/shape_offset = Vector2( 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape = SubResource( 1 ) 0/shape_one_way = false -0/shape_one_way_margin = 0.0 -0/shapes = [ ] +0/shape_one_way_margin = 1.0 +0/shapes = [ { +"autotile_coord": Vector2( 2, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 1 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 2 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 3 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 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 ) +}, { +"autotile_coord": Vector2( 0, 0 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 6 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 1 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 7 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 1, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 8 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 9 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 0, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 10 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 11 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +}, { +"autotile_coord": Vector2( 2, 2 ), +"one_way": false, +"one_way_margin": 1.0, +"shape": SubResource( 12 ), +"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) +} ] 0/z_index = 0 diff --git a/tilesets/foreground_test.tres b/tilesets/foreground_test.tres index 68cab7e..edfbebf 100644 --- a/tilesets/foreground_test.tres +++ b/tilesets/foreground_test.tres @@ -11,13 +11,13 @@ 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=8] +[sub_resource type="ConvexPolygonShape2D" id=8] -[sub_resource type="ConcavePolygonShape2D" id=9] -segments = PoolVector2Array( 0, 0, 64, 0, 64, 0, 64, 64, 64, 64, 0, 64, 0, 64, 0, 0 ) +[sub_resource type="ConvexPolygonShape2D" id=9] +points = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) -[sub_resource type="ConcavePolygonShape2D" id=10] -segments = PoolVector2Array( 64, 64, 0, 64, 0, 64, 0, 0, 0, 0, 64, 0, 64, 0, 64, 64 ) +[sub_resource type="ConvexPolygonShape2D" id=10] +points = PoolVector2Array( 64, 64, 0, 64, 0, 0, 64, 0 ) [sub_resource type="NavigationPolygon" id=6] vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )