// Use this for initialization IEnumerator Start() { yield return(new WaitForSeconds(2)); _loadingPanel.SetActive(false); _startRunning = true; userName = TitleSceneController.getUserName(); speed = TitleSceneController.getSpeed(); second = TitleSceneController.getSecond(); Debug.Log(userName); Debug.Log(speed); Debug.Log(second); //Screen.orientation = ScreenOrientation.LandscapeLeft; #if UNITY_EDITOR Debug.Log("UNITY_EDITOR"); StartCoroutine(PlayVoiceUnityChan("ogg", userName, "ついてこないと置いてくからね")); StartCoroutine(RunnningPlayVoice("ogg", userName, 45)); #elif UNITY_IOS Debug.Log("UNITY_EDITOR"); StartCoroutine(PlayVoiceUnityChan("mp3", userName, "ついてこないと置いてくからね")); StartCoroutine(RunnningPlayVoice("mp3", userName, 45)); #endif }
private void Awake() { Debug.Log("Loading TitleScene Controller"); if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } }
void Awake() { //Set other camera's and canvases not active gameOverCanvasObj.SetActive(false); //Application.targetFrameRate = 30; titleSceneController = GameObject.Find("TitleSceneController").GetComponent <TitleSceneController>(); getBuddies(titleSceneController.finalChosenPlayerBuddies); SCENE_SPEED = SceneConstants.BASE_SCENE_SPEED; //When the player leaves this scene, make sure to destroy objects previously set to not do so foreach (PlayerBuddy buddy in playerBuddies) { itemsToDestroy.Add(buddy.gameObject); } itemsToDestroy.Add(titleSceneController.gameObject); //Based on the function, determine how many, width, etc of lanes lanes = generateLanes(5, -6f, 2f, 3f); }