This commit is contained in:
2025-05-13 05:19:58 +03:00
parent 853edaf0b4
commit 472b2aee18
1034 changed files with 41844 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
using UnityEngine;
using System.Collections;
public class MainMenuController : MonoBehaviour {
public AudioClip newGameSound;
private AudioSource _source;
public GameObject fadeImage;
public void OnButtonExit(){
Application.Quit();
}
public void OnButtonNewGame(){
Invoke("NewGameLoad", 5);
if(_source != null & newGameSound != null){
_source.PlayOneShot(newGameSound);
}
//fadeImage.GetComponent<UnityEngine.image
try {
fadeImage.SetActive(true);
fadeImage.GetComponent<Animator>().SetTrigger("Fade");
}
catch {
}
}
private void NewGameLoad(){
Debug.Log("Load level");
Application.LoadLevel("Level0");
}
// Use this for initialization
void Start () {
Time.timeScale = 1;
_source = GetComponent<AudioSource>();
}
// Update is called once per frame
void Update () {
}
}