+ Item관련 Excel, Json, So 수정 + DropItemTable 로직 수정 + 아이템 프리팹에서 Enable Interaction 체크하면 직접 룻팅, 해제하면 자동 룻팅 + 체력회복 아이템 추가 + 개발자 메뉴 상호작용 "F1" 키를 통해 접근 가능 + 보스 맵은 마법진을 상호작용하면 보스전 시작 + 맵 안에서 교전 중일 때, 투명 벽 쉐이더 추가 + 맵 마다의 통로를 통해서 이동 가능 + 선형적인 맵 구조에 맞게 리소스 및 위치 수정 + 타이틀 화면으로 이동할 때 나타나는 오류 수정(CombatUiManager OnDisable 싱글톤 문제) Closes #25, #26
74 lines
2.3 KiB
C#
74 lines
2.3 KiB
C#
using Sirenix.OdinInspector;
|
|
using UnityEngine;
|
|
|
|
namespace BlueWater.Uis
|
|
{
|
|
public enum TutorialState
|
|
{
|
|
None = 0,
|
|
First,
|
|
Second,
|
|
End
|
|
}
|
|
|
|
public class CombatTutorialUi : MonoBehaviour
|
|
{
|
|
private static bool _isCompletedTutorial;
|
|
|
|
[SerializeField]
|
|
private GameObject _firstTutorialUi;
|
|
|
|
[SerializeField]
|
|
private GameObject _secondTutorialUi;
|
|
|
|
public TutorialState CurrentTutorialState { get; private set; }
|
|
|
|
[Button("컴포넌트 초기화")]
|
|
private void InitializeComponents()
|
|
{
|
|
_firstTutorialUi = transform.Find("FirstTutorialUi").gameObject;
|
|
_secondTutorialUi = transform.Find("SecondTutorialUi").gameObject;
|
|
}
|
|
|
|
public void ShowFirstTutorialUi()
|
|
{
|
|
if (_isCompletedTutorial) return;
|
|
|
|
PlayerInputKeyManager.Instance.DisableAllActionMaps();
|
|
gameObject.SetActive(true);
|
|
_firstTutorialUi.SetActive(true);
|
|
_secondTutorialUi.SetActive(false);
|
|
CurrentTutorialState = TutorialState.First;
|
|
|
|
Invoke(nameof(FirstTutorialCoroutine), 0.1f);
|
|
}
|
|
|
|
private void FirstTutorialCoroutine()
|
|
{
|
|
PlayerInputKeyManager.Instance.EnableCurrentPlayerInput();
|
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.CombatUi);
|
|
PlayerInputKeyManager.Instance.DisableAllActionsExcept("InteractionUi");
|
|
}
|
|
|
|
public void SecondFirstTutorialUi()
|
|
{
|
|
gameObject.SetActive(true);
|
|
_firstTutorialUi.SetActive(false);
|
|
_secondTutorialUi.SetActive(true);
|
|
CurrentTutorialState = TutorialState.Second;
|
|
}
|
|
|
|
public void EndTutorialUi()
|
|
{
|
|
gameObject.SetActive(false);
|
|
_firstTutorialUi.SetActive(false);
|
|
_secondTutorialUi.SetActive(false);
|
|
CurrentTutorialState = TutorialState.End;
|
|
_isCompletedTutorial = true;
|
|
|
|
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Combat);
|
|
//PlayerInputKeyManager.Instance.EnableAllActions();
|
|
//CombatUiManager.Instance.MoveSelectStage((int)SaveStage.FirstTutorial);
|
|
}
|
|
}
|
|
} |