[text] aa

Viewer

  1. using UnityEngine;
  2. using UnityEngine.SceneManagement;
  3. public class HalamanManager : MonoBehaviour
  4. {
  5.     public bool isEscapeToExit;
  6.     // Use this for initialization
  7.     void Start()
  8.     {
  9.     }
  10.     // Update is called once per frame
  11.     void Update()
  12.     {
  13.         if (Input.GetKeyUp(KeyCode.Escape))
  14.         {
  15.             if (isEscapeToExit)
  16.             {
  17.                 Application.Quit();
  18.             }
  19.             else
  20.             {
  21.                 KembaliKeMenu();
  22.             }
  23.         }
  24.     }
  25.     public void MulaiPermainan()
  26.     {
  27.         SceneManager.LoadScene("Main");
  28.     }
  29.     public void KembaliKeMenu()
  30.     {
  31.         SceneManager.LoadScene("Menu");
  32.     }
  33.     public void Credit()
  34.     {
  35.         SceneManager.LoadScene("Credit");
  36.     }
  37.     public void ExitGame()
  38.     {
  39.         Application.Quit();
  40.     }
  41. }
  42.  

Editor

You can edit this paste and save as new:


File Description
  • aa
  • Paste Code
  • 29 Apr-2024
  • 861 Bytes
You can Share it: