Reviewed-on: #58 Reviewed-by: Sehyeon <sehyeon1837@gmail.com> Reviewed-by: 99jamin <rhwk341@naver.com>
This commit is contained in:
commit
94a25882ed
@ -61,6 +61,9 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
public CharacterController CharacterController => _characterController;
|
public CharacterController CharacterController => _characterController;
|
||||||
public bool IsBattle => _isBattle;
|
public bool IsBattle => _isBattle;
|
||||||
public Transform DashEffectAnchor => dashEffectAnchor;
|
public Transform DashEffectAnchor => dashEffectAnchor;
|
||||||
|
|
||||||
|
[Header("대시, 어택 터치 연출용")]
|
||||||
|
[SerializeField] private DungeonPanelController dungeonPanelController;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
@ -114,6 +117,7 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
// 대시 우선 입력 처리
|
// 대시 우선 입력 처리
|
||||||
if (Input.GetKeyDown(KeyCode.Space))
|
if (Input.GetKeyDown(KeyCode.Space))
|
||||||
{
|
{
|
||||||
|
dungeonPanelController.DashTouchMotion();
|
||||||
StartDashAction();
|
StartDashAction();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -122,6 +126,7 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
|||||||
if (Input.GetKeyDown(KeyCode.X) && (_currentAction == null || !_currentAction.IsActive)
|
if (Input.GetKeyDown(KeyCode.X) && (_currentAction == null || !_currentAction.IsActive)
|
||||||
&& (CurrentState != PlayerState.Win && CurrentState != PlayerState.Dead))
|
&& (CurrentState != PlayerState.Win && CurrentState != PlayerState.Dead))
|
||||||
{
|
{
|
||||||
|
dungeonPanelController.AttackTouchMotion();
|
||||||
GameManager.Instance.PlayPlayerAttackSound();
|
GameManager.Instance.PlayPlayerAttackSound();
|
||||||
StartAttackAction();
|
StartAttackAction();
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,11 @@ public class DungeonPanelController : MonoBehaviour
|
|||||||
private int _countHealth = 0;
|
private int _countHealth = 0;
|
||||||
private int visibleHeartCount = 3; // 강화 레벨로 설정됨
|
private int visibleHeartCount = 3; // 강화 레벨로 설정됨
|
||||||
|
|
||||||
|
//PC 키보드 입력 시 버튼 색상 변경
|
||||||
|
[SerializeField] private GameObject dashPressedImage;
|
||||||
|
[SerializeField] private GameObject attackPressedImage;
|
||||||
|
private float pressedTime = .1f;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
int level = UpgradeManager.Instance.upgradeStat.CurrentUpgradeLevel(StatType.Heart); // 1~3
|
int level = UpgradeManager.Instance.upgradeStat.CurrentUpgradeLevel(StatType.Heart); // 1~3
|
||||||
@ -50,4 +55,36 @@ public class DungeonPanelController : MonoBehaviour
|
|||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.0f);
|
yield return new WaitForSeconds(1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region PC입력 동안 버튼 색상 변경
|
||||||
|
|
||||||
|
public void DashTouchMotion()
|
||||||
|
{
|
||||||
|
StopCoroutine(DashButtonColorChange());
|
||||||
|
StartCoroutine(DashButtonColorChange());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AttackTouchMotion()
|
||||||
|
{
|
||||||
|
StopCoroutine(AttackButtonColorChange());
|
||||||
|
StartCoroutine(AttackButtonColorChange());
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator DashButtonColorChange()
|
||||||
|
{
|
||||||
|
dashPressedImage.SetActive(true);
|
||||||
|
yield return new WaitForSeconds(pressedTime);
|
||||||
|
dashPressedImage.SetActive(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
private IEnumerator AttackButtonColorChange()
|
||||||
|
{
|
||||||
|
attackPressedImage.SetActive(true);
|
||||||
|
yield return new WaitForSeconds(pressedTime);
|
||||||
|
attackPressedImage.SetActive(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/LIN/Prefabs/Attack Button Image.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/LIN/Prefabs/Attack Button Image.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/LIN/Prefabs/Attack Button Image.prefab.meta
Normal file
7
Assets/LIN/Prefabs/Attack Button Image.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8822dc0c2e8b5bc498036a19194f8827
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/LIN/Prefabs/Dash Button Image.prefab
(Stored with Git LFS)
Normal file
BIN
Assets/LIN/Prefabs/Dash Button Image.prefab
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/LIN/Prefabs/Dash Button Image.prefab.meta
Normal file
7
Assets/LIN/Prefabs/Dash Button Image.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 76f779210ea250641b4559dfc6d379b5
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/LIN/ReDungeon UI Copy.unity
(Stored with Git LFS)
Normal file
BIN
Assets/LIN/ReDungeon UI Copy.unity
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Assets/LIN/ReDungeon UI Copy.unity.meta
Normal file
7
Assets/LIN/ReDungeon UI Copy.unity.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ce2ba637dd19c434fa2eb509c2ad4270
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/LIN/ReHousing Loding Anim.unity
(Stored with Git LFS)
BIN
Assets/LIN/ReHousing Loding Anim.unity
(Stored with Git LFS)
Binary file not shown.
@ -16,6 +16,7 @@ public class InteractionController : MonoBehaviour
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
PlayerStats.Instance.OnWorked -= SuddenAfterWorkEventHappen;
|
||||||
PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen;
|
PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen;
|
||||||
PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController);
|
PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController);
|
||||||
}
|
}
|
||||||
|
@ -31,19 +31,6 @@ public class HousingCanvasController : MonoBehaviour
|
|||||||
interactionButton.SetActive(false);
|
interactionButton.SetActive(false);
|
||||||
suddenPanel.SetActive(false);
|
suddenPanel.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 씬전환 로딩 패널 테스트용 코드.던전에서도 씬전환 할 때 해당 코드 사용하시면 됩니다.
|
|
||||||
/// </summary>
|
|
||||||
private void Update()
|
|
||||||
{
|
|
||||||
if (Input.GetKeyDown(KeyCode.A))
|
|
||||||
{
|
|
||||||
var _switchingPanel = Instantiate(switchingPanel,this.transform);
|
|
||||||
switchingPanelController = _switchingPanel.GetComponent<SwitchingPanelController>();
|
|
||||||
switchingPanelController.FadeAndSceneLoad("ReDungeon");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region NPC 상호 작용
|
#region NPC 상호 작용
|
||||||
|
|
||||||
|
BIN
Assets/Prefabs/ReDungeon/Canvas.prefab
(Stored with Git LFS)
BIN
Assets/Prefabs/ReDungeon/Canvas.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/Prefabs/ReHousing/Canvas.prefab
(Stored with Git LFS)
BIN
Assets/Prefabs/ReHousing/Canvas.prefab
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user