51 lines
1.1 KiB
C#
51 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
public class scriptmain : MonoBehaviour
|
|
{
|
|
public GameObject TutorialPanel;
|
|
public GameObject GamePanel;
|
|
public GameObject PausePanel;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
TutorialPanel.SetActive(true);
|
|
GamePanel.SetActive(false);
|
|
PausePanel.SetActive(false);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void MulaiButton()
|
|
{
|
|
TutorialPanel.SetActive(false);
|
|
GamePanel.SetActive(true);
|
|
}
|
|
|
|
// Perbaikan: Method GetV tidak perlu memiliki tipe kembalian void dan tidak perlu mengembalikan nilai.
|
|
//public void GetV()
|
|
//{
|
|
// PausePanel.SetActive(true);
|
|
//}
|
|
|
|
// Perbaikan: Mengubah parameter void v menjadi GameObject PausePanel.
|
|
public void ButtonOpsi()
|
|
{
|
|
TutorialPanel.SetActive(false);
|
|
GamePanel.SetActive(false);
|
|
PausePanel.SetActive(true);
|
|
}
|
|
|
|
public void ButtonBack(string scenename)
|
|
{
|
|
SceneManager.LoadScene(scenename);
|
|
}
|
|
}
|