61 lines
1.3 KiB
C#
61 lines
1.3 KiB
C#
|
|
using System.Collections;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using UnityEngine;
|
||
|
|
using Com.LuisPedroFonseca.ProCamera2D;
|
||
|
|
using UnityEngine.SceneManagement;
|
||
|
|
|
||
|
|
public class MainMenuController : MonoBehaviour
|
||
|
|
{
|
||
|
|
[SerializeField] ProCamera2DTransitionsFX transition;
|
||
|
|
[SerializeField] RectTransform menuPanel;
|
||
|
|
|
||
|
|
void NewGame() {
|
||
|
|
VNData.NextScene = Dialogue.Intro;
|
||
|
|
SceneManager.LoadScene("SceneViewer");
|
||
|
|
}
|
||
|
|
|
||
|
|
void Continue() {
|
||
|
|
Debug.Log("Start Load");
|
||
|
|
GameData.Load();
|
||
|
|
Debug.Log("End Load");
|
||
|
|
SceneManager.LoadScene("Manager");
|
||
|
|
}
|
||
|
|
|
||
|
|
void Quit() {
|
||
|
|
Application.Quit();
|
||
|
|
}
|
||
|
|
|
||
|
|
void StartTransition() {
|
||
|
|
Debug.Log("TODO: Make a sound");
|
||
|
|
transition.TransitionExit();
|
||
|
|
menuPanel.gameObject.SetActive(false);
|
||
|
|
}
|
||
|
|
|
||
|
|
public void PressedNewGame() {
|
||
|
|
transition.OnTransitionExitEnded = NewGame;
|
||
|
|
StartTransition();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void PressedContinue() {
|
||
|
|
transition.OnTransitionExitEnded = Continue;
|
||
|
|
StartTransition();
|
||
|
|
}
|
||
|
|
|
||
|
|
public void PressedQuit() {
|
||
|
|
transition.OnTransitionExitEnded = Quit;
|
||
|
|
StartTransition();
|
||
|
|
}
|
||
|
|
|
||
|
|
// Start is called before the first frame update
|
||
|
|
void Start()
|
||
|
|
{
|
||
|
|
transition.TransitionEnter();
|
||
|
|
}
|
||
|
|
|
||
|
|
// Update is called once per frame
|
||
|
|
void Update()
|
||
|
|
{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|