private IEnumerator LastScene() { UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene("MainMenuScene"); }
// Start is called before the first frame update void Start() { m_loadSceneManager = FindObjectOfType <LoadSceneManager>(); m_playerController = FindObjectOfType <PlayerController>(); if (SceneManager.GetActiveScene().name == "EndScene")//EndSceneの時の処理 { //m_audio.Stop();//音楽を止める m_ending = true;//フラグを立てる //Debug.Log("start"); } else { Cursor.visible = false; //カーソルを消す Cursor.lockState = CursorLockMode.Locked; //カメラの向きをマウスと連動させる m_freelook.MoveToTopOfPrioritySubqueue(); //freelookを優先 m_magicCircle.SetActive(false); //魔法陣を非表示 if (m_goolController) { return; } m_goolController = m_goolObject.GetComponent <GoolController>(); m_audio = GetComponent <AudioSource>(); } }
private IEnumerator LoadGameOthers() { UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene("MainPlane"); }
public IEnumerator Login() { UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene(loadSceneName); }
// Start is called before the first frame update void Start() { sceneManager = GameObject.Find("SceneManager").GetComponent <LoadSceneManager>(); SetDestinationTime(); yusyaObjct = GameObject.FindWithTag("Player").transform; baseCommand = yusyaObjct.GetComponent <BaseCommand>(); }
private IEnumerator StartLevel(string _sceneName) { UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene(_sceneName); }
void EnterGame(PointerEventData e) { LoadSceneManager.Instance().LoadScene("Combat01", () => { AppFacade.Instance.GetManager <GameManager>(ManagerName.Game).LoadinScene("Scene1"); BattleDirector.Instance.Start(); }); }
public void ChangeSceneGamePlay() { gamePlayerGoodsInfo = ShopManager.Instance.GetSelectedPlayerInfo(); LoadSceneManager.LoadScene(LoadSceneManager.sceneNames.gamePlay, playerSprites); AdManager.Instance.GameStartAndStopCoroutine(); //SceneManager.LoadScene("GamePlay", LoadSceneMode.Single); }
// Update is called once per frame void Update() { // need to configure input manager to reflect player joy number // modify cam script to take player joy number instead of player number for (int i = 0; i < nums.Count; i++) { string key = "joystick " + nums[i] + " button " + 0; if (Input.GetKeyDown(key)) { string name = "player" + playerNum; PlayerPrefs.SetInt(name, nums[i]); nums.RemoveAt(i); buttons[playerNum - 1].gameObject.SetActive(false); AddPlayer(i); i = 0; //SoundManager.Instance.PlaySound(audioClips[]); break; } } if (PlayerPrefs.GetInt("player1") != 0) { if (Input.GetKey("joystick " + PlayerPrefs.GetInt("player1") + " button 7")) { LoadSceneManager lsm = GameObject.Find("start game").GetComponent <LoadSceneManager>(); lsm.LoadSceneByButton("Main"); } } }
private void Awake() { if (instance == null) { instance = this; } Canvas = GameObject.Find("Canvas"); }
// Start is called before the first frame update void Start() { remaningCoin = GameObject.FindGameObjectsWithTag("coin").Length; targets = remaningCoin; obstacles = GameObject.FindGameObjectsWithTag("Obstacle"); loader = GetComponent <LoadSceneManager>(); m_isGameOver = false; }
private void Start() { if (instance != null) { Destroy(this.gameObject); return; } instance = this; }
void Awake() { if (_instance == null) { _instance = this; } _LoadBar = transform.FindChild("LoadBar").GetComponent <UISlider>(); _LoadBar.value = 0; }
public IEnumerator BackToMenu(float delayTime = 2.0f) { AddHistoryScore(); yield return(new WaitForSecondsRealtime(delayTime)); UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSecondsRealtime(1)); LoadSceneManager.LoadScene(1); }
public static void LoadScene(string scenePath, Action func = null) { LoadSceneManager.Instance().LoadScene(scenePath, () => { if (func != null) { func(); } }); }
public static void LoadScene(string scenePath, LuaFunction onLoadFinished = null) { LoadSceneManager.Instance().LoadScene(scenePath, () => { if (onLoadFinished != null) { onLoadFinished.Call(); onLoadFinished.Dispose(); } }); }
private void ShowInterstitial() { if (this.interstitial.IsLoaded()) { this.interstitial.Show(); LoadSceneManager.GoToNewbie(); } else { MonoBehaviour.print("Interstitial is not ready yet"); } }
void SetInitialReferences() { try { loadSceneManager = FindObjectOfType <LoadSceneManager>(); } catch (Exception e) { Debug.LogException(e, this); loadSceneManager = null; } }
private void Awake() { // LoadSceneMangerは常に一つだけにする if (loadSceneManager == null) { loadSceneManager = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private IEnumerator StartLevel(string loadSceneName) { GameManager.Instance.GameOverTriggerEvent(); UIManager.Instance.FaderOn(true, 1f); yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene(loadSceneName); GameManager.Instance.GameManagerInit(); if (loadSceneName != "MainMenuScene") { GameManager.Instance.GameStartTriggerEvent(); } UIManager.Instance.FaderOn(false, 1f); }
private void Awake() { if (!instance) { instance = this; } else { Destroy(gameObject); } loadSceneManager = GameObject.Find("LoadSceneManager").GetComponent <LoadSceneManager>(); Assert.IsNotNull(loadSceneManager, "Failed to access LoadSceneManager."); }
private void Awake() { if (Instance != null) { if (Instance != this) { Destroy(gameObject); } } else { Instance = this; DontDestroyOnLoad(this); } }
//--------------------------------------------------------- /// <summary> /// 热更完成,启动游戏 /// </summary> void Update() { if (!IsGameStart) { return; } if (Input.GetKeyDown(KeyCode.Escape)) { ExitGameConfirm(); } // 日志中心 //LogCenter.Instance().Update(); LoadSceneManager.Instance().Update(); }
private void Dispatch() { while (sEvents.Count > 0) { if (LoadSceneManager.Instance().Isloading()) { break; } lock (obj) { KeyValuePair <int, byte[]> msg = sEvents.Dequeue(); DispatchNetMessage(msg.Key, msg.Value); } } }
//--------------------------------------------------------- /// <summary> /// 热更完成,启动游戏 /// </summary> void Update() { if (!IsGameStart) { return; } if (Input.GetKeyDown(KeyCode.Escape)) { ExitGameConfirm(); } // 日志中心 //LogCenter.Instance().Update(); LoadSceneManager.Instance().Update(); EntityBehaviorMgr.Instance().UpdateBehavior(Time.deltaTime); }
// Use this for initialization void Start() { if (targetObject_Green == null) { Debug.Log("タヌキのリザルトオブジェクトの設定してー"); } if (targetObject_Sand == null) { Debug.Log("キツネのリザルトオブジェクトの設定してー"); } if (targetObject_Ice == null) { Debug.Log("イヌのリザルトオブジェクトの設定してー"); } if (targetObject_Town == null) { Debug.Log("ネコのリザルトオブジェクトの設定してー"); } charInfo = GameObject.Find("CharactorInfo").GetComponent <CharactorInfo>(); player = netConnector.GetLocalPlayer(); scoreObject = GameObject.Find("ResultManager/ResultObjectScore/Canvas/Score000"); GameObject manager = GameObject.Find("LoadSceneManager"); if (null != manager) { loadSceneManager = manager.GetComponent <LoadSceneManager> (); } GameObject audio = GameObject.Find("AudioManager"); if (null != audio) { audioManager = audio.GetComponent <AudioManager> (); } }
// Use this for initialization void Start() { GameObject manager = GameObject.Find("LoadSceneManager"); if (null != manager) { loadSceneManager = manager.GetComponent <LoadSceneManager> (); } //チューとリアルマネージャの削除 GameObject tutoMana = GameObject.Find("TutorialManager"); if (null != tutoMana) { tutoMana.GetComponent <TutorialManager> ().ClearFlg(); Destroy(tutoMana.gameObject); tutoManaDeleteFlg = true; } //キャラクターインフォの削除 GameObject charaInfo = GameObject.Find("CharactorInfo"); if (null != charaInfo) { charaInfo.GetComponent <CharactorInfo> ().ClearFlg(); Destroy(charaInfo.gameObject); charaInfoDeleteFlg = true; } GameObject audio = GameObject.Find("AudioManager"); if (null != audio) { audioManager = audio.GetComponent <AudioManager> (); } audioManager.Play_SE(AudioManager.SE.Ending); }
private void Awake() { Instance = this; }
private void SetInitialReferences() { loadSceneManager = FindObjectOfType <LoadSceneManager>(); }
private IEnumerator StartLevel(string loadSceneName) { yield return(new WaitForSeconds(1f)); LoadSceneManager.LoadScene(loadSceneName); }