Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
ldefense
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages
Packages
Container Registry
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gavin An
ldefense
Commits
ce5387dc
Commit
ce5387dc
authored
Jul 21, 2026
by
Gavin An
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
작업중
parent
62aa03cc
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1781 additions
and
18 deletions
+1781
-18
assets/models/items/weapons/rapier/rapier.glb
assets/models/items/weapons/rapier/rapier.glb
+0
-0
assets/models/items/weapons/rapier/rapier.glb.import
assets/models/items/weapons/rapier/rapier.glb.import
+45
-0
assets/models/items/weapons/rapier/rapier.tscn
assets/models/items/weapons/rapier/rapier.tscn
+9
-0
assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png
...ts/models/items/weapons/rapier/rapier_Baked_BaseColor.png
+0
-0
assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png.import
...ls/items/weapons/rapier/rapier_Baked_BaseColor.png.import
+46
-0
assets/models/items/weapons/rapier/rapier_Baked_MetallicRoughness.png
...s/items/weapons/rapier/rapier_Baked_MetallicRoughness.png
+0
-0
assets/models/items/weapons/rapier/rapier_Baked_MetallicRoughness.png.import
.../weapons/rapier/rapier_Baked_MetallicRoughness.png.import
+46
-0
assets/models/units/warrior/lv1/warrior.glb
assets/models/units/warrior/lv1/warrior.glb
+0
-0
assets/models/units/warrior/lv1/warrior.glb.import
assets/models/units/warrior/lv1/warrior.glb.import
+45
-0
assets/models/units/warrior/lv1/warrior_texture_0.png
assets/models/units/warrior/lv1/warrior_texture_0.png
+0
-0
assets/models/units/warrior/lv1/warrior_texture_0.png.import
assets/models/units/warrior/lv1/warrior_texture_0.png.import
+46
-0
assets/models/units/warrior/warrior_anim.tres
assets/models/units/warrior/warrior_anim.tres
+1253
-0
sandbox/units/warrior_fit_test.tscn
sandbox/units/warrior_fit_test.tscn
+76
-0
src/autoload/data_manager.gd
src/autoload/data_manager.gd
+12
-0
src/entities/units/base/unit_helper.gd
src/entities/units/base/unit_helper.gd
+6
-0
src/entities/units/ranger/ranger_unit.tscn
src/entities/units/ranger/ranger_unit.tscn
+0
-18
src/entities/units/warrior/lv1/warrior.tscn
src/entities/units/warrior/lv1/warrior.tscn
+40
-0
src/entities/units/warrior/lv1/warrior_unit.tscn
src/entities/units/warrior/lv1/warrior_unit.tscn
+70
-0
src/entities/units/warrior/warrior_unit.gd
src/entities/units/warrior/warrior_unit.gd
+83
-0
src/entities/units/warrior/warrior_unit.gd.uid
src/entities/units/warrior/warrior_unit.gd.uid
+1
-0
src/ui/unit_placement/hud_unit_placement.gd
src/ui/unit_placement/hud_unit_placement.gd
+3
-0
No files found.
assets/models/items/weapons/rapier/rapier.glb
0 → 100644
View file @
ce5387dc
File added
assets/models/items/weapons/rapier/rapier.glb.import
0 → 100644
View file @
ce5387dc
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://chmkj4cj2pc1v"
path="res://.godot/imported/rapier.glb-b76b9b3988f9a350940095b3772c4026.scn"
[deps]
source_file="res://assets/models/items/weapons/rapier/rapier.glb"
dest_files=["res://.godot/imported/rapier.glb-b76b9b3988f9a350940095b3772c4026.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
mesh_library/use_node_names_as_mesh_names=false
array_mesh/deduplicate_surfaces=true
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
gltf/texture_map_mode=1
assets/models/items/weapons/rapier/rapier.tscn
0 → 100644
View file @
ce5387dc
[gd_scene format=3 uid="uid://c7ena3jinf4qc"]
[ext_resource type="PackedScene" uid="uid://chmkj4cj2pc1v" path="res://assets/models/items/weapons/rapier/rapier.glb" id="1_e4kwr"]
[node name="rapier" unique_id=795567087 instance=ExtResource("1_e4kwr")]
transform = Transform3D(-25, 0, -2.1855694e-06, 0, 25, 0, 2.1855694e-06, 0, -25, 0, 15, 0)
[node name="Mesh1_0" parent="." index="0" unique_id=609425921]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.08045673, 0)
assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png
0 → 100644
View file @
ce5387dc
2.8 MB
assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png.import
0 → 100644
View file @
ce5387dc
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1kvoc0j0btbp"
path.s3tc="res://.godot/imported/rapier_Baked_BaseColor.png-276a9f10bfb71de546121f57d8f26bf9.s3tc.ctex"
path.etc2="res://.godot/imported/rapier_Baked_BaseColor.png-276a9f10bfb71de546121f57d8f26bf9.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "2c6561f1d232c166567a386392ad341c"
}
[deps]
source_file="res://assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png"
dest_files=["res://.godot/imported/rapier_Baked_BaseColor.png-276a9f10bfb71de546121f57d8f26bf9.s3tc.ctex", "res://.godot/imported/rapier_Baked_BaseColor.png-276a9f10bfb71de546121f57d8f26bf9.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
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=true
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=0
assets/models/items/weapons/rapier/rapier_Baked_MetallicRoughness.png
0 → 100644
View file @
ce5387dc
3.88 MB
assets/models/items/weapons/rapier/rapier_Baked_MetallicRoughness.png.import
0 → 100644
View file @
ce5387dc
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nuc650yo341g"
path.s3tc="res://.godot/imported/rapier_Baked_MetallicRoughness.png-d850a08843bcb3599355651c82abc8fa.s3tc.ctex"
path.etc2="res://.godot/imported/rapier_Baked_MetallicRoughness.png-d850a08843bcb3599355651c82abc8fa.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "a6a0ae793251334e6c7a44ee8bbf8aac"
}
[deps]
source_file="res://assets/models/items/weapons/rapier/rapier_Baked_MetallicRoughness.png"
dest_files=["res://.godot/imported/rapier_Baked_MetallicRoughness.png-d850a08843bcb3599355651c82abc8fa.s3tc.ctex", "res://.godot/imported/rapier_Baked_MetallicRoughness.png-d850a08843bcb3599355651c82abc8fa.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
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=true
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=0
assets/models/units/warrior/lv1/warrior.glb
0 → 100644
View file @
ce5387dc
File added
assets/models/units/warrior/lv1/warrior.glb.import
0 → 100644
View file @
ce5387dc
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cneoi78i8r2fe"
path="res://.godot/imported/warrior.glb-f7d857af4d3128e902c16222085d016f.scn"
[deps]
source_file="res://assets/models/units/warrior/lv1/warrior.glb"
dest_files=["res://.godot/imported/warrior.glb-f7d857af4d3128e902c16222085d016f.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
mesh_library/use_node_names_as_mesh_names=false
array_mesh/deduplicate_surfaces=true
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1
gltf/texture_map_mode=1
assets/models/units/warrior/lv1/warrior_texture_0.png
0 → 100644
View file @
ce5387dc
6.74 MB
assets/models/units/warrior/lv1/warrior_texture_0.png.import
0 → 100644
View file @
ce5387dc
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b313khobewfnm"
path.s3tc="res://.godot/imported/warrior_texture_0.png-88400c654d610b337eee36f3eafe849d.s3tc.ctex"
path.etc2="res://.godot/imported/warrior_texture_0.png-88400c654d610b337eee36f3eafe849d.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "3675f9387f5278de73fc35e4934ef42e"
}
[deps]
source_file="res://assets/models/units/warrior/lv1/warrior_texture_0.png"
dest_files=["res://.godot/imported/warrior_texture_0.png-88400c654d610b337eee36f3eafe849d.s3tc.ctex", "res://.godot/imported/warrior_texture_0.png-88400c654d610b337eee36f3eafe849d.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/high_quality_mode=0
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=true
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=0
assets/models/units/warrior/warrior_anim.tres
0 → 100644
View file @
ce5387dc
This source diff could not be displayed because it is too large. You can
view the blob
instead.
sandbox/units/warrior_fit_test.tscn
0 → 100644
View file @
ce5387dc
[gd_scene format=3 uid="uid://cftdvlslaqab"]
[ext_resource type="PackedScene" uid="uid://c6wju2s7ey11q" path="res://src/entities/units/warrior/lv1/warrior.tscn" id="1_gy7ce"]
[ext_resource type="PackedScene" uid="uid://c7ena3jinf4qc" path="res://assets/models/items/weapons/rapier/rapier.tscn" id="2_gy7ce"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_gy7ce"]
radius = 0.4
height = 1.2
[sub_resource type="CapsuleMesh" id="CapsuleMesh_mb58a"]
radius = 0.4
height = 1.2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ring"]
albedo_color = Color(0.098039, 0.901961, 0.098039, 1)
emission_enabled = true
emission = Color(0.098039, 0.901961, 0.098039, 1)
emission_energy_multiplier = 2.0
[sub_resource type="TorusMesh" id="TorusMesh_dx6da"]
material = SubResource("StandardMaterial3D_ring")
inner_radius = 0.65
outer_radius = 0.7
[node name="WarriorFitTest" type="CharacterBody3D" unique_id=299517098]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=546382709]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
shape = SubResource("CapsuleShape3D_gy7ce")
[node name="VisualMesh" type="MeshInstance3D" parent="." unique_id=262697830]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
visible = false
mesh = SubResource("CapsuleMesh_mb58a")
[node name="SelectionRing" type="MeshInstance3D" parent="." unique_id=1438790199]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0)
mesh = SubResource("TorusMesh_dx6da")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=1045269139]
[node name="warrior" parent="." unique_id=1583845935 instance=ExtResource("1_gy7ce")]
[node name="Skeleton3D" parent="warrior/Armature" parent_id_path=PackedInt32Array(1583845935, 1364558243) index="0" unique_id=869110456]
bones/0/position = Vector3(-1.910276, 33.06552, 3.5636556)
bones/0/rotation = Quaternion(0.28815937, -0.48399922, 0.004976633, 0.8262471)
bones/1/rotation = Quaternion(0.5620965, 0.24640833, -0.5738231, 0.54227066)
bones/2/rotation = Quaternion(0.42321578, 0.052586436, 0.06714515, 0.9020059)
bones/3/rotation = Quaternion(-0.42186385, -0.18076968, -0.09782138, 0.8830539)
bones/4/rotation = Quaternion(-0.3672295, -0.11379034, -0.009377396, 0.92309606)
bones/5/rotation = Quaternion(0.87915325, -0.055501558, 0.15420589, 0.44747052)
bones/6/rotation = Quaternion(0.4259057, -0.05401285, -0.062089335, 0.9010171)
bones/7/rotation = Quaternion(-0.55740386, 0.19286433, -0.07460873, 0.8040759)
bones/8/rotation = Quaternion(-0.37955156, 0.10612711, 0.006433723, 0.919041)
bones/9/rotation = Quaternion(-0.04820835, 0.035868984, 0.03551153, 0.9975612)
bones/10/rotation = Quaternion(0.063555084, -0.005556316, -0.021568177, 0.9977298)
bones/11/rotation = Quaternion(-0.026126284, 0.00060771336, -0.0020700088, 0.9996564)
bones/12/rotation = Quaternion(0.594939, 0.51989836, -0.41137588, 0.45444834)
bones/13/rotation = Quaternion(0.3044257, 0.07226572, -0.02087591, 0.9495615)
bones/14/rotation = Quaternion(-0.34638062, -0.15226349, 0.21833093, 0.8995377)
bones/15/rotation = Quaternion(0.022922574, -0.27042493, 0.27432233, 0.92254657)
bones/16/rotation = Quaternion(-0.6291889, 0.48313388, -0.41592285, -0.4446473)
bones/17/rotation = Quaternion(0.36964628, -0.18361838, -0.21041645, 0.8862115)
bones/18/rotation = Quaternion(-0.22914784, 0.13075422, -0.07788659, 0.96142)
bones/19/rotation = Quaternion(-0.008124485, -0.44720575, 0.055150583, 0.8926922)
bones/20/rotation = Quaternion(-0.11569695, 0.18120818, -0.018436808, 0.97644156)
bones/21/rotation = Quaternion(0.25444955, 0.262842, -0.117302336, 0.9232604)
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="warrior/Armature/Skeleton3D" index="1" unique_id=275485168]
transform = Transform3D(0.41003728, -0.62528366, 0.66399515, -0.86364996, -0.5002318, 0.062262803, 0.2932194, -0.59899, -0.74513996, -18.67469, 37.884716, -12.241171)
bone_name = "RightHand"
bone_idx = 19
[node name="rapier" parent="warrior/Armature/Skeleton3D/BoneAttachment3D" unique_id=795567087 instance=ExtResource("2_gy7ce")]
[editable path="warrior"]
src/autoload/data_manager.gd
View file @
ce5387dc
...
...
@@ -63,6 +63,18 @@ func _initialize_unit_templates() -> void:
mage
.
is_ranged
=
true
mage
.
unit_color
=
Color
(
0.9
,
0.25
,
0.15
,
1.0
)
unit_templates
.
append
(
mage
)
# 5. Warrior Lv1 (근접 밸런스 유닛)
var
warrior_lv1
:
UnitData
=
UnitData
.
new
()
warrior_lv1
.
unit_id
=
"Unit_Warrior_Lv1"
warrior_lv1
.
unit_name
=
"Warrior Lv1"
warrior_lv1
.
damage
=
20.0
warrior_lv1
.
cooldown
=
1.2
warrior_lv1
.
move_speed
=
5.0
warrior_lv1
.
attack_range
=
2.0
warrior_lv1
.
is_ranged
=
false
warrior_lv1
.
unit_color
=
Color
(
0.55
,
0.62
,
0.7
,
1.0
)
unit_templates
.
append
(
warrior_lv1
)
## 영웅 능력치 데이터 초기 셋업
...
...
src/entities/units/base/unit_helper.gd
View file @
ce5387dc
...
...
@@ -76,6 +76,12 @@ static func attach_weapon(model_instance: Node3D, unit_data: UnitData) -> void:
attachment_name
=
"RightHandAttachment"
weapon_scene_path
=
"res://assets/models/items/weapons/azure_blade/azure_blade.glb"
texture_path
=
"res://assets/models/items/weapons/azure_blade/azure_blade_0.png"
elif
unit_id
==
"Unit_Warrior_Lv1"
:
# 워리어 Lv1: 오른손에 검 (azure_blade)
bone_name
=
"RightHand"
attachment_name
=
"RightHandAttachment"
weapon_scene_path
=
"res://assets/models/items/weapons/azure_blade/azure_blade.glb"
texture_path
=
"res://assets/models/items/weapons/azure_blade/azure_blade_0.png"
elif
unit_id
==
"Unit_Ranger"
:
# 레인저: 왼손에 활 (azure_bow/bow)
bone_name
=
"LeftHand"
...
...
src/entities/units/ranger/ranger_unit.tscn
View file @
ce5387dc
...
...
@@ -42,22 +42,4 @@ mesh = SubResource("TorusMesh_selection")
[node name="ranger" parent="." unique_id=1235075234 instance=ExtResource("2_ranger_scene")]
[node name="Skeleton3D" parent="ranger/Armature" parent_id_path=PackedInt32Array(1235075234, 347342459) index="0" unique_id=106775578]
bones/0/position = Vector3(0.03514373, 0.0034280196, 0.6635236)
bones/0/rotation = Quaternion(0.20349285, -0.5581575, -0.767251, 0.24161276)
bones/1/rotation = Quaternion(0.5304922, 0.57593215, -0.61864984, 0.06444053)
bones/2/rotation = Quaternion(0.59826106, 0.1739482, 0.06382933, 0.7795843)
bones/3/rotation = Quaternion(-0.6715887, -0.20650962, 0.092862934, 0.7054777)
bones/5/rotation = Quaternion(0.8261204, 0.0028015971, 0.36372316, 0.4303752)
bones/6/rotation = Quaternion(0.5529449, -0.009049176, 0.13317788, 0.82245594)
bones/7/rotation = Quaternion(-0.5409971, -0.107743785, 0.04905413, 0.83265066)
bones/11/rotation = Quaternion(-0.0011097626, -0.049749736, -0.0720563, 0.9961584)
bones/12/rotation = Quaternion(0.49171034, 0.6453104, -0.13713944, 0.5683207)
bones/13/rotation = Quaternion(0.28274685, -0.08206125, -0.5247269, 0.79873765)
bones/14/rotation = Quaternion(-0.060595874, -0.09316963, 0.093224026, 0.9894225)
bones/16/rotation = Quaternion(-0.22393328, 0.59772503, -0.31282783, -0.7033615)
bones/17/rotation = Quaternion(0.2881412, 0.53661305, -0.6094496, 0.50753546)
bones/18/rotation = Quaternion(0.43169993, 0.23694667, -0.78221, 0.38162687)
bones/21/rotation = Quaternion(0.15988994, 0.5659004, -0.5430847, 0.5993756)
[editable path="ranger"]
src/entities/units/warrior/lv1/warrior.tscn
0 → 100644
View file @
ce5387dc
[gd_scene format=3 uid="uid://c6wju2s7ey11q"]
[ext_resource type="PackedScene" uid="uid://cneoi78i8r2fe" path="res://assets/models/units/warrior/lv1/warrior.glb" id="1_warrior_glb"]
[ext_resource type="AnimationLibrary" uid="uid://bfq5qy0qjjddl" path="res://assets/models/units/warrior/warrior_anim.tres" id="2_warrior_anim"]
[node name="warrior" unique_id=1583845935 instance=ExtResource("1_warrior_glb")]
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(1364558243) index="0" unique_id=869110456]
bones/0/position = Vector3(-1.8957187, 33.07651, 3.5549679)
bones/0/rotation = Quaternion(0.28840318, -0.48382437, 0.0051577403, 0.82626325)
bones/1/rotation = Quaternion(0.5608467, 0.25128442, -0.5771154, 0.5378151)
bones/2/rotation = Quaternion(0.42508098, 0.055743374, 0.069278166, 0.90077716)
bones/3/rotation = Quaternion(-0.42340666, -0.18196306, -0.092208266, 0.8826742)
bones/4/rotation = Quaternion(-0.36720493, -0.1137675, -0.009153196, 0.9231109)
bones/5/rotation = Quaternion(0.8800668, -0.053816516, 0.15393856, 0.44597006)
bones/6/rotation = Quaternion(0.4259996, -0.053426526, -0.061801143, 0.90102756)
bones/7/rotation = Quaternion(-0.559434, 0.19220398, -0.073773555, 0.80290025)
bones/8/rotation = Quaternion(-0.3795891, 0.10611948, 0.006425505, 0.9190264)
bones/9/rotation = Quaternion(-0.048394125, 0.035671085, 0.035490535, 0.99756)
bones/10/rotation = Quaternion(0.063535295, -0.0055522784, -0.021565579, 0.9977311)
bones/11/rotation = Quaternion(-0.026143814, 0.0006061874, -0.002062838, 0.9996559)
bones/12/rotation = Quaternion(0.5951339, 0.5195713, -0.41118684, 0.45473802)
bones/13/rotation = Quaternion(0.30453014, 0.072075136, -0.021144342, 0.9495365)
bones/14/position = Vector3(5.990729e-06, 11.568957, 2.0486332e-06)
bones/14/rotation = Quaternion(-0.34640756, -0.15221387, 0.21824688, 0.89955604)
bones/15/rotation = Quaternion(0.022910133, -0.27039415, 0.27428424, 0.92256725)
bones/16/position = Vector3(-2.2237325, 1.1260277, -0.28097144)
bones/16/rotation = Quaternion(-0.6293668, 0.4828456, -0.4157187, -0.4448994)
bones/17/rotation = Quaternion(0.36976418, -0.1834297, -0.21005684, 0.88628674)
bones/18/position = Vector3(7.0502997e-06, 11.568421, -2.0685693e-06)
bones/18/rotation = Quaternion(-0.22914876, 0.13075821, -0.077887446, 0.9614191)
bones/19/position = Vector3(1.6717445e-07, 8.329648, 1.0820704e-06)
bones/19/rotation = Quaternion(-0.008124578, -0.447201, 0.055160116, 0.8926941)
bones/20/rotation = Quaternion(-0.115765184, 0.18120801, -0.018444315, 0.9764332)
bones/21/rotation = Quaternion(0.25449044, 0.26282075, -0.11730443, 0.9232549)
bones/22/rotation = Quaternion(-0.17588644, 9.691889e-06, 2.6466496e-05, 0.9844105)
bones/23/rotation = Quaternion(0.5060229, -6.436132e-06, 7.619528e-05, 0.86252004)
[node name="AnimationPlayer" parent="." index="1" unique_id=799901728]
libraries/ = ExtResource("2_warrior_anim")
src/entities/units/warrior/lv1/warrior_unit.tscn
0 → 100644
View file @
ce5387dc
[gd_scene format=3 uid="uid://8eyf76pns3pe"]
[ext_resource type="Script" uid="uid://c2517wfi77tjv" path="res://src/entities/units/warrior/warrior_unit.gd" id="1_q888s"]
[ext_resource type="PackedScene" uid="uid://c6wju2s7ey11q" path="res://src/entities/units/warrior/lv1/warrior.tscn" id="2_warrior_scene"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_body"]
radius = 0.4
height = 1.2
[sub_resource type="CapsuleMesh" id="CapsuleMesh_unit"]
radius = 0.4
height = 1.2
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ring"]
albedo_color = Color(0.098039, 0.901961, 0.098039, 1)
emission_enabled = true
emission = Color(0.098039, 0.901961, 0.098039, 1)
emission_energy_multiplier = 2.0
[sub_resource type="TorusMesh" id="TorusMesh_selection"]
material = SubResource("StandardMaterial3D_ring")
inner_radius = 0.65
outer_radius = 0.7
[node name="WarriorLv1Unit" type="CharacterBody3D" unique_id=1979268701]
script = ExtResource("1_q888s")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=818355607]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
shape = SubResource("CapsuleShape3D_body")
[node name="VisualMesh" type="MeshInstance3D" parent="." unique_id=1823035815]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
visible = false
mesh = SubResource("CapsuleMesh_unit")
[node name="SelectionRing" type="MeshInstance3D" parent="." unique_id=1456442294]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0)
mesh = SubResource("TorusMesh_selection")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=472282259]
[node name="warrior" parent="." unique_id=1628540794 instance=ExtResource("2_warrior_scene")]
[node name="Skeleton3D" parent="warrior/Armature" parent_id_path=PackedInt32Array(1628540794, 1364558243) index="0" unique_id=869110456]
bones/0/position = Vector3(-1.910276, 33.06552, 3.5636556)
bones/0/rotation = Quaternion(0.28815937, -0.48399922, 0.004976633, 0.8262471)
bones/1/rotation = Quaternion(0.5620965, 0.24640833, -0.5738231, 0.54227066)
bones/2/rotation = Quaternion(0.42321578, 0.052586436, 0.06714515, 0.9020059)
bones/3/rotation = Quaternion(-0.42186385, -0.18076968, -0.09782138, 0.8830539)
bones/4/rotation = Quaternion(-0.3672295, -0.11379034, -0.009377396, 0.92309606)
bones/5/rotation = Quaternion(0.87915325, -0.055501558, 0.15420589, 0.44747052)
bones/6/rotation = Quaternion(0.4259057, -0.05401285, -0.062089335, 0.9010171)
bones/7/rotation = Quaternion(-0.55740386, 0.19286433, -0.07460873, 0.8040759)
bones/8/rotation = Quaternion(-0.37955156, 0.10612711, 0.006433723, 0.919041)
bones/9/rotation = Quaternion(-0.04820835, 0.035868984, 0.03551153, 0.9975612)
bones/10/rotation = Quaternion(0.063555084, -0.005556316, -0.021568177, 0.9977298)
bones/11/rotation = Quaternion(-0.026126284, 0.00060771336, -0.0020700088, 0.9996564)
bones/12/rotation = Quaternion(0.594939, 0.51989836, -0.41137588, 0.45444834)
bones/13/rotation = Quaternion(0.3044257, 0.07226572, -0.02087591, 0.9495615)
bones/14/rotation = Quaternion(-0.34638062, -0.15226349, 0.21833093, 0.8995377)
bones/15/rotation = Quaternion(0.022922574, -0.27042493, 0.27432233, 0.92254657)
bones/16/rotation = Quaternion(-0.6291889, 0.48313388, -0.41592285, -0.4446473)
bones/17/rotation = Quaternion(0.36964628, -0.18361838, -0.21041645, 0.8862115)
bones/18/rotation = Quaternion(-0.22914784, 0.13075422, -0.07788659, 0.96142)
bones/19/rotation = Quaternion(-0.008124485, -0.44720575, 0.055150583, 0.8926922)
bones/20/rotation = Quaternion(-0.11569695, 0.18120818, -0.018436808, 0.97644156)
bones/21/rotation = Quaternion(0.25444955, 0.262842, -0.117302336, 0.9232604)
[editable path="warrior"]
src/entities/units/warrior/warrior_unit.gd
0 → 100644
View file @
ce5387dc
class_name
WarriorLv1Unit
extends
BaseUnit
## Warrior Lv1 유닛 고유 동작 및 비주얼 제어 클래스
const
MODEL_NAME
:
String
=
"warrior"
const
WARRIOR_ATTACK_ANIM
:
String
=
"Attack"
const
WARRIOR_RUN_ANIM
:
String
=
"Run"
const
WARRIOR_IDLE_ANIM
:
String
=
"Idle"
func
_setup_unit_visuals
()
->
void
:
var
node
:
Node3D
=
get_node_or_null
(
MODEL_NAME
)
as
Node3D
if
not
node
:
push_error
(
"WarriorLv1Unit: Model node '"
+
MODEL_NAME
+
"' not found under children."
)
return
_model_instance
=
node
UnitHelper
.
apply_skin
(
_model_instance
,
"res://assets/models/units/warrior/lv1/warrior_texture_0.png"
)
UnitHelper
.
attach_weapon
(
_model_instance
,
unit_data
)
_model_anim_player
=
UnitHelper
.
find_animation_player
(
_model_instance
)
if
_model_anim_player
:
var
anim_lib_path
:
String
=
"res://assets/models/units/warrior/warrior_anim.tres"
if
ResourceLoader
.
exists
(
anim_lib_path
):
var
lib
:
AnimationLibrary
=
load
(
anim_lib_path
)
as
AnimationLibrary
if
lib
:
if
_model_anim_player
.
has_animation_library
(
""
):
_model_anim_player
.
remove_animation_library
(
""
)
if
not
_model_anim_player
.
has_animation_library
(
MODEL_NAME
):
_model_anim_player
.
add_animation_library
(
MODEL_NAME
,
lib
)
UnitHelper
.
clean_root_animation_tracks
(
_model_anim_player
)
func
_get_attack_animation_name
(
_model_name
:
String
)
->
String
:
return
MODEL_NAME
+
"/"
+
WARRIOR_ATTACK_ANIM
func
_update_animations
()
->
void
:
if
not
_model_anim_player
:
return
var
library_prefix
:
String
=
MODEL_NAME
+
"/"
var
has_custom_anims
:
bool
=
_model_anim_player
.
has_animation
(
library_prefix
+
WARRIOR_IDLE_ANIM
)
var
target_anim
:
String
=
""
var
play_speed
:
float
=
1.0
var
blend_time
:
float
=
0.2
if
has_custom_anims
:
var
attack_anim
:
String
=
library_prefix
+
WARRIOR_ATTACK_ANIM
var
run_anim
:
String
=
library_prefix
+
WARRIOR_RUN_ANIM
var
idle_anim
:
String
=
library_prefix
+
WARRIOR_IDLE_ANIM
if
_attack_lock_timer
>
0.0
:
var
base_speed
:
float
=
1.5
if
unit_data
.
cooldown
<
0.6
:
base_speed
=
0.6
/
unit_data
.
cooldown
play_speed
=
clampf
(
base_speed
,
1.0
,
3.0
)
target_anim
=
attack_anim
elif
velocity
.
length
()
>
0.1
:
target_anim
=
run_anim
play_speed
=
1.2
else
:
target_anim
=
idle_anim
play_speed
=
1.0
if
target_anim
!=
""
and
_model_anim_player
.
current_animation
!=
target_anim
:
_last_anim_state
=
target_anim
.
replace
(
library_prefix
,
""
)
_model_anim_player
.
play
(
target_anim
,
blend_time
,
play_speed
)
else
:
var
fallback_anim
:
String
=
"Armature|Armature|Basic_Jump|baselayer"
if
not
_model_anim_player
.
has_animation
(
fallback_anim
):
return
if
_attack_lock_timer
>
0.0
:
target_anim
=
fallback_anim
play_speed
=
2.5
elif
velocity
.
length
()
>
0.1
:
target_anim
=
fallback_anim
play_speed
=
1.5
else
:
target_anim
=
""
_model_anim_player
.
stop
()
if
target_anim
!=
""
and
_model_anim_player
.
current_animation
!=
target_anim
:
_model_anim_player
.
play
(
target_anim
,
blend_time
,
play_speed
)
src/entities/units/warrior/warrior_unit.gd.uid
0 → 100644
View file @
ce5387dc
uid://c2517wfi77tjv
src/ui/unit_placement/hud_unit_placement.gd
View file @
ce5387dc
...
...
@@ -11,6 +11,7 @@ const STRIKER_SCENE: PackedScene = preload("res://src/entities/units/striker/str
const
GUARDIAN_SCENE
:
PackedScene
=
preload
(
"res://src/entities/units/guardian/guardian_unit.tscn"
)
const
RANGER_SCENE
:
PackedScene
=
preload
(
"res://src/entities/units/ranger/ranger_unit.tscn"
)
const
MAGE_SCENE
:
PackedScene
=
preload
(
"res://src/entities/units/mage/mage_unit.tscn"
)
const
WARRIOR_LV1_SCENE
:
PackedScene
=
preload
(
"res://src/entities/units/warrior/lv1/warrior_unit.tscn"
)
const
PLACEMENT_TILE_OVERLAY_SCENE
:
PackedScene
=
preload
(
"res://src/ui/unit_placement/placement_tile_overlay.tscn"
)
const
OVERLAY_POOL_WARMUP_BATCH_SIZE
:
int
=
16
const
MONSTER_PATH_TILE_EXTRA_MARGIN_RATIO
:
float
=
0.15
...
...
@@ -128,6 +129,8 @@ func _get_scene_for_unit(unit_data: UnitData) -> PackedScene:
return
RANGER_SCENE
"Unit_Mage"
:
return
MAGE_SCENE
"Unit_Warrior_Lv1"
:
return
WARRIOR_LV1_SCENE
_
:
return
_base_unit_scene
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment