Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine.SceneManagement;
- using UnityEngine;
- public class MenuMain : MonoBehaviour {
- public GameObject settings; //variable to check settings panel
- public void StartGame() //Rooms button
- {
- Application.LoadLevel(1); //load level 1
- //SceneManager.LoadScene("Level_01", LoadSceneMode.Additive);
- //if we don't want to destroy menu object to test, use this:
- //GameObject.DontDestroyOnLoad(gameObject);
- }
- public void LoadGame()
- {
- //currently absent
- }
- public void Settings()
- {
- settings.SetActive(!settings.activeSelf);
- }
- public void ExitGame() //Exit button
- {
- Application.Quit(); //close our game
- }
- public void setMusic(float value) //music settings from globalsettings
- {
- GlobalSettings.music = value;
- }
- public void setSound(float value) //sound settings from globalsettings
- {
- GlobalSettings.sound = value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement