Commit 07c66329 authored by Gavin An's avatar Gavin An

Archer 등록

parent 214945a5
No preview for this file type
......@@ -3,6 +3,7 @@
[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(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6088091, 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)
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,13 +3,13 @@
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bg7n7rsykomre"
path="res://.godot/imported/ranger.fbx-62c77c688e6616d5ee4187b382b9b47d.scn"
uid="uid://dle4lxukpit5h"
path="res://.godot/imported/archer.fbx-f01f3623161fdb24b5ab36bfd542f079.scn"
[deps]
source_file="res://assets/models/units/ranger/ranger.fbx"
dest_files=["res://.godot/imported/ranger.fbx-62c77c688e6616d5ee4187b382b9b47d.scn"]
source_file="res://assets/models/units/archer/lv1/archer.fbx"
dest_files=["res://.godot/imported/archer.fbx-f01f3623161fdb24b5ab36bfd542f079.scn"]
[params]
......@@ -17,6 +17,7 @@ nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
mesh_library/use_node_names_as_mesh_names=false
mesh_library/create_categories_from_hierarchy=false
array_mesh/deduplicate_surfaces=true
nodes/apply_root_scale=true
nodes/root_scale=1.0
......
......@@ -2,21 +2,21 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://co31j8b2pvws5"
path.s3tc="res://.godot/imported/ranger_0.png-a18a046e55419f80588b183fec27acb4.s3tc.ctex"
path.etc2="res://.godot/imported/ranger_0.png-a18a046e55419f80588b183fec27acb4.etc2.ctex"
uid="uid://dehf64b1dbabt"
path.s3tc="res://.godot/imported/archer_0.png-c4e80e65d5d70cafb2581f52b4339c6e.s3tc.ctex"
path.etc2="res://.godot/imported/archer_0.png-c4e80e65d5d70cafb2581f52b4339c6e.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
generator_parameters={
"md5": "f4b08718f45e909212a9f3d8616fe8f4"
"md5": "a2397ab089e74375989390405ca7d685"
}
[deps]
source_file="res://assets/models/units/ranger/ranger_0.png"
dest_files=["res://.godot/imported/ranger_0.png-a18a046e55419f80588b183fec27acb4.s3tc.ctex", "res://.godot/imported/ranger_0.png-a18a046e55419f80588b183fec27acb4.etc2.ctex"]
source_file="res://assets/models/units/archer/lv1/archer_0.png"
dest_files=["res://.godot/imported/archer_0.png-c4e80e65d5d70cafb2581f52b4339c6e.s3tc.ctex", "res://.godot/imported/archer_0.png-c4e80e65d5d70cafb2581f52b4339c6e.etc2.ctex"]
[params]
......
This image diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
[gd_scene format=3 uid="uid://bruux0uo2l744"]
[ext_resource type="PackedScene" uid="uid://d2k2a8qtjujay" path="res://src/entities/units/archer/lv1/archer_unit.tscn" id="1_m1bqh"]
[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="ArcherLv1Unit" parent="." unique_id=768639629 instance=ExtResource("1_m1bqh")]
[node name="Skeleton3D" parent="ArcherLv1Unit/archer/Armature" parent_id_path=PackedInt32Array(768639629, 1830403466, 193588432) index="0" unique_id=169591956]
bones/0/position = Vector3(0.026773315, 0.058244295, 0.66592354)
bones/0/rotation = Quaternion(0.9375597, -0.04276618, -0.06803467, 0.33841395)
bones/1/rotation = Quaternion(0.67169154, 0.07827249, -0.46310517, 0.57292014)
bones/2/rotation = Quaternion(0.3538488, -0.0010770241, -0.040844426, 0.93440974)
bones/3/rotation = Quaternion(-0.5438048, -0.20880875, 0.08612142, 0.808244)
bones/4/rotation = Quaternion(-0.30479345, -0.0470872, 0.011190875, 0.95118797)
bones/5/rotation = Quaternion(0.70468295, -0.09941805, -0.02616743, 0.7020351)
bones/6/rotation = Quaternion(0.18310326, -0.012076312, 0.009141002, 0.98297703)
bones/7/rotation = Quaternion(-0.21842246, 0.22995871, -0.024152525, 0.9480651)
bones/8/rotation = Quaternion(-0.40219826, 0.11807207, 0.015353041, 0.9077775)
bones/9/rotation = Quaternion(-0.2967818, 0.012359496, -0.040458985, 0.95400786)
bones/10/rotation = Quaternion(-0.05003484, -0.004152874, -0.009507843, 0.9986936)
bones/11/rotation = Quaternion(0.020363923, -0.0036421337, 0.015711483, 0.99966264)
bones/12/rotation = Quaternion(0.35137665, 0.53667605, -0.32624567, 0.69431764)
bones/13/rotation = Quaternion(0.24114826, 0.16799335, -0.11536422, 0.94885033)
bones/14/rotation = Quaternion(-0.104978435, -0.10325211, -0.033470202, 0.9885335)
bones/15/rotation = Quaternion(0.21576498, -0.27789524, 0.030659318, 0.9355639)
bones/16/rotation = Quaternion(0.27586567, -0.5642624, 0.24629286, 0.7381368)
bones/17/rotation = Quaternion(0.1570531, -0.05379743, -0.5219291, 0.8366781)
bones/18/rotation = Quaternion(-0.65816784, 0.12196127, -0.54410857, 0.50585216)
bones/19/rotation = Quaternion(0.2410946, 0.13675195, 0.20253429, 0.93922967)
bones/20/rotation = Quaternion(0.049427606, -0.002341814, -0.014178355, 0.9986744)
bones/21/rotation = Quaternion(0.22481446, 0.06458093, -0.0023889083, 0.97225624)
bones/22/rotation = Quaternion(-0.25140092, 2.442692e-08, 0.0052552656, 0.9678688)
bones/23/rotation = Quaternion(0.45093852, -3.9256154e-08, -0.009426397, 0.8925052)
[editable path="ArcherLv1Unit"]
[editable path="ArcherLv1Unit/archer"]
......@@ -42,11 +42,11 @@ mesh = SubResource("TorusMesh_dx6da")
[node name="warrior" parent="." unique_id=1583845935 instance=ExtResource("1_gy7ce")]
[node name="BoneAttachment3D" type="BoneAttachment3D" parent="warrior/Armature/Skeleton3D" parent_id_path=PackedInt32Array(1583845935, 1756619771) index="1" unique_id=275485168]
transform = Transform3D(0.8432909, 0.43229055, -0.31934905, 0.53308886, -0.7483676, 0.39466572, -0.06838015, -0.50305945, -0.8615419, -0.05954457, -0.23949414, 0.5811317)
transform = Transform3D(0.9017347, -0.23595689, -0.36221126, 0.4235169, 0.31427628, 0.8496252, -0.08664024, -0.91953963, 0.38332614, -0.24779537, -0.013620254, 0.54939604)
bone_name = "RightHand"
bone_idx = 19
[node name="rapier" parent="warrior/Armature/Skeleton3D/BoneAttachment3D" unique_id=795567087 instance=ExtResource("2_gy7ce")]
transform = Transform3D(-0.17364825, -0.9848076, 0, 0.9848081, -0.17364818, 0, 0, 0, 1.0000008, -0.6, 0, 0)
transform = Transform3D(-0.1736482, -0.9848077, 0, 0.9848077, -0.1736482, 0, 0, 0, 1, -0.6, 0, 0)
[editable path="warrior"]
......@@ -16,17 +16,17 @@ func _ready() -> void:
## 5종의 유닛 능력치 데이터 초기 셋업
func _initialize_unit_templates() -> void:
# 1. Ranger (원거리 유닛)
var ranger: UnitData = UnitData.new()
ranger.unit_id = "Unit_Ranger"
ranger.unit_name = "Ranger"
ranger.damage = 18.0
ranger.cooldown = 0.8
ranger.move_speed = 4.5
ranger.attack_range = 10.0
ranger.is_ranged = true
ranger.unit_color = Color(0.12, 0.75, 0.25, 1.0) # 녹색
unit_templates.append(ranger)
# 1. Archer lv1 (원거리 유닛)
var archer_lv_1: UnitData = UnitData.new()
archer_lv_1.unit_id = "Unit_Archer_lv1"
archer_lv_1.unit_name = "Archer_lv1"
archer_lv_1.damage = 18.0
archer_lv_1.cooldown = 0.8
archer_lv_1.move_speed = 4.5
archer_lv_1.attack_range = 10.0
archer_lv_1.is_ranged = true
archer_lv_1.unit_color = Color(0.12, 0.75, 0.25, 1.0) # 녹색
unit_templates.append(archer_lv_1)
# 2. Mage (마법사 유닛)
var mage: UnitData = UnitData.new()
......
class_name RangerUnit
class_name ArcherLv1Unit
extends BaseUnit
## Ranger 유닛 고유 동작 및 비주얼 제어 클래스
const RANGER_ATTACK_ANIM: String = "Draw"
const RANGER_RUN_ANIM: String = "Running"
const RANGER_WALK_ANIM: String = "Walking"
const RANGER_IDLE_ANIM: String = "Idle"
## Archer Lv1 유닛 고유 동작 및 비주얼 제어 클래스
const MODEL_NAME: String = "archer"
const ARCHER_ATTACK_ANIM: String = "Attack"
const ARCHER_RUN_ANIM: String = "Run"
const ARCHER_IDLE_ANIM: String = "Idle"
const ARROW_SPEED: float = 28.0
const ATTACK_YAW_OFFSET_DEGREES: float = -90.0
func _setup_unit_visuals() -> void:
# 자식 노드 중 레인저 모델 노드 명시적 확보
var m_name: String = "ranger"
var node: Node3D = get_node_or_null(m_name) as Node3D
var node: Node3D = get_node_or_null(MODEL_NAME) as Node3D
if not node:
push_error("RangerUnit: Model node '" + m_name + "' not found under children.")
push_error("ArcherLv1Unit: Model node '" + MODEL_NAME + "' not found under children.")
return
_model_instance = node
# 레인저 스킨 및 무기 결합
UnitHelper.apply_skin(_model_instance, "res://assets/models/units/ranger/ranger_0.png")
UnitHelper.apply_skin(_model_instance, "res://assets/models/units/archer/lv1/archer_0.png")
attach_weapon(_model_instance)
# 애니메이션 플레이어 및 라이브러리 연동
_model_anim_player = UnitHelper.find_animation_player(_model_instance)
if _model_anim_player:
var anim_lib_path: String = "res://assets/models/units/" + m_name + "/" + m_name + "_animations.tres"
var anim_lib_path: String = "res://assets/models/units/archer/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(m_name):
_model_anim_player.add_animation_library(m_name, lib)
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 + "/" + RANGER_ATTACK_ANIM
return MODEL_NAME + "/" + ARCHER_ATTACK_ANIM
func _get_weapon_config() -> Dictionary:
return {
......@@ -43,27 +40,31 @@ func _get_weapon_config() -> Dictionary:
"attachment_name": "LeftHandAttachment",
"weapon_scene_path": "res://assets/models/items/weapons/azure_bow/bow.glb",
"texture_path": "res://assets/models/items/weapons/azure_bow/bow_0.jpg",
"weapon_scale": Vector3(0.8, 0.8, 0.8),
"weapon_rotation": Vector3(0.0, 90.0, 0.0),
"weapon_scale": Vector3(0.8, 0.8, 0.8)
"weapon_position": Vector3.ZERO
}
## 레인저 애니메이션 갱신 제어 (Draw 애니메이션 적용)
func _look_at_target(target_pos: Vector3) -> void:
super._look_at_target(target_pos)
if _is_currently_attacking or _attack_lock_timer > 0.0:
rotation_degrees.y += ATTACK_YAW_OFFSET_DEGREES
func _update_animations() -> void:
if not _model_anim_player:
return
var m_name: String = "ranger"
var library_prefix: String = m_name + "/"
var has_custom_anims: bool = _model_anim_player.has_animation(library_prefix + "Idle")
var library_prefix: String = MODEL_NAME + "/"
var has_custom_anims: bool = _model_anim_player.has_animation(library_prefix + ARCHER_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 + "Draw"
var run_anim: String = library_prefix + "Running"
var idle_anim: String = library_prefix + "Idle"
var attack_anim: String = library_prefix + ARCHER_ATTACK_ANIM
var run_anim: String = library_prefix + ARCHER_RUN_ANIM
var idle_anim: String = library_prefix + ARCHER_IDLE_ANIM
if _attack_lock_timer > 0.0:
var base_speed: float = 1.5
......@@ -82,7 +83,6 @@ func _update_animations() -> void:
_last_anim_state = target_anim.replace(library_prefix, "")
_model_anim_player.play(target_anim, blend_time, play_speed)
else:
# Fallback 처리
var fallback_anim: String = "Armature|Armature|Basic_Jump|baselayer"
if not _model_anim_player.has_animation(fallback_anim):
return
......@@ -100,10 +100,14 @@ func _update_animations() -> void:
if target_anim != "" and _model_anim_player.current_animation != target_anim:
_model_anim_player.play(target_anim, blend_time, play_speed)
## 레인저 전용 발사체 생성 및 스폰
func _spawn_projectile(fire_position: Vector3) -> void:
# Main에서 준비한 ProjectilePool이 있으면 미리 생성된 화살 발사체를 재사용합니다.
# 빠르게 반복 발사되는 레인저 특성상 풀링 효과가 크며, 전투 중 생성/삭제 비용을 줄입니다.
if _model_instance:
var bow_attachment: BoneAttachment3D = UnitHelper.get_bone_attachment(
_model_instance, "LeftHandAttachment"
)
if bow_attachment:
fire_position = bow_attachment.global_position
var projectile_pool: Node = _get_projectile_pool()
if projectile_pool and projectile_pool.has_method("spawn_projectile"):
projectile_pool.call(
......@@ -112,23 +116,19 @@ func _spawn_projectile(fire_position: Vector3) -> void:
fire_position,
_target_monster,
unit_data.damage,
28.0,
ARROW_SPEED,
unit_data.unit_color
)
return
# ProjectilePool이 없는 독립 테스트 씬에서는 기존 방식으로 발사체를 직접 생성합니다.
var projectile_script = preload("res://src/entities/units/base/projectile.gd")
var projectile_script := preload("res://src/entities/units/base/projectile.gd")
var proj: Node3D = projectile_script.new() as Node3D
# 발사체의 속성들을 설정합니다. (공격력, 유도 대상, 비행 속도, 이펙트 색상)
proj.set("damage", unit_data.damage)
proj.set("target", _target_monster)
proj.set("speed", 28.0) # 화살은 매우 날렵하므로 빠른 속도(28.0m/s)로 비행하게 설정
proj.set("color", unit_data.unit_color) # 레인저 고유의 유닛 컬러 지정
proj.set("speed", ARROW_SPEED)
proj.set("color", unit_data.unit_color)
# 레인저 화살 비주얼 씬 장착
var arrow_effect = preload("res://src/entities/projectiles/arrow/arrow_effect.tscn")
var arrow_effect := preload("res://src/entities/projectiles/arrow/arrow_effect.tscn")
proj.set("custom_visual_scene", arrow_effect)
get_tree().current_scene.add_child(proj)
......
[gd_scene format=3 uid="uid://ccds2ypayb8qc"]
[ext_resource type="PackedScene" uid="uid://dle4lxukpit5h" path="res://assets/models/units/archer/lv1/archer.fbx" id="1_archer_fbx"]
[ext_resource type="AnimationLibrary" uid="uid://bhndpxovbto72" path="res://assets/models/units/archer/anim.tres" id="2_archer_anim"]
[node name="archer" unique_id=554518167 instance=ExtResource("1_archer_fbx")]
transform = Transform3D(-1, 0, 8.742278e-08, 0, 1, 0, -8.742278e-08, 0, -1, 0, 0, 0)
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(193588432) index="0" unique_id=169591956]
bones/0/position = Vector3(0.022011671, 0.010600254, 0.72412336)
bones/0/rotation = Quaternion(0.9299946, -0.15389545, -0.10131713, 0.31805858)
bones/1/rotation = Quaternion(0.71095973, 0.005333942, -0.3184902, 0.62695444)
bones/2/rotation = Quaternion(0.31229627, -0.016363196, -0.04695536, 0.9486825)
bones/3/rotation = Quaternion(-0.54842156, -0.07997584, 0.056278985, 0.830464)
bones/4/rotation = Quaternion(-0.30846012, -0.06453097, 0.033495225, 0.9484547)
bones/5/rotation = Quaternion(0.75748974, 0.057467632, 0.12024925, 0.6390985)
bones/6/rotation = Quaternion(0.2929377, 0.003309541, 0.034999005, 0.9554851)
bones/7/rotation = Quaternion(-0.42409384, 0.08054224, 0.021990174, 0.9017615)
bones/8/rotation = Quaternion(-0.4290978, 0.1458954, -0.020028476, 0.8911726)
bones/9/rotation = Quaternion(-0.2688365, 0.09272169, -0.0071789348, 0.9586856)
bones/10/rotation = Quaternion(-0.04248922, 0.036248185, 0.004462255, 0.9984292)
bones/11/rotation = Quaternion(0.011622262, 0.0008013722, 0.0036607636, 0.99992543)
bones/12/rotation = Quaternion(0.48709697, 0.44773352, -0.47646934, 0.57900625)
bones/13/rotation = Quaternion(0.6510484, 0.21070725, 0.17328739, 0.7083149)
bones/14/rotation = Quaternion(-0.12097845, -0.10189235, -0.029808676, 0.98696184)
bones/15/rotation = Quaternion(0.14478873, 0.1642645, -0.026444716, 0.9753738)
bones/16/rotation = Quaternion(0.5381203, -0.38454977, 0.43904322, 0.6081028)
bones/17/rotation = Quaternion(0.601937, -0.2498315, -0.18595399, 0.7353076)
bones/18/rotation = Quaternion(-0.14198312, 0.09884706, 0.01815061, 0.98475415)
bones/19/rotation = Quaternion(0.036231775, -0.4627605, 0.10036476, 0.8800381)
bones/20/rotation = Quaternion(-0.04873777, 0.034217533, 0.008871353, 0.99818593)
bones/21/rotation = Quaternion(0.2917506, -0.0028982842, -0.044492178, 0.9554547)
bones/22/rotation = Quaternion(-0.25140104, 1.2523538e-08, 0.0052552596, 0.9678688)
bones/23/rotation = Quaternion(0.45093852, -2.18904e-08, -0.0094264, 0.8925052)
[node name="AnimationPlayer" parent="." index="1" unique_id=1371887990]
libraries/ = ExtResource("2_archer_anim")
[gd_scene format=3 uid="uid://qdvm4bgh48q6"]
[gd_scene format=3 uid="uid://d2k2a8qtjujay"]
[ext_resource type="Script" uid="uid://dmo2ypkevm8ma" path="res://src/entities/units/ranger/ranger_unit.gd" id="1_base_unit"]
[ext_resource type="PackedScene" uid="uid://ch457fojl2l5g" path="res://src/entities/units/ranger/ranger.tscn" id="2_ranger_scene"]
[ext_resource type="Script" path="res://src/entities/units/archer/archer_unit.gd" id="1_archer_script"]
[ext_resource type="PackedScene" path="res://src/entities/units/archer/lv1/archer.tscn" id="2_archer_scene"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_body"]
radius = 0.4
......@@ -22,24 +22,22 @@ material = SubResource("StandardMaterial3D_ring")
inner_radius = 0.65
outer_radius = 0.7
[node name="RangerUnit" type="CharacterBody3D" unique_id=910499804]
script = ExtResource("1_base_unit")
[node name="ArcherLv1Unit" type="CharacterBody3D" unique_id=768639629]
script = ExtResource("1_archer_script")
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=403818653]
[node name="CollisionShape3D" type="CollisionShape3D" parent="." unique_id=1890268033]
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=1828850119]
[node name="VisualMesh" type="MeshInstance3D" parent="." unique_id=1190532444]
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=1006132212]
[node name="SelectionRing" type="MeshInstance3D" parent="." unique_id=1992216661]
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=186266373]
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=474303838]
[node name="ranger" parent="." unique_id=1235075234 instance=ExtResource("2_ranger_scene")]
[editable path="ranger"]
[node name="archer" parent="." unique_id=1830403466 instance=ExtResource("2_archer_scene")]
[gd_scene format=3 uid="uid://ch457fojl2l5g"]
[ext_resource type="PackedScene" uid="uid://bg7n7rsykomre" path="res://assets/models/units/ranger/ranger.fbx" id="1_ranger_fbx"]
[ext_resource type="AnimationLibrary" uid="uid://dtqsrlmfwah8i" path="res://assets/models/units/ranger/ranger_animations.tres" id="2_ranger_anims"]
[node name="ranger" unique_id=753362073 instance=ExtResource("1_ranger_fbx")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(347342459) index="0" unique_id=106775578]
bones/0/position = Vector3(0.009526689, 0.00890895, 0.63391894)
bones/0/rotation = Quaternion(0.34787953, -0.50787205, -0.67152256, 0.4124358)
bones/1/rotation = Quaternion(0.65668887, 0.52650666, -0.4935669, 0.21895747)
bones/2/rotation = Quaternion(0.6650878, 0.14805412, 0.041049335, 0.73078936)
bones/3/rotation = Quaternion(-0.68943536, -0.13675389, 0.111500554, 0.70252746)
bones/4/rotation = Quaternion(-0.27814108, -0.049392484, 0.057641834, 0.95753616)
bones/5/rotation = Quaternion(0.76398534, -0.05935912, 0.39321068, 0.5081223)
bones/6/rotation = Quaternion(0.56752205, 0.020972898, 0.34072942, 0.7492545)
bones/7/rotation = Quaternion(-0.5510819, 0.010665403, -0.08217243, 0.830327)
bones/8/rotation = Quaternion(-0.26788568, 0.073798016, -0.031191472, 0.96011364)
bones/9/rotation = Quaternion(0.3045851, 0.05863059, 0.009242283, 0.950634)
bones/10/rotation = Quaternion(-0.025334273, 0.053094994, -0.033819344, 0.997695)
bones/11/rotation = Quaternion(0.08160243, -0.02994328, -0.10501461, 0.99066466)
bones/12/rotation = Quaternion(0.53901494, 0.5072162, -0.33634436, 0.58229476)
bones/13/rotation = Quaternion(0.5442054, -0.27331173, -0.42037866, 0.672624)
bones/14/rotation = Quaternion(-0.22189373, -0.13944925, 0.32142338, 0.9099474)
bones/15/rotation = Quaternion(0.002734622, 0.14336169, 0.053758636, 0.98820543)
bones/16/rotation = Quaternion(-0.42183864, 0.5880897, -0.22300012, -0.6530496)
bones/17/rotation = Quaternion(0.5485272, 0.14820178, -0.1221298, 0.8137805)
bones/18/rotation = Quaternion(0.21534519, 0.3642813, -0.22312197, 0.87814707)
bones/19/rotation = Quaternion(-0.033562582, -0.33096007, -0.44027492, 0.8339646)
bones/20/rotation = Quaternion(0.019875612, 0.059954792, -0.025400154, 0.99768)
bones/21/rotation = Quaternion(0.22485383, 0.4876765, -0.40425393, 0.7403993)
bones/22/rotation = Quaternion(-0.23428716, -6.378701e-09, -0.002581273, 0.9721641)
[node name="AnimationPlayer" parent="." index="1" unique_id=1583138892]
libraries/ = ExtResource("2_ranger_anims")
......@@ -7,31 +7,31 @@
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[node name="Skeleton3D" parent="Armature" parent_id_path=PackedInt32Array(1122658972) index="0" unique_id=1756619771]
bones/0/position = Vector3(0.0073099844, -0.00024791062, 0.51946986)
bones/0/rotation = Quaternion(0.7336017, -0.40976235, -0.46098384, 0.28533718)
bones/1/rotation = Quaternion(0.6953324, 0.35067883, -0.45900282, 0.4276139)
bones/2/rotation = Quaternion(0.5667321, 0.09061526, 0.13510591, 0.8076819)
bones/3/rotation = Quaternion(-0.6401579, -0.12262135, -0.015155749, 0.75824285)
bones/4/rotation = Quaternion(-0.4466983, -0.10617086, 0.00024005448, 0.8883628)
bones/5/rotation = Quaternion(0.77513295, 0.27862963, 0.30337262, 0.4790612)
bones/6/rotation = Quaternion(0.4448868, 0.0130469, 0.2471058, 0.8607232)
bones/7/rotation = Quaternion(-0.45060512, 0.099976465, -0.08400531, 0.8831211)
bones/8/rotation = Quaternion(-0.45842803, 0.1347912, 0.014290656, 0.8783341)
bones/9/rotation = Quaternion(-0.25834036, 0.20522211, 0.11844286, 0.9365444)
bones/10/rotation = Quaternion(0.022619344, 0.08164339, -0.010146947, 0.9963533)
bones/11/rotation = Quaternion(0.09123827, 0.059046026, -0.078700215, 0.9909569)
bones/12/rotation = Quaternion(0.57781017, 0.62083524, -0.13990688, 0.51100403)
bones/13/rotation = Quaternion(0.46895784, 0.08111248, 0.53484404, 0.6981699)
bones/14/rotation = Quaternion(-0.3566624, -0.0653533, 0.09165615, 0.92742664)
bones/15/rotation = Quaternion(-0.0009877216, 0.24114296, -0.086359695, 0.9666391)
bones/16/rotation = Quaternion(-0.5165315, 0.38003513, 0.028065398, -0.7667991)
bones/17/rotation = Quaternion(0.5776718, 0.08903898, -0.5365655, 0.6086582)
bones/18/rotation = Quaternion(-0.28399494, 0.10896846, -0.39559907, 0.8665877)
bones/19/rotation = Quaternion(0.0024361685, -0.54337037, -0.022761738, 0.83918095)
bones/20/rotation = Quaternion(0.25569445, 0.07016864, 0.0060589095, 0.9641889)
bones/21/rotation = Quaternion(0.078519985, 0.08745963, -0.024804013, 0.9927589)
bones/22/rotation = Quaternion(-0.15805918, -2.3112833e-08, 0.0019670601, 0.9874277)
bones/23/rotation = Quaternion(0.5403607, 5.8547363e-09, -0.0067247013, 0.84140664)
bones/0/position = Vector3(-0.0042122453, -0.08830176, 0.626378)
bones/0/rotation = Quaternion(0.85872275, -0.08392143, -0.26641637, 0.42962164)
bones/1/rotation = Quaternion(0.77490896, 0.20032243, -0.4231632, 0.4246412)
bones/2/rotation = Quaternion(0.29141474, 0.100757435, 0.06735114, 0.94888836)
bones/3/rotation = Quaternion(-0.45503718, -0.14945994, -0.05290419, 0.87624425)
bones/4/rotation = Quaternion(-0.46250498, -0.14293629, 0.009365743, 0.874969)
bones/5/rotation = Quaternion(0.92503315, 0.14065711, 0.12639615, 0.32947415)
bones/6/rotation = Quaternion(0.29527205, -0.11466962, -0.0835156, 0.94482297)
bones/7/rotation = Quaternion(-0.5243528, 0.10898508, 0.071843565, 0.84143627)
bones/8/rotation = Quaternion(-0.47703573, 0.14649285, -0.016162159, 0.8664384)
bones/9/rotation = Quaternion(-0.2180815, 0.17500709, 0.14091109, 0.94971424)
bones/10/rotation = Quaternion(-0.045494687, 0.032769445, 0.011077983, 0.9983655)
bones/11/rotation = Quaternion(-0.07905474, 0.011545275, -0.0020301344, 0.9968014)
bones/12/rotation = Quaternion(0.5524608, 0.5694922, -0.40452987, 0.45477608)
bones/13/rotation = Quaternion(0.6395657, 0.3777125, 0.26244292, 0.61596483)
bones/14/rotation = Quaternion(-0.055958077, -0.030247174, 0.02641047, 0.99762535)
bones/15/rotation = Quaternion(0.09356525, 0.2024164, 0.12004779, 0.96739954)
bones/16/rotation = Quaternion(-0.60885024, 0.5101509, -0.40538743, -0.4524473)
bones/17/rotation = Quaternion(0.5945567, -0.4030331, -0.2623887, 0.6443748)
bones/18/rotation = Quaternion(-0.079526834, 0.017640848, -0.03761267, 0.9959667)
bones/19/rotation = Quaternion(0.09758278, -0.45935866, 0.070185356, 0.88008034)
bones/20/rotation = Quaternion(0.08377819, 0.015401736, 0.027466234, 0.9959868)
bones/21/rotation = Quaternion(0.25044242, 0.0030668462, -0.042835645, 0.9671786)
bones/22/rotation = Quaternion(-0.15805925, -1.314033e-08, 0.0019670653, 0.98742765)
bones/23/rotation = Quaternion(0.5403607, -6.557056e-09, -0.006724717, 0.84140664)
[node name="AnimationPlayer" parent="." index="1" unique_id=189824221]
libraries/ = ExtResource("2_warrior_anim")
......@@ -42,4 +42,31 @@ mesh = SubResource("TorusMesh_selection")
[node name="warrior" parent="." unique_id=1628540794 instance=ExtResource("2_warrior_scene")]
[node name="Skeleton3D" parent="warrior/Armature" parent_id_path=PackedInt32Array(1628540794, 1122658972) index="0" unique_id=1756619771]
bones/0/position = Vector3(0.0073099844, -0.00024791062, 0.51946986)
bones/0/rotation = Quaternion(0.7336017, -0.40976235, -0.46098384, 0.28533718)
bones/1/rotation = Quaternion(0.6953324, 0.35067883, -0.45900282, 0.4276139)
bones/2/rotation = Quaternion(0.5667321, 0.09061526, 0.13510591, 0.8076819)
bones/3/rotation = Quaternion(-0.6401579, -0.12262135, -0.015155749, 0.75824285)
bones/4/rotation = Quaternion(-0.4466983, -0.10617086, 0.00024005448, 0.8883628)
bones/5/rotation = Quaternion(0.77513295, 0.27862963, 0.30337262, 0.4790612)
bones/6/rotation = Quaternion(0.4448868, 0.0130469, 0.2471058, 0.8607232)
bones/7/rotation = Quaternion(-0.45060512, 0.099976465, -0.08400531, 0.8831211)
bones/8/rotation = Quaternion(-0.45842803, 0.1347912, 0.014290656, 0.8783341)
bones/9/rotation = Quaternion(-0.25834036, 0.20522211, 0.11844286, 0.9365444)
bones/10/rotation = Quaternion(0.022619344, 0.08164339, -0.010146947, 0.9963533)
bones/11/rotation = Quaternion(0.09123827, 0.059046026, -0.078700215, 0.9909569)
bones/12/rotation = Quaternion(0.57781017, 0.62083524, -0.13990688, 0.51100403)
bones/13/rotation = Quaternion(0.46895784, 0.08111248, 0.53484404, 0.6981699)
bones/14/rotation = Quaternion(-0.3566624, -0.0653533, 0.09165615, 0.92742664)
bones/15/rotation = Quaternion(-0.0009877216, 0.24114296, -0.086359695, 0.9666391)
bones/16/rotation = Quaternion(-0.5165315, 0.38003513, 0.028065398, -0.7667991)
bones/17/rotation = Quaternion(0.5776718, 0.08903898, -0.5365655, 0.6086582)
bones/18/rotation = Quaternion(-0.28399494, 0.10896846, -0.39559907, 0.8665877)
bones/19/rotation = Quaternion(0.0024361685, -0.54337037, -0.022761738, 0.83918095)
bones/20/rotation = Quaternion(0.25569445, 0.07016864, 0.0060589095, 0.9641889)
bones/21/rotation = Quaternion(0.078519985, 0.08745963, -0.024804013, 0.9927589)
bones/22/rotation = Quaternion(-0.15805918, -2.3112833e-08, 0.0019670601, 0.9874277)
bones/23/rotation = Quaternion(0.5403607, 5.8547363e-09, -0.0067247013, 0.84140664)
[editable path="warrior"]
......@@ -38,7 +38,6 @@ func _get_weapon_config() -> Dictionary:
"attachment_name": "RightHandAttachment",
"weapon_scene_path": "res://assets/models/items/weapons/rapier/rapier.tscn",
"texture_path": "res://assets/models/items/weapons/rapier/rapier_Baked_BaseColor.png",
"preserve_scene_transform": true,
"weapon_position": Vector3(-0.6, 0.0, 0),
"weapon_rotation": Vector3(0, 0, 100)
}
......
......@@ -7,7 +7,7 @@ extends RefCounted
const INVALID_TILE_CELL: Vector3i = Vector3i(2147483647, 2147483647, 2147483647)
const RANGER_SCENE: PackedScene = preload("res://src/entities/units/ranger/ranger_unit.tscn")
const ARCHER_LV1_SCENE: PackedScene = preload("res://src/entities/units/archer/lv1/archer_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")
......@@ -119,8 +119,8 @@ func begin_random_unit_placement() -> void:
## 새 유닛 타입이 추가되면 이 match에만 씬 매핑을 늘리면 배치 흐름은 그대로 재사용됩니다.
func _get_scene_for_unit(unit_data: UnitData) -> PackedScene:
match unit_data.unit_id:
"Unit_Ranger":
return RANGER_SCENE
"Unit_Archer_lv1", "Unit_Ranger":
return ARCHER_LV1_SCENE
"Unit_Mage":
return MAGE_SCENE
"Unit_Warrior_Lv1":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment