//「同意する」ボタンが押されると呼び出される public void OnAcceptButtonTap() { //規約に同意した事を記録 UserDataManager.State.SaveAcceptTermOfUse(); //利用規約画面は初期起動時以外では表示されないため、常にプロフィール画面に遷移する SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.Profile); }
public void PlayGame() { if (playTutorial) { if (AsyncToggle.loadAsynchronously) { asyncTutorialScene.LoadScene(); System.Threading.Thread.Sleep(100); asyncHubWorldScene.KillScene(); } else { SceneTransitionManager.ChangeScenes(Scenes.TutorialScene); } } else { if (AsyncToggle.loadAsynchronously) { asyncTutorialScene.KillScene(); asyncHubWorldScene.LoadScene(); } else { SceneTransitionManager.ChangeScenes(Scenes.HubWorldScene); } } }
private void Start() { instanceInformation = FindObjectOfType <GameInstanceInformation>(); cartilidgeHealth = playerController.GetComponent <CartilidgeHealth>(); transitionManager = FindObjectOfType <SceneTransitionManager>(); halvedFore = playerController.pushForce * 0.5f; }
// Update is called once per frame void Update() { if (Input.GetMouseButtonDown(0)) { SceneTransitionManager.StartTransition("IntroductionScene"); } }
public void reloadGraphScreen() { //タブは初期状態で選択されるように設定 UserDataManager.Scene.InitGraphTabSave(); UserDataManager.Scene.InitGraphDataTabSave(); SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.Graph); }
//戻るボタンを押した際に実行される public void OnBackButtonTap() { if (isTapFromSetting()) { SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.Setting); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { SceneTransitionManager.sceneTransition(true); } }
//ペアリングをスキップする IEnumerator SkipParering() { //本当にスキップするか確認 bool isOK = false; bool isCancel = false; MessageDialog.Show( "本体機器とのペアリングが完了していません。接続をスキップしますか?", true, true, () => { isOK = true; }, () => { isCancel = true; }); yield return(new WaitUntil(() => isOK || isCancel)); if (isOK) { SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.Home); } else { //スキップしないなら再度はじめから再開?自分のシーンを再読み込み SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.BTConnectPrepare); } yield return(null); }
void DrawLevelListButtons() { // Show Append button EditorGUILayout.Space(); Rect controlRect = EditorGUILayout.GetControlRect(); controlRect.height += (VerticalMargin * 2); if (GUI.Button(controlRect, "Append new scenes in Build Settings to All Levels list") == true) { // Actually append scenes to the list SceneTransitionManager manager = ((SceneTransitionManager)target); manager.SetupLevels(defaultDisplayName, (defaultFillIn != 0), defaultRevertsTimeScale, defaultLockMode, true); // Untoggle displayDefaults = false; } // Show Replace button EditorGUILayout.Space(); controlRect = EditorGUILayout.GetControlRect(); controlRect.height += (VerticalMargin * 2); if (GUI.Button(controlRect, "Replace All Levels list with scenes in Build Settings") == true) { // Actually append scenes to the list SceneTransitionManager manager = ((SceneTransitionManager)target); manager.SetupLevels(defaultDisplayName, (defaultFillIn != 0), defaultRevertsTimeScale, defaultLockMode, false); // Untoggle displayDefaults = false; } EditorGUILayout.Space(); }
public IEnumerator LoginUser(string _username) { SharedData.Username = _username; if (_username == "Debug") { SceneTransitionManager.LoadScene(Constants.MAIN_MENU_SCENE_NAME); yield break; } else { string postData = "{\"username\" : \"" + _username + "\"}"; WWW loginUserReq = WebHelper.CreatePostJsonRequest_WWW(m_userLoginURL, postData); yield return(loginUserReq); if (loginUserReq.error != null)//(loginUserReq.isNetworkError || loginUserReq.isHttpError) { Debug.Log(loginUserReq.error); StartCoroutine(ShowErrorMessage(m_errorMessage)); } else { Debug.Log("Got respose for login: " + loginUserReq.text); SceneTransitionManager.LoadScene(Constants.MAIN_MENU_SCENE_NAME); yield break; } } }
void OnDestroy() { if (Instance == this) { Instance = null; } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.RightArrow)) { if (current == sprites.Length - 1) { SceneTransitionManager.sceneTransition(true); } else { current++; currentImage.sprite = sprites[current]; currentText.text = texts[current]; } } if (Input.GetKeyDown(KeyCode.LeftArrow)) { if (current != 0) { current--; currentImage.sprite = sprites[current]; currentText.text = texts[current]; } } }
/// void Awake() { //stuff PressButton.SetActive(false); //Script GameObject loader = GameObject.FindGameObjectWithTag("Script_Data"); //find the xml loader that has the xml data in the scene Script = loader.GetComponent <LoadJson>().sections; //Assgin the processed dialogues in xmlloder as Script //panel.SetActive(false); //Panel is initially in a resting state,comment out for debug purposes //Audio audioSource = GetComponent <AudioSource>(); //assgin audio source male = Resources.Load("TypingMale") as AudioClip; female = Resources.Load("TypingFemale") as AudioClip; writer = Resources.Load("Typewriter") as AudioClip; //Load noises audio_manager = GameObject.FindGameObjectWithTag("Audio_Manager").GetComponent <AudioManager>(); //Art Arrow.SetActive(false); //shut the arrow animation_display = GameObject.FindGameObjectWithTag("Character_Animator"); anim = animation_display.GetComponent <Animator>(); background = GameObject.FindGameObjectWithTag("Background").GetComponent <Image>(); presentButton = GameObject.FindGameObjectWithTag("Present_Button"); presentButton.SetActive(false); trans_manager = GameObject.FindGameObjectWithTag("Transition_Manager").GetComponent <SceneTransitionManager>(); }
ListButtonScript SetupButtonEventAndName(SceneTransitionManager settings, GameObject buttonObject) { // Add an event to the button ListButtonScript newButton = buttonObject.GetComponent <ListButtonScript>(); SetupButtonEventAndName(settings, newButton); return(newButton); }
public void Other() { PlayerProperties.Reset(); Economy.mEconomyState = Economy.mEconomyState == Economy.EconomyState.GlobalRecession ? Economy.EconomyState.Overheating : Economy.EconomyState.GlobalRecession; SceneTransitionManager.StartTransition("Map"); }
public void RequestSceneLoad(string sceneName) { if (sceneTransitionManager == null) { sceneTransitionManager = SceneTransitionManager.instance; } sceneTransitionManager.LoadScene(sceneName); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { //m_respownArea = GameObject.Find("RespownArea"); SceneTransitionManager.TransScene("Clear"); } }
//グラフに遷移するためのボタンをタップした際に実行 public void OnToGraphButtonTap() { //最新データに遷移するように設定 UserDataManager.Scene.SaveGraphDate(DateTime.MinValue); //タブは初期状態で選択されるように設定 UserDataManager.Scene.InitGraphTabSave(); UserDataManager.Scene.InitGraphDataTabSave(); SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.Graph); }
public void LoadMainGame() { Debugging.DisplayDebugMessage("Loading main game."); SceneTransitionManager.LoadGameScene(() => { userInterface.EnableInGameUserInterface(); SetActiveCamera(); }); }
public override IEnumerator Initialization() { _currentScoreText.text = Model.CurrentScore.ToString("n0"); _highScoreText.text = Model.HighScore.ToString("n0"); _transitionManager = ManagerProvider.Get <SceneTransitionManager>(); yield return(new WaitForSeconds(3)); _init = true; }
public void LoadMainMenu() { Debugging.DisplayDebugMessage("Loading main menu."); userInterface.EnableGameOverMenu(false); SceneTransitionManager.LoadInitialisationScene(() => { userInterface.EnableStartMenu(); SetActiveCamera(); }); }
void ResetAttributes() { PlayerProperties.RequiredInfoPoints = 0; PlayerProperties.ResearchSkillPoints = 0; PlayerProperties.QuestionsAsked.Clear(); ChangeGameStage(); SceneTransitionManager.StartTransition("Map"); }
public async void LoadSelectedScene() { if (!Application.isPlaying) { Debug.LogError("Just in play mode"); return; } await SceneTransitionManager.LoadNewScene(nameOfScene); }
private void Awake() { if (Instance != null) { Destroy(gameObject); return; } DontDestroyOnLoad(gameObject); Instance = this; }
//Only call from child class public IEnumerator BackButtonCoroutineForChildClass() { bool?isSaveSetting = null; if (LastDeviceSetting != null && TempDeviceSetting != null) { if (LastDeviceSetting.ActionMode != TempDeviceSetting.ActionMode || LastDeviceSetting.SnoreSensitivity != TempDeviceSetting.SnoreSensitivity || LastDeviceSetting.SuppressionOperationMaxTime != TempDeviceSetting.SuppressionOperationMaxTime) { MessageDialog.Show( "設定が保存されていません。保存しますか?", useOK: true, useCancel: true, onOK: () => { isSaveSetting = true; }, onCancel: () => { isSaveSetting = false; }, positiveItemName: "はい", negativeItemName: "保存せず戻る"); yield return(new WaitUntil(() => isSaveSetting != null)); } } if (isSaveSetting == true) { bool isSuccess = false; string message = "設定変更に失敗しました。"; yield return(StartCoroutine(SendCommandToDeviceCoroutine( DeviceSetting.CommandCode, (bool b) => isSuccess = b))); if (isSuccess) { SaveDeviceSetting(); message = "設定を変更しました。"; //デバイス設定で変更完了後、自動的にBLE接続を切る DisconectDevice(); } bool isOk = false; MessageDialog.Show( message, useOK: true, useCancel: false, onOK: () => isOk = true); yield return(new WaitUntil(() => isOk)); } else { FlushTempDeviceSetting(); } SceneTransitionManager.LoadLevel(SceneTransitionManager.LoadScene.DeviceSetting); }
void Awake() { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); InTransition = false; TransitionUI.DOFade(0,0); } else { Destroy(gameObject); } }
public void ConfirmYes() { if (AsyncToggle.loadAsynchronously) { HubWorldAsync.Instance.LoadScene(levelString); } else { SceneTransitionManager.ChangeScenes(levelString); } }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(this.gameObject); } }
public void ReturnToHubButton() { if (AsyncToggle.loadAsynchronously) { LevelToHubAsync.Instance.LoadHubWorld(); } else { SceneTransitionManager.ChangeScenes(Scenes.HubWorldScene); } }
void Awake() { if (instance == null) { instance = this; } else { Debug.LogError("Multiple GameManager instances detected."); } }
public void MainMenuButton() { if (AsyncToggle.loadAsynchronously) { LevelToHubAsync.Instance.LoadMainMenu(); } else { SceneTransitionManager.ChangeScenes(Scenes.MainMenuScene); } }
void Awake() { _instance = this; var temp = transform.GetChild(0); temp.gameObject.SetActive(true); image = temp.GetComponentInChildren<Image>(); loadingText = transform.GetComponentInChildren<Text>(); loadingSlider = transform.GetComponentInChildren<Slider>(); ToggleLoadingUI(false); }