26 lines
583 B
C#
26 lines
583 B
C#
using Scampz.GameJam.Assets.Scripts;
|
|
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();
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
if (confirmAction.triggered)
|
|
GameManager.Instance.LoadScene(SceneNames.WorldMap, LoadSceneMode.Single);
|
|
}
|
|
}
|
|
}
|