Merge pull request #23 from Degulleo/DEG-60-플레이어-승리-구현
Deg 60 플레이어 승리 구현
This commit is contained in:
commit
5e61ff03c9
BIN
Assets/JAY/Animation/Dead.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Dead.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Dead.anim.meta
Normal file
8
Assets/JAY/Animation/Dead.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 26572f377ac934546b30d6d9e0cab051
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
109
Assets/JAY/Animation/WholeBody.mask
Normal file
109
Assets/JAY/Animation/WholeBody.mask
Normal file
@ -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
|
8
Assets/JAY/Animation/WholeBody.mask.meta
Normal file
8
Assets/JAY/Animation/WholeBody.mask.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6593ee38fd371db459652c920630d2c9
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 31900000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/JAY/Animation/Win.anim
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/Animation/Win.anim
(Stored with Git LFS)
Normal file
Binary file not shown.
8
Assets/JAY/Animation/Win.anim.meta
Normal file
8
Assets/JAY/Animation/Win.anim.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a3b0144fdb439d941b9e9014a1635178
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 7400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/JAY/Animator/PlayerController.controller
(Stored with Git LFS)
BIN
Assets/JAY/Animator/PlayerController.controller
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
Binary file not shown.
@ -3,7 +3,7 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public enum PlayerState { None, Idle, Move, Hit, Dead }
|
public enum PlayerState { None, Idle, Move, Win, Hit, Dead }
|
||||||
|
|
||||||
public class PlayerController : CharacterBase, IObserver<GameObject>
|
public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||||
{
|
{
|
||||||
@ -24,6 +24,8 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
// 상태 관련
|
// 상태 관련
|
||||||
private PlayerStateIdle _playerStateIdle;
|
private PlayerStateIdle _playerStateIdle;
|
||||||
private PlayerStateMove _playerStateMove;
|
private PlayerStateMove _playerStateMove;
|
||||||
|
private PlayerStateWin _playerStateWin;
|
||||||
|
private PlayerStateDead _playerStateDead;
|
||||||
|
|
||||||
// 행동 관련
|
// 행동 관련
|
||||||
private PlayerActionAttack _attackAction;
|
private PlayerActionAttack _attackAction;
|
||||||
@ -53,11 +55,15 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
// 상태 초기화
|
// 상태 초기화
|
||||||
_playerStateIdle = new PlayerStateIdle();
|
_playerStateIdle = new PlayerStateIdle();
|
||||||
_playerStateMove = new PlayerStateMove();
|
_playerStateMove = new PlayerStateMove();
|
||||||
|
_playerStateWin = new PlayerStateWin();
|
||||||
|
_playerStateDead = new PlayerStateDead();
|
||||||
|
|
||||||
_playerStates = new Dictionary<PlayerState, IPlayerState>
|
_playerStates = new Dictionary<PlayerState, IPlayerState>
|
||||||
{
|
{
|
||||||
{ PlayerState.Idle, _playerStateIdle },
|
{ PlayerState.Idle, _playerStateIdle },
|
||||||
{ PlayerState.Move, _playerStateMove },
|
{ PlayerState.Move, _playerStateMove },
|
||||||
|
{ PlayerState.Win, _playerStateWin },
|
||||||
|
{ PlayerState.Dead, _playerStateDead },
|
||||||
};
|
};
|
||||||
|
|
||||||
_attackAction = new PlayerActionAttack();
|
_attackAction = new PlayerActionAttack();
|
||||||
@ -201,8 +207,6 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
|
|
||||||
public void OnNext(GameObject value)
|
public void OnNext(GameObject value)
|
||||||
{
|
{
|
||||||
Debug.Log("무기 타격");
|
|
||||||
float playerAttackPower = _weaponController.AttackPower * attackPower; // 플레이어 공격 데미지(막타는 일반 데미지의 4배)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnError(Exception error)
|
public void OnError(Exception error)
|
||||||
@ -215,4 +219,5 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,12 @@ public class PlayerControllerEditor : Editor
|
|||||||
|
|
||||||
if (GUILayout.Button("BattleMode"))
|
if (GUILayout.Button("BattleMode"))
|
||||||
playerController.SwitchBattleMode();
|
playerController.SwitchBattleMode();
|
||||||
|
if (GUILayout.Button("Win"))
|
||||||
|
playerController.SetState(PlayerState.Win);
|
||||||
// if (GUILayout.Button("Hit"))
|
// if (GUILayout.Button("Hit"))
|
||||||
// playerController.SetState(PlayerState.Hit);
|
// playerController.SetState(PlayerState.Hit);
|
||||||
// if (GUILayout.Button("Dead"))
|
if (GUILayout.Button("Dead"))
|
||||||
// playerController.SetState(PlayerState.Dead);
|
playerController.SetState(PlayerState.Dead);
|
||||||
|
|
||||||
EditorGUILayout.EndHorizontal();
|
EditorGUILayout.EndHorizontal();
|
||||||
}
|
}
|
||||||
|
22
Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs
Normal file
22
Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
3
Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta
Normal file
3
Assets/JAY/Scripts/PlayerState/PlayerStateDead.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b6fc619c4dc14ad98c56d083a62b56b7
|
||||||
|
timeCreated: 1745481194
|
22
Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs
Normal file
22
Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs
Normal file
@ -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;
|
||||||
|
}
|
||||||
|
}
|
3
Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta
Normal file
3
Assets/JAY/Scripts/PlayerState/PlayerStateWin.cs.meta
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: e54b8d32431d4263a6a470f9a150b003
|
||||||
|
timeCreated: 1745479273
|
Loading…
x
Reference in New Issue
Block a user