You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.0 KiB
104 lines
3.0 KiB
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using I2.Loc;
|
|
//using UnityEngine.SceneManagement;
|
|
|
|
public class GameMenu : MonoBehaviour
|
|
{
|
|
|
|
[SerializeField]
|
|
public Transform UIPanel;
|
|
public Transform HelpingPanel;// Start is called before the first frame update
|
|
public Transform SettingPanel;
|
|
public Transform GroundPanel;
|
|
public Transform AboutPanel;
|
|
public MusicPlayer musicPlayer;
|
|
public Transform Buttonsvoice;
|
|
public string language="Eglish";
|
|
public SetLanguage setLanguage;
|
|
|
|
bool clickSetting=false;
|
|
void Start()
|
|
{
|
|
HelpingPanel.gameObject.SetActiveRecursively(false);
|
|
SettingPanel.gameObject.SetActiveRecursively(false);
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
GroundPanel.gameObject.SetActiveRecursively(false);
|
|
AboutPanel.gameObject.SetActiveRecursively(false);
|
|
|
|
}
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
public void Bunttonvoice()
|
|
{
|
|
Buttonsvoice.gameObject.SetActiveRecursively(true);
|
|
}
|
|
public void StartGame()
|
|
{
|
|
// Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
|
|
Application.LoadLevel(1);//跳转到游戏场景
|
|
//SceneManager.LoadScene(1);
|
|
}
|
|
public void Settings()
|
|
{
|
|
SettingPanel.gameObject.SetActiveRecursively(true);//跳转到设置界面
|
|
clickSetting = true;
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
}
|
|
public void Help()
|
|
{
|
|
|
|
HelpingPanel.gameObject.SetActiveRecursively(true);
|
|
//Application.LoadLevel(0);
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
}
|
|
public void Back()
|
|
{
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
SettingPanel.gameObject.SetActiveRecursively(false);
|
|
HelpingPanel.gameObject.SetActiveRecursively(false);
|
|
AboutPanel.gameObject.SetActiveRecursively(false);
|
|
musicPlayer.needShow = false;
|
|
}
|
|
public void HelpBack()
|
|
{
|
|
GroundPanel.gameObject.SetActiveRecursively(false);
|
|
AboutPanel.gameObject.SetActiveRecursively(false);
|
|
HelpingPanel.gameObject.SetActiveRecursively(true);
|
|
}
|
|
public void Quit()
|
|
{
|
|
// Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
|
|
UnityEditor.EditorApplication.isPlaying = false;
|
|
Application.Quit();
|
|
}
|
|
public void GameBackgroud()
|
|
{
|
|
GroundPanel.gameObject.SetActiveRecursively(true);
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
}
|
|
public void AboutGame()
|
|
{
|
|
AboutPanel.gameObject.SetActiveRecursively(true);
|
|
Buttonsvoice.gameObject.SetActiveRecursively(false);
|
|
}
|
|
/* public void changeLanguage()
|
|
{
|
|
if (language == "Chinese") language = "English";
|
|
else language = "Chinese";
|
|
|
|
}*/
|
|
public void SetLanguage(string language)
|
|
{
|
|
setLanguage._Language=language;
|
|
setLanguage.ApplyLanguage();
|
|
}
|
|
}
|