//ある程度の順番にロードする static public void LoadNextSchene() { StageConsole.MyScene scene = StageConsole.MyGetScene(); if (scene == StageConsole.MyScene.Title) { StageConsole.MyLoadScene(StageConsole.MyScene.StageSelect); } else if (scene == StageConsole.MyScene.StageSelect) { StageConsole.MyLoadScene(StageConsole.MyScene.Stage1); } else if (scene == StageConsole.MyScene.Stage1) { StageConsole.MyLoadScene(StageConsole.MyScene.Stage2); } else if (scene == StageConsole.MyScene.Stage2) { StageConsole.MyLoadScene(StageConsole.MyScene.Stage3); } else if (scene == StageConsole.MyScene.Stage3) { StageConsole.MyLoadScene(StageConsole.MyScene.Stage4); } else if (scene == StageConsole.MyScene.Stage4) { StageConsole.MyLoadScene(StageConsole.MyScene.Result); } else if (scene == StageConsole.MyScene.Result || scene == StageConsole.MyScene.GameOver) { StageConsole.MyLoadScene(StageConsole.MyScene.Title); } }
void Inputter() { if (Input.GetKeyDown(KeyCode.Space) || DSInput.PushDown(DSButton.Circle)) { StageConsole.MyLoadScene(StageConsole.MyScene.Title); } }
void Update() { if (Input.GetKeyDown(KeyCode.F1)) { ResultManager.TrueEnd = true; StageConsole.MyLoadScene(StageConsole.MyScene.BossStageStart); } }
private void OnCollisionEnter2D(Collision2D coll) { if (coll.gameObject.tag == "Player" && info.GetParameter.actSwitch && info.GetItemValue.herbValue <= 0) { //StageMove.LoadNextSchene(); StageConsole.MyLoadScene(StageConsole.MyScene.BetweenStage); } }
// ここに会話以降をお願い予定 private void Normalend() { Debug.Log("ノーマルエンド"); if (!endTirgger) { _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.NormalEnd_Boss)); } endTirgger = true; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { if (PlayerInfoCounter.Instance.GetItemValue.butteflyWingValue == 6) { Debug.Log("ok"); ResultManager.TrueEnd = true; } _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.BossStageStart)); } }
void Update() { if (endTrigger) { GameManager.Instance.SetGameState(GameManager.GameState.Result); if (!isFade) { _endImagefade.Fade(false, () => _fadeUI.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Endroll))); } isFade = true; } }
void Update() { if (bossEvent.EventStart) { yarn.enabled = true; cameraLight.lightType = Light2D.LightType.Global; herbLight.gameObject.SetActive(false); scenerioEnd = true; } if (GameManager.Instance.GetGameState == GameManager.GameState.Main && scenerioEnd) { StageConsole.MyLoadScene(StageConsole.MyScene.BossStage); } }
void Update() { switch (playerType) { case EndPlayerType.Default: if (stp.isTarget && !IsArrived) { _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Result)); IsArrived = true; } break; case EndPlayerType.NormalEnd: break; } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { if (ResultManager.TrueEnd) { GameManager.Instance.SetGameState(GameManager.GameState.Result); _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Scenario)); } else { GameManager.Instance.SetGameState(GameManager.GameState.Result); _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.NormalEnd)); } } }
void TimeAdd(StageConsole.MyScene scene) { if (!ControllerSystem.SetSystem) { if (_time <= _playTime) { _time += Time.deltaTime; } else { StageConsole.MyLoadScene(scene); } } else { _time = 0; } }
/// <summary> ///暗転 /// </summary> private void stageBGMove() { if (SceneMove) { //Debug.Log("ステージまだセットしてません。"); stageBG.GetComponent <SpriteRenderer>().color = new Vector4(1, 1, 1, stageBG.GetComponent <SpriteRenderer>().color.a + Time.deltaTime); if (stageBG.GetComponent <SpriteRenderer>().color.a >= 1.0f) { if (isTitle) { StageConsole.MyLoadScene(StageConsole.MyScene.Title); } else if (i == 0) { StageConsole.MyLoadScene(StageConsole.MyScene.Scenario); } else if (i == 1) { StageConsole.MyLoadScene(StageConsole.MyScene.Stage2); } } } }
// 特定のステージをロードする static public void LoadGameOverSchene() { StageConsole.MyLoadScene(StageConsole.MyScene.GameOver); }
static public void ResultLoad() { StageConsole.MyLoadScene(StageConsole.MyScene.Result); }
{/* * public enum MyScene * { * Title, * StageSelect, * Stage1, * Stage2, * Stage3, * Stage4, * Result, * GameOver * } */ static public void ReloadCurrentSchene() { StageConsole.MyScene scene = StageConsole.MyGetScene(); StageConsole.MyLoadScene(scene); }
void Update() { if (_sceneType == SceneType.StageScene) { if (Input.GetKeyDown(KeyCode.P)) { GameManager.Instance.SetGameState(GameManager.GameState.Pause); } if (DSInput.PushDown(DSButton.Option)) { SoundManager.PlayEffect("Audios/System/popup", false); _dsInput = true; GameManager.Instance.SetGameState(GameManager.GameState.Pause); } if (GameManager.Instance.GetGameState == GameManager.GameState.Pause) { if (Input.GetKeyDown(KeyCode.RightArrow)) { _selects = true; } if (Input.GetKeyDown(KeyCode.LeftArrow)) { _selects = false; } if (DSInput.PushDown(DSButton.Circle)) { _isPush = true; _yesImage[0].gameObject.SetActive(false); _yesImage[1].gameObject.SetActive(true); _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Title)); } else if (DSInput.PushDown(DSButton.Cross)) { _noImage[0].gameObject.SetActive(true); _noImage[1].gameObject.SetActive(false); PanelReset(); GameManager.Instance.SetGameState(GameManager.GameState.Main); } if (_selects) { if (Input.GetKeyDown(KeyCode.Z)) { PanelReset(); GameManager.Instance.SetGameState(GameManager.GameState.Main); } } else { if (Input.GetKeyDown(KeyCode.Z)) { PanelReset(); _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Title)); } } if (!_isPush) { PauseView(); } } else { PauseNotView(); } } else if (_sceneType == SceneType.ScenarioScene) { if (Input.GetKeyDown(KeyCode.P)) { _isPause = true; } if (DSInput.PushDown(DSButton.Option)) { _dsInput = true; _isPause = true; } if (Input.GetKeyDown(KeyCode.RightArrow)) { _selects = true; } if (Input.GetKeyDown(KeyCode.LeftArrow)) { _selects = false; } if (_isPause) { if (DSInput.PushDown(DSButton.Circle)) { if (useCase.GetScenarioNum == 0) { _isPush = true; _yesImage[0].gameObject.SetActive(false); _yesImage[1].gameObject.SetActive(true); _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Tutorial)); } else { _isPush = true; _yesImage[0].gameObject.SetActive(false); _yesImage[1].gameObject.SetActive(true); // エピローグ時の処理 _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Title)); } } else if (DSInput.PushDown(DSButton.Cross)) { PanelReset(); _panelImage.gameObject.SetActive(false); _isPause = false; } if (_selects) { if (Input.GetKeyDown(KeyCode.Z)) { PanelReset(); _panelImage.gameObject.SetActive(false); _isPause = false; } } else { if (Input.GetKeyDown(KeyCode.Z)) { PanelReset(); if (useCase.GetScenarioNum == 0) { _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Tutorial)); } else { // エピローグ時の処理 _fade.Fade(false, () => StageConsole.MyLoadScene(StageConsole.MyScene.Title)); } } } if (!_isPush) { PauseView(); } } else { PanelReset(); PauseNotView(); } } }