Merge branch 'main' into DEG-165-세이브-강화-폴리싱
This commit is contained in:
commit
e1cc3a8c80
@ -63,6 +63,9 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
public CharacterController CharacterController => _characterController;
|
||||
public bool IsBattle => _isBattle;
|
||||
public Transform DashEffectAnchor => dashEffectAnchor;
|
||||
|
||||
[Header("대시, 어택 터치 연출용")]
|
||||
[SerializeField] private DungeonPanelController dungeonPanelController;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@ -126,6 +129,7 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
// 대시 우선 입력 처리
|
||||
if (Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
dungeonPanelController.DashTouchMotion();
|
||||
StartDashAction();
|
||||
return;
|
||||
}
|
||||
@ -134,6 +138,7 @@ public class PlayerController : CharacterBase, IObserver<GameObject>
|
||||
if (Input.GetKeyDown(KeyCode.X) && (_currentAction == null || !_currentAction.IsActive)
|
||||
&& (CurrentState != PlayerState.Win && CurrentState != PlayerState.Dead))
|
||||
{
|
||||
dungeonPanelController.AttackTouchMotion();
|
||||
GameManager.Instance.PlayPlayerAttackSound();
|
||||
StartAttackAction();
|
||||
}
|
||||
|
@ -109,7 +109,11 @@ public class DungeonLogic : MonoBehaviour
|
||||
_player.SetState(PlayerState.Win);
|
||||
|
||||
// TODO: 강화 시스템으로 넘어가고 일상 맵으로 이동
|
||||
GameManager.Instance.PanelManager.GetPanel("ClearPanelBG");
|
||||
var clearPanel = GameManager.Instance.PanelManager.GetPanel("ClearPanelBG").GetComponent<ClearPanelController>();
|
||||
clearPanel.Show(() =>
|
||||
{
|
||||
UpgradeManager.Instance.StartUpgrade();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +132,11 @@ public class DungeonLogic : MonoBehaviour
|
||||
_player.gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
|
||||
_enemy.SetState(EnemyState.Idle);
|
||||
|
||||
GameManager.Instance.PanelManager.GetPanel("FailedPanelBG");
|
||||
var failedPanel = GameManager.Instance.PanelManager.GetPanel("FailedPanelBG").GetComponent<FailedPanelController>();
|
||||
failedPanel.Show(() =>
|
||||
{
|
||||
//Todo: 실패 패널 이후 진행할 행동
|
||||
});
|
||||
|
||||
StartCoroutine(DelayedSceneChange()); // 5초 대기 후 전환
|
||||
}
|
||||
|
@ -11,6 +11,11 @@ public class DungeonPanelController : MonoBehaviour
|
||||
private int _countHealth = 0;
|
||||
private int visibleHeartCount = 3; // 강화 레벨로 설정됨
|
||||
|
||||
//PC 키보드 입력 시 버튼 색상 변경
|
||||
[SerializeField] private GameObject dashPressedImage;
|
||||
[SerializeField] private GameObject attackPressedImage;
|
||||
private float pressedTime = .1f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
int level = UpgradeManager.Instance.upgradeStat.CurrentUpgradeLevel(StatType.Heart); // 1~3
|
||||
@ -50,4 +55,36 @@ public class DungeonPanelController : MonoBehaviour
|
||||
{
|
||||
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
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ public class PlayerStats : MonoBehaviour,ISaveable
|
||||
private bool _isActiveBubble;
|
||||
private bool _hasShownBubbleToday; // 하루에 말풍선 하나만 표시하기
|
||||
private InteractionAnimationPanelController _interactionAnimation; // 상호작용 패널 Active 여부 확인
|
||||
private HousingCanvasController _housingCanvasController; // 돌발 패널 Active 여부 확인
|
||||
|
||||
private int _mealCount;
|
||||
public int MealCount => _mealCount;
|
||||
@ -150,9 +151,15 @@ public class PlayerStats : MonoBehaviour,ISaveable
|
||||
_interactionAnimation = panelController;
|
||||
}
|
||||
|
||||
public void SetHousingCanvasController(HousingCanvasController canvasController)
|
||||
{
|
||||
_housingCanvasController = canvasController;
|
||||
}
|
||||
|
||||
public void ShowBubble()
|
||||
{
|
||||
if (_interactionAnimation != null && _interactionAnimation.IsPanelActive()) return;
|
||||
if (_housingCanvasController != null && _housingCanvasController.IsSuddenPanelActive()) return;
|
||||
|
||||
if(_isActiveBubble)
|
||||
_speechBubbleFollower.ShowMessage();
|
||||
|
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
BIN
Assets/KSH/ReDungeon.unity
(Stored with Git LFS)
Binary file not shown.
@ -41,7 +41,7 @@ public class ValueByAction
|
||||
{ ActionType.Dungeon, new ActionEffect(+3.0f, -3.0f, 0) },
|
||||
{ ActionType.Housework, new ActionEffect(+1.0f, -1.0f, +0.2f) },
|
||||
{ ActionType.OvertimeWork, new ActionEffect(+4.0f, -5.0f, +1.0f) },
|
||||
{ ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, _gameConstants.forcedValue, 0) }, // 수면 강제(8시 기상) 후 최대 체력
|
||||
{ ActionType.TeamDinner, new ActionEffect(_gameConstants.forcedValue, +8.0f, 0) }, // 수면 강제(8시 기상) 후 최대 체력
|
||||
{ ActionType.Absence, new ActionEffect(0, 0, -3.0f) }
|
||||
};
|
||||
}
|
||||
|
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,8 +16,10 @@ public class InteractionController : MonoBehaviour
|
||||
|
||||
private void Start()
|
||||
{
|
||||
PlayerStats.Instance.OnWorked -= SuddenAfterWorkEventHappen;
|
||||
PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen;
|
||||
PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController);
|
||||
PlayerStats.Instance.SetHousingCanvasController(housingCanvasController);
|
||||
}
|
||||
|
||||
// 상호작용 가능한 사물 범위에 들어올 때
|
||||
|
@ -31,19 +31,6 @@ public class HousingCanvasController : MonoBehaviour
|
||||
interactionButton.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 상호 작용
|
||||
|
||||
@ -152,6 +139,12 @@ public class HousingCanvasController : MonoBehaviour
|
||||
|
||||
_autoHideCoroutine = null;
|
||||
}
|
||||
|
||||
public bool IsSuddenPanelActive()
|
||||
{
|
||||
return suddenPanel.activeSelf;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.PlayerLoop;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ClearPanelController : PanelController, IPointerClickHandler
|
||||
@ -12,23 +11,9 @@ public class ClearPanelController : PanelController, IPointerClickHandler
|
||||
[SerializeField] private CanvasGroup clearPanel;
|
||||
[SerializeField] private Image clearPanelArmImage;
|
||||
[SerializeField] private Image clearTextImage;
|
||||
|
||||
private Image _clearPanelBGImage;
|
||||
public Action onCompleted;
|
||||
[SerializeField] private Image clearPanelBGImage;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
_clearPanelBGImage = GetComponent<Image>();
|
||||
}
|
||||
private void Start()
|
||||
{
|
||||
//임시 코드
|
||||
Show(() =>
|
||||
{
|
||||
Debug.Log("OnCompleted");
|
||||
});
|
||||
}
|
||||
public Action onCompleted;
|
||||
|
||||
public void Show(Action onCompleted)
|
||||
{
|
||||
@ -39,7 +24,7 @@ public class ClearPanelController : PanelController, IPointerClickHandler
|
||||
|
||||
private void Init()
|
||||
{
|
||||
_clearPanelBGImage.DOFade(0, 0);
|
||||
clearPanelBGImage.DOFade(0, 0);
|
||||
clearTextImage.rectTransform.localScale = Vector3.zero;
|
||||
clearTextImage.DOFade(0, 0);
|
||||
clearPanel.DOFade(0, 0);
|
||||
@ -49,7 +34,7 @@ public class ClearPanelController : PanelController, IPointerClickHandler
|
||||
private void ClearAnimation()
|
||||
{
|
||||
Sequence seq = DOTween.Sequence();
|
||||
seq.Append(_clearPanelBGImage.DOFade(0.98f, 0.5f))
|
||||
seq.Append(clearPanelBGImage.DOFade(0.98f, 0.5f))
|
||||
.Append(clearPanel.DOFade(1, 0.5f))
|
||||
.Append(clearPanelArmImage.rectTransform.DORotate(new Vector3(0, 0, 15), 0.3f))
|
||||
.Append(clearPanelArmImage.rectTransform.DORotate(Vector3.zero, 0.3f))
|
||||
@ -61,6 +46,5 @@ public class ClearPanelController : PanelController, IPointerClickHandler
|
||||
{
|
||||
onCompleted?.Invoke();
|
||||
Hide();
|
||||
UpgradeManager.Instance.StartUpgrade();
|
||||
}
|
||||
}
|
@ -11,24 +11,9 @@ public class FailedPanelController : PanelController, IPointerClickHandler
|
||||
[SerializeField] private CanvasGroup failedPanel;
|
||||
[SerializeField] private Image failedPanelArmImage;
|
||||
[SerializeField] private Image failedTextImage;
|
||||
|
||||
private Image _failedPanelBGImage;
|
||||
public Action onCompleted;
|
||||
[SerializeField] private Image failedPanelBGImage;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
_failedPanelBGImage = GetComponent<Image>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//임시 코드
|
||||
Show(() =>
|
||||
{
|
||||
Debug.Log("OnCompleted");
|
||||
});
|
||||
}
|
||||
public Action onCompleted;
|
||||
|
||||
public void Show(Action onCompleted)
|
||||
{
|
||||
@ -39,7 +24,7 @@ public class FailedPanelController : PanelController, IPointerClickHandler
|
||||
|
||||
private void Init()
|
||||
{
|
||||
_failedPanelBGImage.DOFade(0, 0);
|
||||
failedPanelBGImage.DOFade(0, 0);
|
||||
failedTextImage.DOFade(0, 0);
|
||||
failedTextImage.rectTransform.DOScale(0, 0);
|
||||
failedPanel.DOFade(0, 0);
|
||||
@ -49,7 +34,7 @@ public class FailedPanelController : PanelController, IPointerClickHandler
|
||||
private void FailedAnimation()
|
||||
{
|
||||
Sequence seq = DOTween.Sequence();
|
||||
seq.Append(_failedPanelBGImage.DOFade(0.98f, 0.5f))
|
||||
seq.Append(failedPanelBGImage.DOFade(0.98f, 0.5f))
|
||||
.Append(failedPanel.DOFade(1, 0.5f))
|
||||
.Append(failedPanelArmImage.rectTransform.DORotate(new Vector3(0, 0, 15), 0.3f))
|
||||
.Append(failedPanelArmImage.rectTransform.DORotate(Vector3.zero, 0.3f))
|
||||
|
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.
BIN
Assets/Resources/Prefabs/Panels/ClearPanelBG.prefab
(Stored with Git LFS)
BIN
Assets/Resources/Prefabs/Panels/ClearPanelBG.prefab
(Stored with Git LFS)
Binary file not shown.
BIN
Assets/Resources/Prefabs/Panels/FailedPanelBG.prefab
(Stored with Git LFS)
BIN
Assets/Resources/Prefabs/Panels/FailedPanelBG.prefab
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user