85 lines
1.8 KiB
C#
85 lines
1.8 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class menu : MonoBehaviour
|
|
{
|
|
public GameObject menupanel;
|
|
public GameObject infopanel;
|
|
public GameObject settingpanel;
|
|
public GameObject carapanel;
|
|
public GameObject akunpanel;
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
menupanel.SetActive(true);
|
|
infopanel.SetActive(false);
|
|
settingpanel.SetActive(false);
|
|
carapanel.SetActive(false);
|
|
akunpanel.SetActive(false);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
public void StartButton(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
|
|
//info panel
|
|
public void InfoButton()
|
|
{
|
|
menupanel.SetActive(false);
|
|
infopanel.SetActive(true);
|
|
}
|
|
|
|
//setting panel
|
|
public void SettingButton()
|
|
{
|
|
menupanel.SetActive(false);
|
|
infopanel.SetActive(false);
|
|
settingpanel.SetActive(true);
|
|
}
|
|
|
|
//cara panel
|
|
public void CaraBotton()
|
|
{
|
|
menupanel.SetActive(false);
|
|
infopanel.SetActive(false);
|
|
settingpanel.SetActive(false);
|
|
carapanel.SetActive(true);
|
|
}
|
|
|
|
//akun panel
|
|
public void AkunBotton()
|
|
{
|
|
menupanel.SetActive(false);
|
|
infopanel.SetActive(false);
|
|
settingpanel.SetActive(false);
|
|
carapanel.SetActive(false);
|
|
akunpanel.SetActive(true);
|
|
|
|
}
|
|
|
|
public void BackBotton()
|
|
{
|
|
menupanel.SetActive(true);
|
|
infopanel.SetActive(false);
|
|
settingpanel.SetActive(false);
|
|
carapanel.SetActive(false);
|
|
akunpanel.SetActive(false);
|
|
}
|
|
|
|
|
|
//botton pretest
|
|
public void PretestButton(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
|
|
|
|
}
|