private void Awake() { if (Instance != null) { Destroy(this); return; } Instance = this; DontDestroyOnLoad(gameObject); }
private void Awake() { if (instance) { Destroy(gameObject); return; } instance = this; //sceneID = SceneManager.GetActiveScene().buildIndex; }
// Update is called once per frame void Update() { foreach (var key in sceneChangerKeys) { if (Input.GetKeyDown(key)) { SceneChanger.Instance().Change(next); } } }
private void Start() { gameOptions = FindObjectOfType <GameOptions>(); sceneChanger = FindObjectOfType <SceneChanger>(); optionsMenu.SetActive(false); creditsDisplay.SetActive(false); menuButtons = GetComponentsInChildren <Button>(); setMenuButtonsInteractable(false); }
public void OnRestartClicked() { if (IsListeningToEvents == true) { // FIXME: Notify the player that they'll lose their unsaved progress. // Transition to the current level SceneChanger.ReloadCurrentScene(); Hide(); } }
// リスタート public void Restart() { // 効果音 soundEffecter.PlayAnytime(Attribute.DON); // フェードアウトした後、シーンを再読み込み BlackOut.FadeOut(0.5f, 2f, 0.5f, () => { SceneChanger.To(Scene.GAMEMAIN); }); }
private void Start() { _Button.OnClickAsObservable() .Where(_ => _VolumeChangeChecker.DirtyFlag) .Subscribe(_ => Debug.Log("確認ダイアログを出そう")); _Button.OnClickAsObservable() .Where(_ => !_VolumeChangeChecker.DirtyFlag) .Subscribe(_ => SceneChanger.SceneChange(SceneType.Title)); }
void Start() { if (_instance != null) { Destroy(gameObject); return; } _instance = this; DontDestroyOnLoad(gameObject); }
public void OnRestartClicked() { if (IsListeningToEvents == true) { RecordNewHighScore(); // Transition to the current level SceneChanger.ReloadCurrentScene(); } }
public override void _Ready() { Instance = this; player = GetNode <AnimationPlayer>("CanvasLayer/AnimationPlayer"); roundLabel = GetNode <Label>("CanvasLayer/RoundLabel"); roundLabel.Show(); roundLabel.SelfModulate = new Color(1, 1, 1, 0); }
/// <summary> /// Quits the mini game called when the quit button is pressed. /// </summary> public void quitGame() { SceneManager.UnloadSceneAsync(this.gameObject.scene); move.setCanMove(true); PlayerData.instance.data.Money += score; SceneChanger sceneChanger = GameObject.Find("SceneChanger").GetComponent <SceneChanger> (); SoundManager.instance.playSFX("transition"); sceneChanger.loadLevel("WorldMap", new Vector2(-6, 4)); }
public void OnReturnToMenuClicked() { if (IsListeningToEvents == true) { // FIXME: Notify the player that they'll lose their unsaved progress. // Transition to the menu SceneChanger.LoadMainMenu(); Hide(); } }
private void Start() { ChangeState(eState.PLAYER_FALL); playerSkillManager.Init(); playerStateMachine.Start(); hitSize = new Vector2(playerCollider.size.x, 0.1f); sceneChanger = SceneChanger.Instance; }
public void Save_For_Reload() { SceneChanger FoodList = MainCameraObjScript.GetComponent <SceneChanger>(); for (int i = 0; i < FoodList.FoodNames.Count; i++) { PlayerPrefs.SetString("Price" + i + FoodList.Scene_Identifier, FoodList.FoodPrices[i]); //save the price of the food PlayerPrefs.SetString("Food" + i + FoodList.Scene_Identifier, FoodList.FoodNames[i]); } }
/// <summary> /// シングルの遷移ボタンをクリック時 /// </summary> public void OnTapGameModeSingleButton() { if (!isMaxPossession) { SceneChanger.ChangeSceneAsync("SingleStageSelect"); } else { OpenPresentBoxOverDialog(); } }
// Start is called before the first frame update void Start() { wall_pool_size = walls.Length; if (wallAmount > 0 && wall_pool_size != 0) { wall = Instantiate(walls[Random.Range(0, wall_pool_size)], this.GetComponent <Transform>()); } sceneChanger = (SceneChanger)GameObject.Find("SceneManager").GetComponent <SceneChanger>(); //playerManager = (PlayerManager)GameObject.Find("ZombiePlayer_Spawn_Postion").GetComponent<PlayerManager>(); //playerLifeAmount = playerManager.GetPlayerLifeAmount(); }
/// <summary> /// ショップの遷移ボタンをクリック時 /// </summary> public void OnTapShopButton() { if (!isMaxPossession) { SceneChanger.ChangeSceneAsync("Shop"); } else { OpenPresentBoxOverDialog(); } }
public void startLevel() { if (!isLoading) { if (SceneName != "") { SceneChanger.loadScene(SceneName); isLoading = true; } } }
public override IEnumerator Action() { var wait = new WaitForSeconds(1f); if (!isSetuna && !SceneChanger.Instance().isChanging) { AudioManager.Instance.PlayEnemySE(AudioName.oni_oaa_preAttack_03.String()); yield return(wait); } yield return(enemyAttack.Attack()); }
public void MoveScene(string sceneName) { if (CurrentSpriteNum != sprites.Length - 1) { return; } SceneChanger sceneChanger = new SceneChanger(); sceneChanger.LoadScene(sceneName); }
private IEnumerator End() { TextChanger textChanger = textObject.GetComponent <TextChanger>(); textChanger.ChangeText("Time!"); yield return(new WaitForSeconds(4f)); SceneChanger s = GetComponent <SceneChanger>(); s.ChangeScene(); }
public void StartFadeIn() { alfa -= fadeSpeed; SetAlpha(); if (alfa <= 0) { isFadeIn = false; fadeImage.enabled = false; SceneChanger.ToStart(); } }
// Use this for initialization void Start() { lumo = GameObject.FindGameObjectWithTag("Light").GetComponent <Light>(); player = GetComponent <SpriteRenderer>(); def = player.material; lumoHP = maxLumoHP; source = GetComponentInChildren <AudioSource>(); scenechanger = gameObject.AddComponent <SceneChanger>() as SceneChanger; anim = GetComponent <Animator>(); Time.timeScale = 1f; }
// Update is called once per frame void Update() { _time_limit -= Time.deltaTime; _text.text = "TIME" + "\n" + ((int)_time_limit).ToString(); if (_time_limit <= 0) { SceneChanger.sceneChange("Result"); } }
void Start() { StartCoroutine(LoadGameAsync()); //load game scene async while text displays sc = FindObjectOfType <SceneChanger> (); typingSound = GetComponent <AudioSource> (); display = gameObject.GetComponent <Text> (); text = display.text; display.text = ""; coroutine = DisplayCharByChar(); StartCoroutine(coroutine); }
private void Awake() { if (instance != null) { Debug.Log("More than one Scene Changer!"); Destroy(gameObject); Destroy(this); } instance = this; DontDestroyOnLoad(gameObject); }
private void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public void OnStartClicked() { // Make sure the menu is active if (IsListeningToEvents == true) { // Load the first level automatically SceneChanger.LoadNextLevel(); // Indicate button is clicked CurrentDefaultUi = defaultButton; } }
public static SceneChanger instance = null; // Instance of class private void Awake() { // Creates instance of class if (instance == null) { instance = this; } else { Destroy(gameObject); } }
private void Start() { if (instance) { Destroy(gameObject); } else { instance = this; DontDestroyOnLoad(gameObject); } }
// Use this for initialization void Start () { var = GetComponent<ObjectVariables>(); obj_sceneChanger = GameObject.FindGameObjectWithTag("GLOBAL_sceneChanger"); sceneChanger = obj_sceneChanger.GetComponent<SceneChanger>(); }
private void Start() { obj_sceneChanger = GameObject.FindGameObjectWithTag("GLOBAL_sceneChanger"); sceneChanger = obj_sceneChanger.GetComponent<SceneChanger>(); }
// 初期化処理 void Awake() { manager = SceneChanger.Manager; }