moved toward 3d

This commit is contained in:
torontocaper committed 2026-01-23 22:57:36 -05:00
1 parent afca84af44
commit b85dd13963
2405 files changed
+57036 -2386

No files matched your search

+1853 -1993
View File
File diff suppressed because it is too large. Load diff
+124
View File
@@ -0,0 +1,124 @@
[gd_scene load_steps=19 format=3 uid="uid://3uc588mdcp6p"]
[ext_resource type="PackedScene" uid="uid://dcspnwq0858er" path="res://scenes/player_3d.tscn" id="1_m7dbh"]
[ext_resource type="Texture2D" uid="uid://oj44wj30tk0v" path="res://assets/singles/terrains_and_fences/ME_Singles_Terrains_and_Fences_16x16_Props_Dirt_11.png" id="3_kefov"]
[ext_resource type="Texture2D" uid="uid://dallhpwd4b7xq" path="res://assets/singles/terrains_and_fences/ME_Singles_Terrains_and_Fences_16x16_Grass_2_2.png" id="4_le0cj"]
[ext_resource type="MeshLibrary" uid="uid://lrqih4x4lu5e" path="res://resources/mesh_library_exteriors.tres" id="4_mt54i"]
[ext_resource type="Texture2D" uid="uid://dvyu8hutjntvk" path="res://assets/singles/terrains_and_fences/ME_Singles_Terrains_and_Fences_16x16_Grass_2_1.png" id="5_le0cj"]
[ext_resource type="Texture2D" uid="uid://d4c35fmdiyv7m" path="res://assets/singles/terrains_and_fences/ME_Singles_Terrains_and_Fences_16x16_Grass_2_3.png" id="6_78blk"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_le0cj"]
sky_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
ground_horizon_color = Color(0.66224277, 0.6717428, 0.6867428, 1)
[sub_resource type="Sky" id="Sky_78blk"]
sky_material = SubResource("ProceduralSkyMaterial_le0cj")
[sub_resource type="Environment" id="Environment_a6i3j"]
background_mode = 2
sky = SubResource("Sky_78blk")
tonemap_mode = 2
glow_enabled = true
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mt54i"]
transparency = 1
shading_mode = 0
albedo_texture = ExtResource("3_kefov")
texture_filter = 0
[sub_resource type="QuadMesh" id="QuadMesh_le0cj"]
material = SubResource("StandardMaterial3D_mt54i")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kefov"]
transparency = 1
depth_draw_mode = 1
shading_mode = 0
albedo_texture = ExtResource("4_le0cj")
texture_filter = 0
[sub_resource type="PlaneMesh" id="PlaneMesh_mt54i"]
material = SubResource("StandardMaterial3D_kefov")
size = Vector2(0.1, 0.1)
orientation = 2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_le0cj"]
transparency = 1
depth_draw_mode = 1
shading_mode = 0
albedo_texture = ExtResource("5_le0cj")
texture_filter = 0
[sub_resource type="PlaneMesh" id="PlaneMesh_le0cj"]
material = SubResource("StandardMaterial3D_le0cj")
size = Vector2(0.1, 0.1)
orientation = 2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a6i3j"]
transparency = 1
depth_draw_mode = 1
shading_mode = 0
albedo_texture = ExtResource("6_78blk")
texture_filter = 0
[sub_resource type="PlaneMesh" id="PlaneMesh_1gkdw"]
material = SubResource("StandardMaterial3D_a6i3j")
size = Vector2(0.1, 0.1)
orientation = 2
[sub_resource type="MeshLibrary" id="MeshLibrary_78blk"]
item/0/name = "props_dirt_11"
item/0/mesh = SubResource("QuadMesh_le0cj")
item/0/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/0/mesh_cast_shadow = 1
item/0/shapes = []
item/0/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/0/navigation_layers = 1
item/1/name = "grass_2_2"
item/1/mesh = SubResource("PlaneMesh_mt54i")
item/1/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/1/mesh_cast_shadow = 1
item/1/shapes = []
item/1/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/1/navigation_layers = 1
item/2/name = "grass_2_1_left"
item/2/mesh = SubResource("PlaneMesh_le0cj")
item/2/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/2/mesh_cast_shadow = 1
item/2/shapes = []
item/2/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/2/navigation_layers = 1
item/3/name = "grass_2_3_right"
item/3/mesh = SubResource("PlaneMesh_1gkdw")
item/3/mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/3/mesh_cast_shadow = 1
item/3/shapes = []
item/3/navigation_mesh_transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
item/3/navigation_layers = 1
[node name="Main3D" type="Node3D"]
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_a6i3j")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.7071067, 0.6123725, -0.35355344, 2.7805946e-08, 0.49999994, 0.86602545, 0.7071069, -0.6123724, 0.35355327, 0, 0, 0)
shadow_enabled = true
[node name="Player3D" parent="." instance=ExtResource("1_m7dbh")]
[node name="GroundMap" type="GridMap" parent="."]
mesh_library = ExtResource("4_mt54i")
cell_size = Vector3(0.1, 0.1, 0.1)
cell_center_y = false
data = {
"cells": PackedInt32Array(65535, 0, 1, 0, 0, 1, 0, 65535, 0, 65535, 65535, 1, 65534, 65535, 1, 65534, 0, 1, 1, 0, 1, 1, 65535, 1, 65535, 1, 1, 65534, 1, 1, 0, 1, 1, 1, 1, 1, 1, 65534, 1, 0, 65534, 1, 65535, 65534, 1, 65534, 65534, 1, 65533, 65534, 0, 65533, 65535, 1, 65533, 0, 1, 65533, 1, 0, 65534, 2, 1, 65535, 2, 1, 0, 2, 1, 1, 2, 0, 2, 2, 0, 2, 1, 0, 2, 0, 1, 3, 0, 0, 3, 65535, 1, 3, 65534, 1, 3, 65533, 1, 2, 65533, 1, 2, 65534, 1, 2, 65535, 1, 1, 65533, 1, 0, 65533, 1, 65535, 65533, 1, 65534, 65533, 1, 65533, 65533, 0, 65532, 65534, 0, 65532, 65535, 1, 65532, 0, 1, 65533, 2, 1, 65532, 2, 1, 65532, 1, 0, 3, 1, 0, 3, 2, 1, 65535, 65532, 0, 65535, 65531, 1, 65534, 65531, 1, 65534, 65532, 0, 65532, 65533, 1, 0, 65532, 1, 1, 65532, 1, 1, 65531, 1, 2, 65532, 1, 3, 65532, 1, 3, 65531, 1, 2, 65531, 1, 0, 65531, 1, 65533, 65531, 1, 65532, 65531, 1, 65532, 65532, 1, 65533, 65532, 1, 65531, 65532, 1, 65533, 65530, 1, 65534, 65530, 1, 65535, 65530, 1, 65535, 65529, 1, 65535, 65528, 1, 65534, 65528, 1, 65534, 65529, 1, 65533, 65529, 1, 65532, 65529, 1, 65532, 65530, 1, 65531, 65529, 1, 65530, 65529, 1, 65530, 65530, 1, 65530, 65531, 1, 65531, 65531, 1, 65531, 65533, 1, 65531, 65534, 1, 65531, 65530, 1, 65531, 65535, 1, 65531, 0, 1, 65531, 1, 1, 65531, 2, 1, 65534, 3, 1, 0, 3, 1, 1, 3, 1, 2, 3, 1, 3, 3, 1, 4, 2, 1, 4, 1, 1, 4, 0, 0, 5, 0, 0, 5, 65535, 0, 5, 65534, 1, 5, 65533, 1, 5, 65532, 1, 5, 65531, 1, 4, 65531, 1, 4, 65533, 0, 4, 65532, 1, 4, 65534, 1, 1, 65530, 1, 0, 65530, 1, 0, 65529, 1, 1, 65528, 1, 2, 65529, 1, 3, 65530, 1, 5, 1, 1, 6, 0, 1, 6, 65535, 0, 4, 65535, 1, 65530, 65535, 1, 65530, 65534, 1, 65530, 65533, 1, 65530, 65532, 1, 65530, 0, 1, 65530, 1, 1, 4, 3, 1, 5, 3, 1, 5, 2, 1, 6, 1, 1, 7, 0, 1, 7, 65535, 1, 7, 65534, 1, 6, 65533, 1, 1, 65529, 1, 2, 65530, 1, 6, 65534, 1, 7, 65533, 1, 7, 65532, 1, 6, 65532, 1, 6, 65531, 1, 5, 65530, 1, 4, 65530, 1, 3, 65529, 1, 2, 65528, 1, 0, 65528, 1, 65535, 3, 1)
}
[node name="GrassMap" type="GridMap" parent="."]
mesh_library = SubResource("MeshLibrary_78blk")
cell_size = Vector3(0.1, 0.1, 0.1)
data = {
"cells": PackedInt32Array(65534, 0, 1, 65535, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 3, 65533, 0, 2, 65534, 1, 1, 65535, 1, 1, 65533, 1, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 4, 1, 3, 65532, 1, 2, 65535, 2, 1, 65534, 2, 1, 65533, 2, 2, 0, 2, 3, 1, 65535, 1, 0, 65535, 1, 65535, 65535, 1, 65534, 65535, 1, 65533, 65535, 1, 2, 65535, 1, 3, 65535, 1, 4, 65535, 3, 65532, 65535, 2, 65534, 65531, 1, 65535, 65531, 1, 0, 65531, 1, 1, 65532, 1, 2, 65533, 1, 2, 65534, 1, 1, 65534, 1, 0, 65534, 1, 0, 65533, 1, 65535, 65533, 1, 65535, 65532, 1, 0, 65532, 1, 1, 65533, 1, 65534, 65533, 1, 65533, 65533, 1, 65534, 65534, 1, 65535, 65534, 1, 2, 65532, 1, 2, 65531, 1, 1, 65531, 1, 1, 65530, 1, 0, 65530, 2, 3, 65532, 1, 3, 65533, 1, 3, 65534, 1, 4, 65534, 3, 4, 65533, 3, 4, 65532, 3, 3, 65531, 3, 1, 65529, 3, 65533, 65531, 2, 65534, 65532, 2, 65532, 65533, 2, 65533, 65534, 2, 0, 65529, 2, 2, 65530, 3)
}
[editable path="Player3D"]
+4 -384
View File
@@ -1,389 +1,9 @@
[gd_scene load_steps=55 format=3 uid="uid://pldxcq54fei5"]
[gd_scene load_steps=5 format=3 uid="uid://pldxcq54fei5"]
[ext_resource type="Script" uid="uid://ddiwahqiekcqp" path="res://scripts/player.gd" id="1_j1k7i"]
[ext_resource type="Texture2D" uid="uid://cfst1xv0quili" path="res://assets/top-down-adam-idle.png" id="1_ykc1o"]
[ext_resource type="Texture2D" uid="uid://gxwk6kki0y1u" path="res://assets/top-down-adam-walk.png" id="3_ayngq"]
[ext_resource type="SpriteFrames" uid="uid://b7cjgh268bie5" path="res://resources/sprite_frames_player.tres" id="2_qhqgy"]
[ext_resource type="PackedScene" uid="uid://dgotxye77b7mr" path="res://scenes/debug_layer.tscn" id="3_niqac"]
[sub_resource type="AtlasTexture" id="AtlasTexture_j1k7i"]
atlas = ExtResource("1_ykc1o")
region = Rect2(288, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tidp7"]
atlas = ExtResource("1_ykc1o")
region = Rect2(304, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_eotbk"]
atlas = ExtResource("1_ykc1o")
region = Rect2(320, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_vdid1"]
atlas = ExtResource("1_ykc1o")
region = Rect2(336, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_40y4h"]
atlas = ExtResource("1_ykc1o")
region = Rect2(352, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xoay6"]
atlas = ExtResource("1_ykc1o")
region = Rect2(368, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_arqjq"]
atlas = ExtResource("1_ykc1o")
region = Rect2(192, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_2dryk"]
atlas = ExtResource("1_ykc1o")
region = Rect2(208, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_t483v"]
atlas = ExtResource("1_ykc1o")
region = Rect2(224, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_pkuya"]
atlas = ExtResource("1_ykc1o")
region = Rect2(240, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_if3ei"]
atlas = ExtResource("1_ykc1o")
region = Rect2(256, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_v21ou"]
atlas = ExtResource("1_ykc1o")
region = Rect2(272, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_2uj3n"]
atlas = ExtResource("1_ykc1o")
region = Rect2(0, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_bovn1"]
atlas = ExtResource("1_ykc1o")
region = Rect2(16, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_0qby2"]
atlas = ExtResource("1_ykc1o")
region = Rect2(32, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_7rew6"]
atlas = ExtResource("1_ykc1o")
region = Rect2(48, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jw7de"]
atlas = ExtResource("1_ykc1o")
region = Rect2(64, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_5s4g8"]
atlas = ExtResource("1_ykc1o")
region = Rect2(80, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_o45cr"]
atlas = ExtResource("1_ykc1o")
region = Rect2(96, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_4fr7e"]
atlas = ExtResource("1_ykc1o")
region = Rect2(112, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_b2f8q"]
atlas = ExtResource("1_ykc1o")
region = Rect2(128, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_v3ltj"]
atlas = ExtResource("1_ykc1o")
region = Rect2(144, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_44jvg"]
atlas = ExtResource("1_ykc1o")
region = Rect2(160, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_r14ix"]
atlas = ExtResource("1_ykc1o")
region = Rect2(176, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_wtinw"]
atlas = ExtResource("3_ayngq")
region = Rect2(288, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_h8lvs"]
atlas = ExtResource("3_ayngq")
region = Rect2(304, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_e64ve"]
atlas = ExtResource("3_ayngq")
region = Rect2(320, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_n0gu0"]
atlas = ExtResource("3_ayngq")
region = Rect2(336, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8kb50"]
atlas = ExtResource("3_ayngq")
region = Rect2(352, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_6q50s"]
atlas = ExtResource("3_ayngq")
region = Rect2(368, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_nc4xq"]
atlas = ExtResource("3_ayngq")
region = Rect2(192, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_xo1yp"]
atlas = ExtResource("3_ayngq")
region = Rect2(208, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ee46x"]
atlas = ExtResource("3_ayngq")
region = Rect2(224, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_vnedn"]
atlas = ExtResource("3_ayngq")
region = Rect2(240, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ejyhw"]
atlas = ExtResource("3_ayngq")
region = Rect2(256, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_m1eql"]
atlas = ExtResource("3_ayngq")
region = Rect2(272, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_00hqc"]
atlas = ExtResource("3_ayngq")
region = Rect2(0, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jhyaw"]
atlas = ExtResource("3_ayngq")
region = Rect2(16, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tv3qk"]
atlas = ExtResource("3_ayngq")
region = Rect2(32, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_81uvs"]
atlas = ExtResource("3_ayngq")
region = Rect2(48, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_8q122"]
atlas = ExtResource("3_ayngq")
region = Rect2(64, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tqc8n"]
atlas = ExtResource("3_ayngq")
region = Rect2(80, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_itr70"]
atlas = ExtResource("3_ayngq")
region = Rect2(96, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jtg6r"]
atlas = ExtResource("3_ayngq")
region = Rect2(112, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_0cauu"]
atlas = ExtResource("3_ayngq")
region = Rect2(128, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_fvj7k"]
atlas = ExtResource("3_ayngq")
region = Rect2(144, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_6qh68"]
atlas = ExtResource("3_ayngq")
region = Rect2(160, 0, 16, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_h8qjx"]
atlas = ExtResource("3_ayngq")
region = Rect2(176, 0, 16, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_11i01"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_j1k7i")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tidp7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_eotbk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vdid1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_40y4h")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xoay6")
}],
"loop": true,
"name": &"idle_down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_arqjq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2dryk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_t483v")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_pkuya")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_if3ei")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v21ou")
}],
"loop": true,
"name": &"idle_left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_2uj3n")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bovn1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0qby2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7rew6")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jw7de")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_5s4g8")
}],
"loop": true,
"name": &"idle_right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_o45cr")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4fr7e")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_b2f8q")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_v3ltj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_44jvg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_r14ix")
}],
"loop": true,
"name": &"idle_up",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_wtinw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h8lvs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e64ve")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n0gu0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8kb50")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6q50s")
}],
"loop": true,
"name": &"walk_down",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nc4xq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xo1yp")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ee46x")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_vnedn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ejyhw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_m1eql")
}],
"loop": true,
"name": &"walk_left",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_00hqc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jhyaw")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tv3qk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_81uvs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_8q122")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tqc8n")
}],
"loop": true,
"name": &"walk_right",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_itr70")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jtg6r")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_0cauu")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fvj7k")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6qh68")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_h8qjx")
}],
"loop": true,
"name": &"walk_up",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ykc1o"]
radius = 7.0
height = 16.0
@@ -392,12 +12,12 @@ height = 16.0
script = ExtResource("1_j1k7i")
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_11i01")
sprite_frames = ExtResource("2_qhqgy")
animation = &"walk_up"
autoplay = "idle_down"
offset = Vector2(0, -8)
[node name="PlayerCollider" type="CollisionShape2D" parent="."]
position = Vector2(0, 8)
shape = SubResource("CapsuleShape2D_ykc1o")
[node name="PlayerCamera" type="Camera2D" parent="."]
+65
View File
@@ -0,0 +1,65 @@
#@tool
#@icon
#class_name
extends CharacterBody3D
## Documentation comments
enum FaceDirection {LEFT = 0, RIGHT = 1, UP = 2, DOWN = 3}
enum State {IDLE, WALK}
const SPEED: int = 1
## @export variables
## Regular variables
var current_direction: FaceDirection = FaceDirection.DOWN:
set = set_direction
var current_direction_string: String = "down"
var current_state: State = State.IDLE:
set = set_state
var current_state_string: String = "idle"
var input_vector: Vector2
## @onready variables
@onready var player_sprite: AnimatedSprite3D = $PlayerSprite3D
## Overridden built-in virtual methods
#func _init() -> void:
#func _enter_tree() -> void:
#func _ready() -> void:
#func _process(delta: float) -> void:
func _physics_process(_delta: float) -> void:
input_vector = Vector2.ZERO
if Input.is_action_pressed("left"):
input_vector = Vector2.LEFT
current_direction = FaceDirection.LEFT
current_state = State.WALK
elif Input.is_action_pressed("right"):
input_vector = Vector2.RIGHT
current_direction = FaceDirection.RIGHT
current_state = State.WALK
elif Input.is_action_pressed("up"):
input_vector = Vector2.UP
current_direction = FaceDirection.UP
current_state = State.WALK
elif Input.is_action_pressed("down"):
input_vector = Vector2.DOWN
current_direction = FaceDirection.DOWN
current_state = State.WALK
else: current_state = State.IDLE
velocity = Vector3(input_vector.x, 0, input_vector.y) * SPEED
move_and_slide()
## Remaining virtual methods
## Overridden custom methods
## Remaining methods
func set_direction(new_direction: FaceDirection) -> void:
current_direction = new_direction
current_direction_string = str(FaceDirection.keys()[new_direction]).to_lower()
func set_state(new_state: State) -> void:
current_state = new_state
current_state_string = str(State.keys()[new_state]).to_lower()
var animation_string = current_state_string + "_" + current_direction_string
player_sprite.play(animation_string)
## Subclasses
+1
View File
@@ -0,0 +1 @@
uid://c3mev0b5x3sl4
+35
View File
@@ -0,0 +1,35 @@
[gd_scene load_steps=5 format=3 uid="uid://dcspnwq0858er"]
[ext_resource type="SpriteFrames" uid="uid://b7cjgh268bie5" path="res://resources/sprite_frames_player.tres" id="1_52vux"]
[ext_resource type="Script" uid="uid://c3mev0b5x3sl4" path="res://scenes/player_3d.gd" id="1_reoop"]
[sub_resource type="CameraAttributesPractical" id="CameraAttributesPractical_reoop"]
dof_blur_far_enabled = true
dof_blur_far_distance = 2.6
dof_blur_far_transition = 1.0
dof_blur_near_enabled = true
dof_blur_near_distance = 2.5
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_52vux"]
radius = 0.48486328
height = 1.5662842
[node name="Player3D" type="CharacterBody3D"]
script = ExtResource("1_reoop")
[node name="PlayerSprite3D" type="AnimatedSprite3D" parent="."]
offset = Vector2(0, 16)
alpha_cut = 1
texture_filter = 0
sprite_frames = ExtResource("1_52vux")
animation = &"idle_down"
autoplay = "idle_down"
[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(0.9848077, -0.044943456, 0.16773126, 0, 0.9659258, 0.25881904, -0.17364818, -0.25488698, 0.9512512, 0.4, 1, 2.5)
attributes = SubResource("CameraAttributesPractical_reoop")
projection = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.78478503, 0)
shape = SubResource("CapsuleShape3D_52vux")