DEG-16 [UPDATE] UI에 플레이어 조작 연동
This commit is contained in:
parent
8d171983a1
commit
d7fef392ae
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
Normal file
BIN
Assets/JAY/HousingUI.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/JAY/HousingUI.unity.meta
Normal file
7
Assets/JAY/HousingUI.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ec2c7383c46ec645b868688b4e2950f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -25,7 +25,7 @@ public class PlayerController : CharacterBase
|
||||
private PlayerStateMove _playerStateMove;
|
||||
|
||||
// 외부에서도 사용하는 변수
|
||||
public VariableJoystick joystick { get; private set; }
|
||||
public FixedJoystick joystick { get; private set; }
|
||||
public PlayerState CurrentState { get; private set; }
|
||||
private Dictionary<PlayerState, IPlayerState> _playerStates;
|
||||
public Animator PlayerAnimator { get; private set; }
|
||||
@ -37,7 +37,7 @@ public class PlayerController : CharacterBase
|
||||
_characterController = GetComponent<CharacterController>();
|
||||
if (joystick == null)
|
||||
{
|
||||
joystick = FindObjectOfType<VariableJoystick>();
|
||||
joystick = FindObjectOfType<FixedJoystick>();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ public class PlayerControllerEditor : Editor
|
||||
// 지면 접촉 상태
|
||||
GUI.backgroundColor = Color.white;
|
||||
EditorGUILayout.Space();
|
||||
EditorGUILayout.LabelField("캐릭터 위치 디버그 정보", EditorStyles.boldLabel);
|
||||
EditorGUILayout.LabelField("캐릭터 디버그 정보", EditorStyles.boldLabel);
|
||||
// GUI.enabled = false;
|
||||
// EditorGUILayout.Toggle("지면 접촉", playerController.IsGrounded);
|
||||
// GUI.enabled = true;
|
||||
@ -37,10 +37,6 @@ public class PlayerControllerEditor : Editor
|
||||
// 강제로 상태 변경 버튼
|
||||
EditorGUILayout.BeginHorizontal();
|
||||
|
||||
if (GUILayout.Button("Idle"))
|
||||
playerController.SetState(PlayerState.Idle);
|
||||
if (GUILayout.Button("Move"))
|
||||
playerController.SetState(PlayerState.Move);
|
||||
if (GUILayout.Button("BattleMode"))
|
||||
playerController.SwitchBattleMode();
|
||||
// if (GUILayout.Button("Attack"))
|
||||
|
@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerStateIdle : MonoBehaviour, IPlayerState
|
||||
public class PlayerStateIdle : IPlayerState
|
||||
{
|
||||
private PlayerController _playerController;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerStateMove : MonoBehaviour, IPlayerState
|
||||
public class PlayerStateMove : IPlayerState
|
||||
{
|
||||
private static readonly int Move = Animator.StringToHash("Move");
|
||||
private PlayerController _playerController;
|
||||
|
Loading…
x
Reference in New Issue
Block a user