| 123456789101112131415161718192021222324252627282930313233343536373839 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- public class HomeView : MonoBehaviour
- {
- void Start()
- {
- if (GameObject.Find("Bluetooth") == null) {
- GameObject bluetooth = new GameObject("Bluetooth");
- // bluetooth.AddComponent<ShootCheck>();
- // bluetooth.AddComponent<BluetoothBC>();
- // bluetooth.AddComponent<BluetoothD>();
- DontDestroyOnLoad(bluetooth);
- }
- AudioMgr.init();
- }
- public void GoTo(string target) {
- switch (target)
- {
- case "闯关":
- AudioMgr.ins.PlayBtn();
- GameObject.Instantiate(Resources.Load<GameObject>("Prefabs/Views/ChallengeReadyView"), Vector3.zero, new Quaternion());
- break;
- case "限时":
- GameMgr.gameMode = 2;
- SceneManager.LoadScene("Game", LoadSceneMode.Single);
- break;
- case "对战":
- GameMgr.gameMode = 3;
- SceneManager.LoadScene("Game", LoadSceneMode.Single);
- break;
- default:
- break;
- }
- }
- }
|