Files
Scampz/Assets/Scripts/TitleScreen/TitleScreen.cs
Zenny b907cdcd9b Bug Fixes from v1.0
- Fix lighting on desert
- Move dialogue radius to correct spot
- Disable movement while talking to NPCs
- Move desert spawn point a little bit
2022-08-31 22:56:09 -07:00

35 lines
748 B
C#

using Scampz.GameJam.Assets.Scripts;
using TMPro;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.SceneManagement;
namespace Scampz.GameJam
{
public class TitleScreen : MonoBehaviour
{
private InputAction confirmAction;
void Start()
{
confirmAction = new InputAction("confirm", binding: "<Keyboard>/x");
confirmAction.AddBinding("<GamePad>/buttonSouth");
confirmAction.Enable();
}
private void OnDisable()
{
confirmAction.Disable();
}
void Update()
{
var uiText = GetComponentInChildren<TextMeshProUGUI>();
if (confirmAction.inProgress)
{
GameManager.Instance.LoadScene(SceneNames.WorldMap, LoadSceneMode.Single);
}
}
}
}