diff --git a/Scenes/ConveyorBelt.tscn b/Scenes/ConveyorBelt.tscn index 1eef011..98a9dd1 100644 --- a/Scenes/ConveyorBelt.tscn +++ b/Scenes/ConveyorBelt.tscn @@ -1,54 +1,10 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=4 format=2] -[ext_resource path="res://Sprites/conveyor_belt.png" type="Texture" id=1] +[ext_resource path="res://Tilesets/ConveyorBelt.tres" type="TileSet" id=1] [ext_resource path="res://Scripts/ConveyorBelt.gd" type="Script" id=2] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 640, 40 ) - -[sub_resource type="TileSet" id=2] -0/name = "conveyor_belt.png 0" -0/texture = ExtResource( 1 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 80, 80 ) -0/tile_mode = 0 -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shape_offset = Vector2( 0, 0 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape_one_way = false -0/shape_one_way_margin = 0.0 -0/shapes = [ ] -0/z_index = 0 -1/name = "conveyor_belt.png 1" -1/texture = ExtResource( 1 ) -1/tex_offset = Vector2( 0, 0 ) -1/modulate = Color( 1, 1, 1, 1 ) -1/region = Rect2( 80, 0, 80, 80 ) -1/tile_mode = 0 -1/occluder_offset = Vector2( 0, 0 ) -1/navigation_offset = Vector2( 0, 0 ) -1/shape_offset = Vector2( 0, 0 ) -1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -1/shape_one_way = false -1/shape_one_way_margin = 0.0 -1/shapes = [ ] -1/z_index = 0 -2/name = "conveyor_belt.png 2" -2/texture = ExtResource( 1 ) -2/tex_offset = Vector2( 0, 0 ) -2/modulate = Color( 1, 1, 1, 1 ) -2/region = Rect2( 160, 0, 80, 80 ) -2/tile_mode = 0 -2/occluder_offset = Vector2( 0, 0 ) -2/navigation_offset = Vector2( 0, 0 ) -2/shape_offset = Vector2( 0, 0 ) -2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -2/shape_one_way = false -2/shape_one_way_margin = 0.0 -2/shapes = [ ] -2/z_index = 0 +extents = Vector2( 640, 20 ) [node name="ConveyorBelt" type="StaticBody2D"] collision_layer = 4 @@ -59,7 +15,11 @@ script = ExtResource( 2 ) shape = SubResource( 1 ) [node name="TileMap" type="TileMap" parent="."] -tile_set = SubResource( 2 ) +position = Vector2( 0, -20 ) +tile_set = ExtResource( 1 ) cell_size = Vector2( 40, 40 ) +cell_quadrant_size = 40 +cell_tile_origin = 1 +centered_textures = true format = 1 -tile_data = PoolIntArray( -16, 0, 0, -14, 1, 0, -12, 1, 0, -10, 1, 0, -8, 1, 0, -6, 1, 0, -4, 1, 0, -2, 1, 0, -65536, 1, 0, -65534, 1, 0, -65532, 1, 0, -65530, 1, 0, -65528, 1, 0, -65526, 1, 0, -65524, 1, 0, -65522, 2, 0 ) +tile_data = PoolIntArray( 65520, 0, 0, 65521, 1, 0, 65522, 1, 0, 65523, 1, 0, 65524, 1, 0, 65525, 1, 0, 65526, 1, 0, 65527, 1, 0, 65528, 1, 0, 65529, 1, 0, 65530, 1, 0, 65531, 1, 0, 65532, 1, 0, 65533, 1, 0, 65534, 1, 0, 65535, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 3, 1, 0, 4, 1, 0, 5, 1, 0, 6, 1, 0, 7, 1, 0, 8, 1, 0, 9, 1, 0, 10, 1, 0, 11, 1, 0, 12, 1, 0, 13, 1, 0, 14, 1, 0, 15, 2, 0 ) diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn index d65b84a..7019148 100644 --- a/Scenes/Player.tscn +++ b/Scenes/Player.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://Sprites/placeholder_cat.jpg" type="Texture" id=1] +[ext_resource path="res://Sprites/player_danny_devito.png" type="Texture" id=1] [ext_resource path="res://Scripts/Player.gd" type="Script" id=2] [sub_resource type="RectangleShape2D" id=1] -extents = Vector2( 22.5, 22.5 ) +extents = Vector2( 20, 20 ) [node name="Player" type="KinematicBody2D"] collision_layer = 2 @@ -15,7 +15,6 @@ jump_speed = 500.0 jump_buffer_msec = 64.0 [node name="Sprite" type="Sprite" parent="."] -scale = Vector2( 0.25, 0.25 ) texture = ExtResource( 1 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] diff --git a/Sprites/conveyor_belt.png b/Sprites/conveyor_belt.png index 510f1cb..d21aa9f 100644 --- a/Sprites/conveyor_belt.png +++ b/Sprites/conveyor_belt.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f12b5ec006ffd6624d8b0565103578d0e22ba227ceea0d3f4f8a7f0b235de17b -size 1350 +oid sha256:eb32e35ec937887ebea73a839bb274a8cc2185caecf249e1cfdc630f55c99a6a +size 935 diff --git a/Sprites/player_danny_devito.png b/Sprites/player_danny_devito.png new file mode 100644 index 0000000..0128973 --- /dev/null +++ b/Sprites/player_danny_devito.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:093e2304f69bed8018a1927c41a8e5d1b36b151cabb8a5a82b02b605b7fdc242 +size 631 diff --git a/Sprites/player_danny_devito.png.import b/Sprites/player_danny_devito.png.import new file mode 100644 index 0000000..b20c36d --- /dev/null +++ b/Sprites/player_danny_devito.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/player_danny_devito.png-2a46a24b91158d4837fb551c1dde7ed7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/player_danny_devito.png" +dest_files=[ "res://.import/player_danny_devito.png-2a46a24b91158d4837fb551c1dde7ed7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/Tilesets/ConveyorBelt.tres b/Tilesets/ConveyorBelt.tres new file mode 100644 index 0000000..33f5d76 --- /dev/null +++ b/Tilesets/ConveyorBelt.tres @@ -0,0 +1,47 @@ +[gd_resource type="TileSet" load_steps=2 format=2] + +[ext_resource path="res://Sprites/conveyor_belt.png" type="Texture" id=1] + +[resource] +0/name = "conveyor_belt.png 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 40, 40 ) +0/tile_mode = 0 +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 +1/name = "conveyor_belt.png 1" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 40, 0, 40, 40 ) +1/tile_mode = 0 +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +1/shape_one_way = false +1/shape_one_way_margin = 0.0 +1/shapes = [ ] +1/z_index = 0 +2/name = "conveyor_belt.png 2" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/modulate = Color( 1, 1, 1, 1 ) +2/region = Rect2( 80, 0, 40, 40 ) +2/tile_mode = 0 +2/occluder_offset = Vector2( 0, 0 ) +2/navigation_offset = Vector2( 0, 0 ) +2/shape_offset = Vector2( 0, 0 ) +2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +2/shape_one_way = false +2/shape_one_way_margin = 0.0 +2/shapes = [ ] +2/z_index = 0