world tilemap
This commit is contained in:
BIN
aseprite/grass_tilemap.aseprite
Normal file
BIN
aseprite/grass_tilemap.aseprite
Normal file
Binary file not shown.
Binary file not shown.
BIN
assets/textures/spritesheets/hood_player.png
Normal file
BIN
assets/textures/spritesheets/hood_player.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
40
assets/textures/spritesheets/hood_player.png.import
Normal file
40
assets/textures/spritesheets/hood_player.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c12v1hnrbfjr4"
|
||||||
|
path="res://.godot/imported/hood_player.png-6c2f9e5710e5416c4bf1853ba3b50627.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/textures/spritesheets/hood_player.png"
|
||||||
|
dest_files=["res://.godot/imported/hood_player.png-6c2f9e5710e5416c4bf1853ba3b50627.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
BIN
assets/textures/tilemaps/grass_tilemap.png
Normal file
BIN
assets/textures/tilemaps/grass_tilemap.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 481 B |
40
assets/textures/tilemaps/grass_tilemap.png.import
Normal file
40
assets/textures/tilemaps/grass_tilemap.png.import
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dve2b2glwitsw"
|
||||||
|
path="res://.godot/imported/grass_tilemap.png-de5493da83e3ee84719d7aa1394438db.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/textures/tilemaps/grass_tilemap.png"
|
||||||
|
dest_files=["res://.godot/imported/grass_tilemap.png-de5493da83e3ee84719d7aa1394438db.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -94,7 +94,8 @@ common/physics_interpolation=true
|
|||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
textures/canvas_textures/default_texture_filter=3
|
textures/canvas_textures/default_texture_filter=0
|
||||||
|
textures/default_filters/use_nearest_mipmap_filter=true
|
||||||
anti_aliasing/quality/msaa_2d=3
|
anti_aliasing/quality/msaa_2d=3
|
||||||
anti_aliasing/quality/screen_space_aa=2
|
anti_aliasing/quality/screen_space_aa=2
|
||||||
anti_aliasing/quality/use_taa=true
|
anti_aliasing/quality/use_taa=true
|
||||||
|
|||||||
@@ -1,10 +1,202 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://clnb1eshis30m"]
|
[gd_scene load_steps=5 format=4 uid="uid://clnb1eshis30m"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dve2b2glwitsw" path="res://assets/textures/tilemaps/grass_tilemap.png" id="1_74em3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dfbomt0l6b1o4" path="res://scenes/player.tscn" id="1_ge1l5"]
|
[ext_resource type="PackedScene" uid="uid://dfbomt0l6b1o4" path="res://scenes/player.tscn" id="1_ge1l5"]
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_1r5ec"]
|
||||||
|
texture = ExtResource("1_74em3")
|
||||||
|
texture_region_size = Vector2i(32, 32)
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/terrain_set = 0
|
||||||
|
0:0/0/terrain = 1
|
||||||
|
0:0/0/terrains_peering_bit/right_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
0:0/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
0:0/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
0:0/0/terrains_peering_bit/left_side = 1
|
||||||
|
0:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:0/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/terrain_set = 0
|
||||||
|
1:0/0/terrain = 1
|
||||||
|
1:0/0/terrains_peering_bit/right_side = 1
|
||||||
|
1:0/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
1:0/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
1:0/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
1:0/0/terrains_peering_bit/left_side = 0
|
||||||
|
1:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:0/0/terrains_peering_bit/top_side = 1
|
||||||
|
1:0/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/terrain_set = 0
|
||||||
|
2:0/0/terrain = 1
|
||||||
|
2:0/0/terrains_peering_bit/right_side = 1
|
||||||
|
2:0/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
2:0/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
2:0/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
2:0/0/terrains_peering_bit/left_side = 1
|
||||||
|
2:0/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
2:0/0/terrains_peering_bit/top_side = 1
|
||||||
|
2:0/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
3:0/0 = 0
|
||||||
|
3:0/0/terrain_set = 0
|
||||||
|
3:0/0/terrain = 1
|
||||||
|
3:0/0/terrains_peering_bit/right_side = 1
|
||||||
|
3:0/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
3:0/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
3:0/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
3:0/0/terrains_peering_bit/left_side = 1
|
||||||
|
3:0/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
3:0/0/terrains_peering_bit/top_side = 0
|
||||||
|
3:0/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/terrain_set = 0
|
||||||
|
0:1/0/terrain = 1
|
||||||
|
0:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
0:1/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
0:1/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
0:1/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
0:1/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
0:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
0:1/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/terrain_set = 0
|
||||||
|
1:1/0/terrain = 1
|
||||||
|
1:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
1:1/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
1:1/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
1:1/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
1:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
1:1/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
1:1/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/terrain_set = 0
|
||||||
|
2:1/0/terrain = 1
|
||||||
|
2:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
2:1/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
2:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
2:1/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/terrain_set = 0
|
||||||
|
3:1/0/terrain = 1
|
||||||
|
3:1/0/terrains_peering_bit/right_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
3:1/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
3:1/0/terrains_peering_bit/left_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_side = 1
|
||||||
|
3:1/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
0:2/0 = 0
|
||||||
|
0:2/0/terrain_set = 0
|
||||||
|
0:2/0/terrain = 1
|
||||||
|
0:2/0/terrains_peering_bit/right_side = 1
|
||||||
|
0:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
0:2/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
0:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:2/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:2/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:2/0/terrains_peering_bit/top_side = 1
|
||||||
|
0:2/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
1:2/0 = 0
|
||||||
|
1:2/0/terrain_set = 0
|
||||||
|
1:2/0/terrain = 1
|
||||||
|
1:2/0/terrains_peering_bit/right_side = 1
|
||||||
|
1:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
1:2/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
1:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
1:2/0/terrains_peering_bit/left_side = 1
|
||||||
|
1:2/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
1:2/0/terrains_peering_bit/top_side = 1
|
||||||
|
1:2/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
2:2/0 = 0
|
||||||
|
2:2/0/terrain_set = 0
|
||||||
|
2:2/0/terrain = 1
|
||||||
|
2:2/0/terrains_peering_bit/right_side = 1
|
||||||
|
2:2/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
2:2/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
2:2/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
2:2/0/terrains_peering_bit/left_side = 1
|
||||||
|
2:2/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
2:2/0/terrains_peering_bit/top_side = 1
|
||||||
|
2:2/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
3:2/0 = 0
|
||||||
|
3:2/0/terrain_set = 0
|
||||||
|
3:2/0/terrain = 1
|
||||||
|
3:2/0/terrains_peering_bit/right_side = 0
|
||||||
|
3:2/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
3:2/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
3:2/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
3:2/0/terrains_peering_bit/left_side = 1
|
||||||
|
3:2/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
3:2/0/terrains_peering_bit/top_side = 1
|
||||||
|
3:2/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
0:3/0 = 0
|
||||||
|
0:3/0/terrain_set = 0
|
||||||
|
0:3/0/terrain = 0
|
||||||
|
0:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
0:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
0:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
0:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
0:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
0:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
0:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
0:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
1:3/0 = 0
|
||||||
|
1:3/0/terrain_set = 0
|
||||||
|
1:3/0/terrain = 1
|
||||||
|
1:3/0/terrains_peering_bit/right_side = 1
|
||||||
|
1:3/0/terrains_peering_bit/bottom_right_corner = 1
|
||||||
|
1:3/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
1:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
1:3/0/terrains_peering_bit/left_side = 0
|
||||||
|
1:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
1:3/0/terrains_peering_bit/top_side = 0
|
||||||
|
1:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
2:3/0 = 0
|
||||||
|
2:3/0/terrain_set = 0
|
||||||
|
2:3/0/terrain = 1
|
||||||
|
2:3/0/terrains_peering_bit/right_side = 1
|
||||||
|
2:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
2:3/0/terrains_peering_bit/bottom_side = 1
|
||||||
|
2:3/0/terrains_peering_bit/bottom_left_corner = 1
|
||||||
|
2:3/0/terrains_peering_bit/left_side = 1
|
||||||
|
2:3/0/terrains_peering_bit/top_left_corner = 0
|
||||||
|
2:3/0/terrains_peering_bit/top_side = 1
|
||||||
|
2:3/0/terrains_peering_bit/top_right_corner = 1
|
||||||
|
3:3/0 = 0
|
||||||
|
3:3/0/terrain_set = 0
|
||||||
|
3:3/0/terrain = 1
|
||||||
|
3:3/0/terrains_peering_bit/right_side = 0
|
||||||
|
3:3/0/terrains_peering_bit/bottom_right_corner = 0
|
||||||
|
3:3/0/terrains_peering_bit/bottom_side = 0
|
||||||
|
3:3/0/terrains_peering_bit/bottom_left_corner = 0
|
||||||
|
3:3/0/terrains_peering_bit/left_side = 1
|
||||||
|
3:3/0/terrains_peering_bit/top_left_corner = 1
|
||||||
|
3:3/0/terrains_peering_bit/top_side = 1
|
||||||
|
3:3/0/terrains_peering_bit/top_right_corner = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSet" id="TileSet_ge1l5"]
|
||||||
|
tile_size = Vector2i(32, 32)
|
||||||
|
terrain_set_0/mode = 0
|
||||||
|
terrain_set_0/terrain_0/name = "Grass"
|
||||||
|
terrain_set_0/terrain_0/color = Color(0, 0.53558326, 0.2235117, 1)
|
||||||
|
terrain_set_0/terrain_1/name = "Dirt"
|
||||||
|
terrain_set_0/terrain_1/color = Color(0.5, 0.34375, 0.25, 1)
|
||||||
|
sources/2 = SubResource("TileSetAtlasSource_1r5ec")
|
||||||
|
|
||||||
[node name="Hood" type="Node2D"]
|
[node name="Hood" type="Node2D"]
|
||||||
|
|
||||||
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
[node name="TileMapLayer" type="TileMapLayer" parent="."]
|
||||||
|
tile_map_data = PackedByteArray("AAAAAAAAAgAAAAMAAAAMAAgAAgAAAAMAAAAMAAcAAgAAAAMAAAAMAAYAAgAAAAMAAAAMAAUAAgAAAAMAAAAMAAQAAgAAAAMAAAAMAAMAAgAAAAMAAAAMAAIAAgAAAAMAAAAMAAEAAgAAAAMAAAAMAAAAAgAAAAMAAAALAAgAAgAAAAMAAAALAAcAAgADAAMAAAALAAYAAgAAAAAAAAALAAUAAgAAAAMAAAALAAQAAgADAAMAAAALAAMAAgADAAIAAAALAAIAAgAAAAAAAAALAAEAAgAAAAMAAAALAAAAAgAAAAMAAAAKAAgAAgAAAAMAAAAKAAcAAgAAAAIAAAAKAAYAAgAAAAEAAAAKAAUAAgADAAIAAAAKAAQAAgADAAEAAAAKAAMAAgACAAEAAAAKAAIAAgADAAAAAAAKAAEAAgAAAAMAAAAKAAAAAgAAAAMAAAAJAAgAAgAAAAMAAAAJAAcAAgAAAAMAAAAJAAYAAgABAAIAAAAJAAUAAgACAAEAAAAJAAQAAgACAAEAAAAJAAMAAgACAAEAAAAJAAIAAgADAAAAAAAJAAEAAgAAAAMAAAAJAAAAAgAAAAMAAAAIAAgAAgAAAAMAAAAIAAcAAgADAAMAAAAIAAYAAgADAAEAAAAIAAUAAgACAAEAAAAIAAQAAgACAAEAAAAIAAMAAgACAAEAAAAIAAIAAgADAAAAAAAIAAEAAgAAAAMAAAAIAAAAAgAAAAMAAAAHAAgAAgAAAAMAAAAHAAcAAgABAAIAAAAHAAYAAgACAAEAAAAHAAUAAgACAAEAAAAHAAQAAgACAAEAAAAHAAMAAgACAAEAAAAHAAIAAgADAAAAAAAHAAEAAgAAAAMAAAAHAAAAAgAAAAMAAAAGAAgAAgAAAAMAAAAGAAcAAgABAAIAAAAGAAYAAgACAAEAAAAGAAUAAgACAAEAAAAGAAQAAgACAAEAAAAGAAMAAgACAAEAAAAGAAIAAgADAAAAAAAGAAEAAgAAAAMAAAAGAAAAAgAAAAMAAAAFAAgAAgAAAAMAAAAFAAcAAgABAAIAAAAFAAYAAgACAAEAAAAFAAUAAgACAAEAAAAFAAQAAgACAAEAAAAFAAMAAgACAAEAAAAFAAIAAgADAAAAAAAFAAEAAgAAAAMAAAAFAAAAAgAAAAMAAAAEAAgAAgAAAAMAAAAEAAcAAgAAAAIAAAAEAAYAAgABAAAAAAAEAAUAAgABAAAAAAAEAAQAAgACAAIAAAAEAAMAAgACAAEAAAAEAAIAAgADAAAAAAAEAAEAAgAAAAMAAAAEAAAAAgAAAAMAAAADAAgAAgAAAAMAAAADAAcAAgAAAAMAAAADAAYAAgABAAIAAAADAAUAAgAAAAMAAAADAAQAAgAAAAIAAAADAAMAAgABAAAAAAADAAIAAgABAAMAAAADAAEAAgAAAAMAAAADAAAAAgAAAAMAAAACAAgAAgAAAAMAAAACAAcAAgAAAAMAAAACAAYAAgAAAAIAAAACAAUAAgAAAAMAAAACAAQAAgAAAAMAAAACAAMAAgAAAAMAAAACAAIAAgAAAAMAAAACAAEAAgAAAAMAAAACAAAAAgAAAAMAAAABAAgAAgAAAAMAAAABAAcAAgAAAAMAAAABAAYAAgAAAAMAAAABAAUAAgAAAAMAAAABAAQAAgADAAMAAAABAAMAAgAAAAAAAAABAAIAAgAAAAMAAAABAAEAAgAAAAMAAAABAAAAAgAAAAMAAAAAAAgAAgAAAAMAAAAAAAcAAgAAAAMAAAAAAAYAAgAAAAMAAAAAAAUAAgAAAAMAAAAAAAQAAgAAAAIAAAAAAAMAAgABAAMAAAAAAAIAAgAAAAMAAAAAAAEAAgAAAAMAAAA=")
|
||||||
|
tile_set = SubResource("TileSet_ge1l5")
|
||||||
|
|
||||||
[node name="Player" parent="." instance=ExtResource("1_ge1l5")]
|
[node name="Player" parent="." instance=ExtResource("1_ge1l5")]
|
||||||
position = Vector2(128, 76)
|
position = Vector2(128, 76)
|
||||||
|
|||||||
@@ -1,16 +1,95 @@
|
|||||||
[gd_scene load_steps=5 format=3 uid="uid://dfbomt0l6b1o4"]
|
[gd_scene load_steps=14 format=3 uid="uid://dfbomt0l6b1o4"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dxvslwwnnlosy" path="res://scripts/player.gd" id="1_3vyb7"]
|
[ext_resource type="Script" uid="uid://dxvslwwnnlosy" path="res://scripts/player.gd" id="1_3vyb7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://bivyvi585d2lk" path="res://assets/textures/hood_player.png" id="2_g2els"]
|
[ext_resource type="Texture2D" uid="uid://c12v1hnrbfjr4" path="res://assets/textures/spritesheets/hood_player.png" id="2_g2els"]
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(0, 0, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(34, 0, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(68, 0, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(0, 34, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(34, 34, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(68, 34, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(0, 68, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(34, 68, 33, 33)
|
||||||
|
|
||||||
|
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
|
||||||
|
atlas = ExtResource("2_g2els")
|
||||||
|
region = Rect2(68, 68, 33, 33)
|
||||||
|
|
||||||
[sub_resource type="SpriteFrames" id="SpriteFrames_qhqgy"]
|
[sub_resource type="SpriteFrames" id="SpriteFrames_qhqgy"]
|
||||||
animations = [{
|
animations = [{
|
||||||
"frames": [{
|
"frames": [{
|
||||||
"duration": 1.0,
|
"duration": 1.0,
|
||||||
"texture": ExtResource("2_g2els")
|
"texture": SubResource("AtlasTexture_g2els")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qhqgy")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_g2els")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_dqkch")
|
||||||
}],
|
}],
|
||||||
"loop": true,
|
"loop": true,
|
||||||
"name": &"default",
|
"name": &"down",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qlg0r")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_tuyoq")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_qlg0r")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_fjrip")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"side",
|
||||||
|
"speed": 5.0
|
||||||
|
}, {
|
||||||
|
"frames": [{
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_smehm")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_ur7pv")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_smehm")
|
||||||
|
}, {
|
||||||
|
"duration": 1.0,
|
||||||
|
"texture": SubResource("AtlasTexture_y4r1p")
|
||||||
|
}],
|
||||||
|
"loop": true,
|
||||||
|
"name": &"up",
|
||||||
"speed": 5.0
|
"speed": 5.0
|
||||||
}]
|
}]
|
||||||
|
|
||||||
@@ -23,8 +102,13 @@ script = ExtResource("1_3vyb7")
|
|||||||
|
|
||||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||||
sprite_frames = SubResource("SpriteFrames_qhqgy")
|
sprite_frames = SubResource("SpriteFrames_qhqgy")
|
||||||
|
animation = &"down"
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
position = Vector2(0, 13)
|
position = Vector2(0, 13)
|
||||||
rotation = -1.5707964
|
rotation = -1.5707964
|
||||||
shape = SubResource("CapsuleShape2D_3vyb7")
|
shape = SubResource("CapsuleShape2D_3vyb7")
|
||||||
|
|
||||||
|
[node name="Camera2D" type="Camera2D" parent="."]
|
||||||
|
drag_horizontal_enabled = true
|
||||||
|
drag_vertical_enabled = true
|
||||||
|
|||||||
@@ -2,6 +2,22 @@ extends CharacterBody2D
|
|||||||
|
|
||||||
const SPEED: int = 500
|
const SPEED: int = 500
|
||||||
|
|
||||||
|
@onready var animated_sprite: AnimatedSprite2D = $AnimatedSprite2D
|
||||||
|
|
||||||
func _physics_process(delta: float) -> void:
|
func _physics_process(delta: float) -> void:
|
||||||
velocity = Input.get_vector("move_left","move_right","move_up","move_down") * delta * SPEED * 3
|
velocity = Input.get_vector("move_left","move_right","move_up","move_down").normalized() * delta * SPEED * 3
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
|
|
||||||
|
animated_sprite.flip_h = velocity.x < 0
|
||||||
|
if velocity.length() != 0:
|
||||||
|
animated_sprite.play()
|
||||||
|
if velocity.x != 0:
|
||||||
|
animated_sprite.animation = "side"
|
||||||
|
else:
|
||||||
|
if velocity.y < 0:
|
||||||
|
animated_sprite.animation = "up"
|
||||||
|
else:
|
||||||
|
animated_sprite.animation = "down"
|
||||||
|
else:
|
||||||
|
animated_sprite.stop()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user