52 lines
1.1 KiB
C#
52 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class menu : MonoBehaviour
|
|
{
|
|
public GameObject menupanel;
|
|
public GameObject infopanel;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
menupanel.SetActive(true);
|
|
infopanel.SetActive(false);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void MateriButton(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
public void ButtonPuzzle(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
public void ButtonEval(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
public void ButtonInfo()
|
|
{
|
|
menupanel.SetActive(false);
|
|
infopanel.SetActive(true);
|
|
}
|
|
public void ButtonKeluar()
|
|
{
|
|
menupanel.SetActive(true);
|
|
infopanel.SetActive(false);
|
|
}
|
|
public void ButtonExit()
|
|
{
|
|
Application.Quit();
|
|
Debug.Log("Tombol keluar telah berhasil");
|
|
}
|
|
}
|