From 2d9c6633b58fd774082d49af6b935949dd824da1 Mon Sep 17 00:00:00 2001 From: Jay <96156114+jaydev00a@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:57:14 +0900 Subject: [PATCH 1/2] =?UTF-8?q?DEG-60=20[FEAT]=20=ED=94=8C=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EC=8A=B9=EB=A6=AC=20=ED=8C=A8=EB=B0=B0=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/JAY/Animation/Dead.anim | 3 + Assets/JAY/Animation/Dead.anim.meta | 8 ++ Assets/JAY/Animation/WholeBody.mask | 109 ++++++++++++++++++ Assets/JAY/Animation/WholeBody.mask.meta | 8 ++ Assets/JAY/Animation/Win.anim | 3 + Assets/JAY/Animation/Win.anim.meta | 8 ++ .../Scripts/PlayerState/PlayerStateDead.cs | 22 ++++ .../PlayerState/PlayerStateDead.cs.meta | 3 + .../JAY/Scripts/PlayerState/PlayerStateWin.cs | 22 ++++ .../PlayerState/PlayerStateWin.cs.meta | 3 + 10 files changed, 189 insertions(+) create mode 100644 Assets/JAY/Animation/Dead.anim create mode 100644 Assets/JAY/Animation/Dead.anim.meta create mode 100644 Assets/JAY/Animation/WholeBody.mask create mode 100644 Assets/JAY/Animation/WholeBody.mask.meta create mode 100644 Assets/JAY/Animation/Win.anim create mode 100644 Assets/JAY/Animation/Win.anim.meta create mode 100644 Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs create mode 100644 Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta create mode 100644 Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs create mode 100644 Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta diff --git a/Assets/JAY/Animation/Dead.anim b/Assets/JAY/Animation/Dead.anim new file mode 100644 index 00000000..2199b0f5 --- /dev/null +++ b/Assets/JAY/Animation/Dead.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad0d83df86a9359a0c6c8155736ee5976da3ba1cd2193305968b96aa42686c67 +size 936551 diff --git a/Assets/JAY/Animation/Dead.anim.meta b/Assets/JAY/Animation/Dead.anim.meta new file mode 100644 index 00000000..88b82162 --- /dev/null +++ b/Assets/JAY/Animation/Dead.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26572f377ac934546b30d6d9e0cab051 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/JAY/Animation/WholeBody.mask b/Assets/JAY/Animation/WholeBody.mask new file mode 100644 index 00000000..849725b2 --- /dev/null +++ b/Assets/JAY/Animation/WholeBody.mask @@ -0,0 +1,109 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!319 &31900000 +AvatarMask: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: WholeBody + m_Mask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000 + m_Elements: + - m_Path: + m_Weight: 1 + - m_Path: Body05 + m_Weight: 1 + - m_Path: Eye01 + m_Weight: 1 + - m_Path: Hair01 + m_Weight: 1 + - m_Path: Head01_Male + m_Weight: 1 + - m_Path: Mouth01 + m_Weight: 1 + - m_Path: root + m_Weight: 1 + - m_Path: root/pelvis + m_Weight: 1 + - m_Path: root/pelvis/spine_01 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/BackpackBone + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/shoulderPadJoint_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l/index_02_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/index_01_l/index_02_l/index_03_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l/thumb_02_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/thumb_01_l/thumb_02_l/thumb_03_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_l/upperarm_l/lowerarm_l/hand_l/weapon_l + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/shoulderPadJoint_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r/index_02_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/index_01_r/index_02_r/index_03_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r/thumb_02_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/thumb_01_r/thumb_02_r/thumb_03_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/clavicle_r/upperarm_r/lowerarm_r/hand_r/weapon_r + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01/CloakBone02 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/CloakBone01/CloakBone02/CloakBone03 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/neck_01 + m_Weight: 1 + - m_Path: root/pelvis/spine_01/spine_02/spine_03/neck_01/head + m_Weight: 1 + - m_Path: root/pelvis/thigh_l + m_Weight: 1 + - m_Path: root/pelvis/thigh_l/calf_l + m_Weight: 1 + - m_Path: root/pelvis/thigh_l/calf_l/foot_l + m_Weight: 1 + - m_Path: root/pelvis/thigh_l/calf_l/foot_l/ball_l + m_Weight: 1 + - m_Path: root/pelvis/thigh_r + m_Weight: 1 + - m_Path: root/pelvis/thigh_r/calf_r + m_Weight: 1 + - m_Path: root/pelvis/thigh_r/calf_r/foot_r + m_Weight: 1 + - m_Path: root/pelvis/thigh_r/calf_r/foot_r/ball_r + m_Weight: 1 diff --git a/Assets/JAY/Animation/WholeBody.mask.meta b/Assets/JAY/Animation/WholeBody.mask.meta new file mode 100644 index 00000000..039ab723 --- /dev/null +++ b/Assets/JAY/Animation/WholeBody.mask.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6593ee38fd371db459652c920630d2c9 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 31900000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/JAY/Animation/Win.anim b/Assets/JAY/Animation/Win.anim new file mode 100644 index 00000000..efd6b576 --- /dev/null +++ b/Assets/JAY/Animation/Win.anim @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95e075dd19030d24e7199ebe2413567d8b80e2993d1726120c0c5eac4e8e73a9 +size 1220591 diff --git a/Assets/JAY/Animation/Win.anim.meta b/Assets/JAY/Animation/Win.anim.meta new file mode 100644 index 00000000..07a52f33 --- /dev/null +++ b/Assets/JAY/Animation/Win.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a3b0144fdb439d941b9e9014a1635178 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs b/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs new file mode 100644 index 00000000..7cdc433e --- /dev/null +++ b/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +public class PlayerStateDead : IPlayerState +{ + private PlayerController _playerController; + + public void Enter(PlayerController playerController) + { + _playerController = playerController; + _playerController.PlayerAnimator.SetBool("Dead", true); + } + + public void Update() + { + } + + public void Exit() + { + _playerController.PlayerAnimator.SetBool("Dead", false); + _playerController = null; + } +} diff --git a/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta b/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta new file mode 100644 index 00000000..7d0fa73a --- /dev/null +++ b/Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: b6fc619c4dc14ad98c56d083a62b56b7 +timeCreated: 1745481194 \ No newline at end of file diff --git a/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs b/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs new file mode 100644 index 00000000..83b8a1e4 --- /dev/null +++ b/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs @@ -0,0 +1,22 @@ +using UnityEngine; + +public class PlayerStateWin : IPlayerState +{ + private PlayerController _playerController; + + public void Enter(PlayerController playerController) + { + _playerController = playerController; + _playerController.PlayerAnimator.SetBool("Win", true); + } + + public void Update() + { + } + + public void Exit() + { + _playerController.PlayerAnimator.SetBool("Win", false); + _playerController = null; + } +} diff --git a/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta b/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta new file mode 100644 index 00000000..66374cd1 --- /dev/null +++ b/Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e54b8d32431d4263a6a470f9a150b003 +timeCreated: 1745479273 \ No newline at end of file From 9fc6f23f817b013974db440cf9d32b903ccfb111 Mon Sep 17 00:00:00 2001 From: Jay <96156114+jaydev00a@users.noreply.github.com> Date: Thu, 24 Apr 2025 17:57:55 +0900 Subject: [PATCH 2/2] =?UTF-8?q?DEG-60=20[FEAT]=20Editor=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20=EB=93=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/JAY/Animator/PlayerController.controller | 4 ++-- Assets/JAY/HousingUI.unity | 4 ++-- Assets/JAY/Scripts/PlayerController.cs | 11 ++++++++--- Assets/JAY/Scripts/PlayerControllerEditor.cs | 6 ++++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Assets/JAY/Animator/PlayerController.controller b/Assets/JAY/Animator/PlayerController.controller index 4c9ad755..a31be584 100644 --- a/Assets/JAY/Animator/PlayerController.controller +++ b/Assets/JAY/Animator/PlayerController.controller @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c91b275bd31dd5542b32ae3205c9b28e7dd0225cde394431b345bee95a06306 -size 16228 +oid sha256:c3a3ff387918a08ae9e50522f6f0c415cc09baf0f69809f2dee0a28d72a7fd65 +size 22423 diff --git a/Assets/JAY/HousingUI.unity b/Assets/JAY/HousingUI.unity index 3f604c83..f38c5f0f 100644 --- a/Assets/JAY/HousingUI.unity +++ b/Assets/JAY/HousingUI.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:04d17aad8f57adf668bc3fe3bef9a990ac563a32935d0435a5c934a2e9b8ebda -size 73969 +oid sha256:a163748df40f56fc751a7544b35dd94db65bf2fd32eb7b6eff20ee4defa31190 +size 74027 diff --git a/Assets/JAY/Scripts/PlayerController.cs b/Assets/JAY/Scripts/PlayerController.cs index f1ea7b80..2c841575 100644 --- a/Assets/JAY/Scripts/PlayerController.cs +++ b/Assets/JAY/Scripts/PlayerController.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; -public enum PlayerState { None, Idle, Move, Hit, Dead } +public enum PlayerState { None, Idle, Move, Win, Hit, Dead } public class PlayerController : CharacterBase, IObserver { @@ -24,6 +24,8 @@ public class PlayerController : CharacterBase, IObserver // 상태 관련 private PlayerStateIdle _playerStateIdle; private PlayerStateMove _playerStateMove; + private PlayerStateWin _playerStateWin; + private PlayerStateDead _playerStateDead; // 행동 관련 private PlayerActionAttack _attackAction; @@ -53,11 +55,15 @@ public class PlayerController : CharacterBase, IObserver // 상태 초기화 _playerStateIdle = new PlayerStateIdle(); _playerStateMove = new PlayerStateMove(); + _playerStateWin = new PlayerStateWin(); + _playerStateDead = new PlayerStateDead(); _playerStates = new Dictionary { { PlayerState.Idle, _playerStateIdle }, { PlayerState.Move, _playerStateMove }, + { PlayerState.Win, _playerStateWin }, + { PlayerState.Dead, _playerStateDead }, }; _attackAction = new PlayerActionAttack(); @@ -201,8 +207,6 @@ public class PlayerController : CharacterBase, IObserver public void OnNext(GameObject value) { - Debug.Log("무기 타격"); - float playerAttackPower = _weaponController.AttackPower * attackPower; // 플레이어 공격 데미지(막타는 일반 데미지의 4배) } public void OnError(Exception error) @@ -215,4 +219,5 @@ public class PlayerController : CharacterBase, IObserver } #endregion + } diff --git a/Assets/JAY/Scripts/PlayerControllerEditor.cs b/Assets/JAY/Scripts/PlayerControllerEditor.cs index 2ddbbbe0..ffc4ec76 100644 --- a/Assets/JAY/Scripts/PlayerControllerEditor.cs +++ b/Assets/JAY/Scripts/PlayerControllerEditor.cs @@ -39,10 +39,12 @@ public class PlayerControllerEditor : Editor if (GUILayout.Button("BattleMode")) playerController.SwitchBattleMode(); + if (GUILayout.Button("Win")) + playerController.SetState(PlayerState.Win); // if (GUILayout.Button("Hit")) // playerController.SetState(PlayerState.Hit); - // if (GUILayout.Button("Dead")) - // playerController.SetState(PlayerState.Dead); + if (GUILayout.Button("Dead")) + playerController.SetState(PlayerState.Dead); EditorGUILayout.EndHorizontal(); }