23 lines
583 B
C#
23 lines
583 B
C#
using System;
|
|
using Core;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class MainMenu : MonoBehaviour
|
|
{
|
|
public async void StartGame()
|
|
{
|
|
// Replace with the actual scene name as set in Build Settings
|
|
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
|
|
await SceneManagerService.Instance.SwitchSceneAsync("AppleHillsOverworld", progress);
|
|
}
|
|
|
|
public void QuitGame()
|
|
{
|
|
Application.Quit();
|
|
#if UNITY_EDITOR
|
|
UnityEditor.EditorApplication.isPlaying = false;
|
|
#endif
|
|
}
|
|
}
|