Commit b87499ae authored by Gavin An's avatar Gavin An

작업 중

parent 9168d476
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://7aw71ibtccuf"
path="res://.godot/imported/azure_blade.fbx-425d5168a712b651930f75a0427db998.scn"
[deps]
source_file="res://assets/models/monsters/azure_blade.fbx"
dest_files=["res://.godot/imported/azure_blade.fbx-425d5168a712b651930f75a0427db998.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
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=true
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={}
fbx/importer=0
fbx/allow_geometry_helper_nodes=false
fbx/embedded_image_handling=1
fbx/naming_version=2
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fye2cyrwwe8o"
path.s3tc="res://.godot/imported/azure_blade_0.png-608beba35bccc9adab994252aea003af.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "7632a7275d12e7d54a8291642fe0ee63"
}
[deps]
source_file="res://assets/models/monsters/azure_blade_0.png"
dest_files=["res://.godot/imported/azure_blade_0.png-608beba35bccc9adab994252aea003af.s3tc.ctex"]
[params]
compress/mode=2
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=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
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c3qqd8c1bgy5j"
path.s3tc="res://.godot/imported/azure_blade_1.png-122ec6698eb977084ec19a953030f078.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
generator_parameters={
"md5": "40c6fd3e4a271bacfc2f002cc1b6de20"
}
[deps]
source_file="res://assets/models/monsters/azure_blade_1.png"
dest_files=["res://.godot/imported/azure_blade_1.png-122ec6698eb977084ec19a953030f078.s3tc.ctex"]
[params]
compress/mode=2
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=1
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal="res://assets/models/monsters/azure_blade_1.png"
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
...@@ -4,12 +4,12 @@ importer="scene" ...@@ -4,12 +4,12 @@ importer="scene"
importer_version=1 importer_version=1
type="PackedScene" type="PackedScene"
uid="uid://ddqbm4y6brray" uid="uid://ddqbm4y6brray"
path="res://.godot/imported/striker.fbx-bc1f4af7c3cd42cf4653a106a2b4cd60.scn" path="res://.godot/imported/striker.fbx-49fd3adbc524a538ae9adeae2695cd2a.scn"
[deps] [deps]
source_file="res://assets/models/units/striker.fbx" source_file="res://assets/models/units/striker/striker.fbx"
dest_files=["res://.godot/imported/striker.fbx-bc1f4af7c3cd42cf4653a106a2b4cd60.scn"] dest_files=["res://.godot/imported/striker.fbx-49fd3adbc524a538ae9adeae2695cd2a.scn"]
[params] [params]
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
importer="texture" importer="texture"
type="CompressedTexture2D" type="CompressedTexture2D"
uid="uid://ccilxf3k1hhpb" uid="uid://ccilxf3k1hhpb"
path.s3tc="res://.godot/imported/striker_0.png-33c061e5427709c43bfd101c9c356d76.s3tc.ctex" path.s3tc="res://.godot/imported/striker_0.png-659efdfa4934f050dc55ce39840ff050.s3tc.ctex"
metadata={ metadata={
"imported_formats": ["s3tc_bptc"], "imported_formats": ["s3tc_bptc"],
"vram_texture": true "vram_texture": true
...@@ -14,8 +14,8 @@ generator_parameters={ ...@@ -14,8 +14,8 @@ generator_parameters={
[deps] [deps]
source_file="res://assets/models/units/striker_0.png" source_file="res://assets/models/units/striker/striker_0.png"
dest_files=["res://.godot/imported/striker_0.png-33c061e5427709c43bfd101c9c356d76.s3tc.ctex"] dest_files=["res://.godot/imported/striker_0.png-659efdfa4934f050dc55ce39840ff050.s3tc.ctex"]
[params] [params]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -57,6 +57,8 @@ ...@@ -57,6 +57,8 @@
- [x] `base_unit.gd`를 리팩토링하여 불필요한 런타임 FBX 로더 및 런타임 스케일 세팅 코드를 모두 제거하고, 씬에 구성된 노드를 인계받는 구조로 슬림화 - [x] `base_unit.gd`를 리팩토링하여 불필요한 런타임 FBX 로더 및 런타임 스케일 세팅 코드를 모두 제거하고, 씬에 구성된 노드를 인계받는 구조로 슬림화
- [x] `hud.gd`에 소환 씬 분기 기능을 도입하여, 소환 시 ID에 맞춰 Striker 유닛일 때 전용 `striker_unit.tscn`을 소환하도록 구현 - [x] `hud.gd`에 소환 씬 분기 기능을 도입하여, 소환 시 ID에 맞춰 Striker 유닛일 때 전용 `striker_unit.tscn`을 소환하도록 구현
- [x] 유닛이 스폰될 때 3D 모델 하위 메쉬에 `striker_0.png` 텍스처를 씌우는 오버라이드 매핑 기능을 작동시켜 모델 렌더 텍스처 출력 완료 - [x] 유닛이 스폰될 때 3D 모델 하위 메쉬에 `striker_0.png` 텍스처를 씌우는 오버라이드 매핑 기능을 작동시켜 모델 렌더 텍스처 출력 완료
- [x] `assets/models/units/striker/` 폴더 내부의 개별 애니메이션 FBX 파일들(`striker_idle.fbx`, `striker_walk.fbx`, `striker_run.fbx`, `striker_attack.fbx`)을 추출하여 단일 `AnimationLibrary` 리소스(`striker_animations.tres`)로 병합 완료
- [x] `base_unit.gd`에서 `striker_animations.tres`를 런타임에 동적으로 주입하여 유닛 상태(대기, 이동, 공격)에 맞게 `idle`, `run`, `attack` 애니메이션이 호출되도록 유기적 연동 완료
--- ---
......
...@@ -49,6 +49,12 @@ func _ready() -> void: ...@@ -49,6 +49,12 @@ func _ready() -> void:
_model_anim_player = _find_animation_player(_model_instance) _model_anim_player = _find_animation_player(_model_instance)
if _model_anim_player: if _model_anim_player:
print("BaseUnit: Linked pre-configured striker model & AnimationPlayer.") print("BaseUnit: Linked pre-configured striker model & AnimationPlayer.")
var anim_lib_path: String = "res://assets/models/units/striker/striker_animations.tres"
if ResourceLoader.exists(anim_lib_path):
var lib: AnimationLibrary = load(anim_lib_path) as AnimationLibrary
if lib:
_model_anim_player.add_animation_library("striker", lib)
print("BaseUnit: Loaded and registered striker animations library successfully.")
...@@ -249,23 +255,39 @@ func _update_animations() -> void: ...@@ -249,23 +255,39 @@ func _update_animations() -> void:
if not _model_anim_player: if not _model_anim_player:
return return
# 사용할 애니메이션 클립 이름 # 라이브러리가 주입되었는지 확인
var has_striker_anims: bool = _model_anim_player.has_animation("striker/idle")
if has_striker_anims:
# 1. 공격 중 상태: 공격 타이머 차감 후 쿨타임 구간의 초입 0.4초간은 공격 애니메이션 우선 재생
if _attack_timer > (unit_data.cooldown - 0.4):
if _last_anim_state != "attack":
_last_anim_state = "attack"
_model_anim_player.play("striker/attack", -1, 1.5)
# 2. 이동 중 상태: 속도 벡터가 존재할 때 (이동 상태)
elif velocity.length() > 0.1:
if _last_anim_state != "move":
_last_anim_state = "move"
_model_anim_player.play("striker/run", -1, 1.2)
# 3. 대기(Idle) 상태: 정지 상태일 때 대기 애니메이션 재생
else:
if _last_anim_state != "idle":
_last_anim_state = "idle"
_model_anim_player.play("striker/idle", -1, 1.0)
else:
# Fallback: 기존 Jump 애니메이션 처리
var anim_name: String = "Armature|Armature|Basic_Jump|baselayer" var anim_name: String = "Armature|Armature|Basic_Jump|baselayer"
if not _model_anim_player.has_animation(anim_name): if not _model_anim_player.has_animation(anim_name):
return return
# 1. 공격 중 상태: 공격 타이머 차감 후 쿨타임 구간의 초입 0.4초간은 공격 애니메이션 우선 재생
# Striker의 공격 속도(cooldown)는 0.5초이므로, 공격 직후 0.4초 동안 2.5배속으로 순간 재생하면 활기찬 펀칭 타격을 표현함
if _attack_timer > (unit_data.cooldown - 0.4): if _attack_timer > (unit_data.cooldown - 0.4):
if _last_anim_state != "attack": if _last_anim_state != "attack":
_last_anim_state = "attack" _last_anim_state = "attack"
_model_anim_player.play(anim_name, -1, 2.5) _model_anim_player.play(anim_name, -1, 2.5)
# 2. 이동 중 상태: 속도 벡터가 존재할 때 (이동 상태)
elif velocity.length() > 0.1: elif velocity.length() > 0.1:
if _last_anim_state != "move": if _last_anim_state != "move":
_last_anim_state = "move" _last_anim_state = "move"
_model_anim_player.play(anim_name, -1, 1.5) _model_anim_player.play(anim_name, -1, 1.5)
# 3. 대기(Idle) 상태: 정지 상태일 때 애니메이션 정지 처리 (T-Pose 상태로 대기)
else: else:
if _last_anim_state != "idle": if _last_anim_state != "idle":
_last_anim_state = "idle" _last_anim_state = "idle"
......
[gd_scene format=3 uid="uid://c2aiejcidlihv"]
[ext_resource type="PackedScene" uid="uid://ddqbm4y6brray" path="res://assets/models/units/striker/striker.fbx" id="1_o8xnq"]
[node name="striker" unique_id=1533136548 instance=ExtResource("1_o8xnq")]
transform = Transform3D(-1, 0, -8.742278e-08, 0, 1, 0, 8.742278e-08, 0, -1, 0, 0, 0)
[gd_scene format=3 uid="uid://dwvbc5m3myqbk"] [gd_scene format=3 uid="uid://dwvbc5m3myqbk"]
[ext_resource type="Script" uid="uid://daq4ko8ryry3w" path="res://src/entities/units/base_unit.gd" id="1_base_unit"] [ext_resource type="Script" uid="uid://daq4ko8ryry3w" path="res://src/entities/units/base_unit.gd" id="1_base_unit"]
[ext_resource type="PackedScene" uid="uid://ddqbm4y6brray" path="res://assets/models/units/striker.fbx" id="2_striker_fbx"] [ext_resource type="PackedScene" uid="uid://c2aiejcidlihv" path="res://src/entities/units/striker/striker.tscn" id="2_iytoq"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_body"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_body"]
radius = 0.4 radius = 0.4
...@@ -40,4 +40,4 @@ mesh = SubResource("TorusMesh_selection") ...@@ -40,4 +40,4 @@ mesh = SubResource("TorusMesh_selection")
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=462079662] [node name="NavigationAgent3D" type="NavigationAgent3D" parent="." unique_id=462079662]
[node name="striker" parent="." unique_id=1562791213 instance=ExtResource("2_striker_fbx")] [node name="striker" parent="." unique_id=1533136548 instance=ExtResource("2_iytoq")]
...@@ -42,3 +42,9 @@ ...@@ -42,3 +42,9 @@
- 하단: 유닛 소환 버튼 (100골드 소모) 및 선택된 유닛 정보 창 - 하단: 유닛 소환 버튼 (100골드 소모) 및 선택된 유닛 정보 창
- [x] 소환 버튼 클릭 시 맵 중앙의 소환 구역(Spawn Zone)에 20% 확률로 5종 유닛 중 무작위 소환 - [x] 소환 버튼 클릭 시 맵 중앙의 소환 구역(Spawn Zone)에 20% 확률로 5종 유닛 중 무작위 소환
- [x] 게임 오버 및 게임 승리 결과 팝업 UI 구현 - [x] 게임 오버 및 게임 승리 결과 팝업 UI 구현
## [x] 7단계 & 8단계: Striker 전용 씬 분리 및 애니메이션 병합
- [x] Striker 전용 폴더 및 `striker_unit.tscn` 씬 파일 생성하여 FBX 인스턴스 링킹
- [x] `base_unit.gd``hud.gd` 리팩토링을 통해 소환 시 전용 씬 분기 소환 및 텍스처 오버라이드 맵핑 적용
- [x] 개별 FBX 파일들(`striker_idle.fbx`, `striker_walk.fbx`, `striker_run.fbx`, `striker_attack.fbx`)을 툴 스크립트로 단일 `AnimationLibrary` 리소스(`striker_animations.tres`)로 병합 완료
- [x] `base_unit.gd`에서 병합된 애니메이션 라이브러리를 동적 로드 및 주입하여 상태(Idle, Move, Attack)별 실제 애니메이션 연동 완료
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