// Update is called once per frame void Update() { //選択が終了していたら if (select.selected) { //Exitが選択されたら if (select.selected_exit) { //タイトルに戻る fmana.FadeOut("Title"); } //プレイヤーが選択されたら else { //メインゲームに戻る fmana.FadeOut("MainGame"); } } //一定時間選択されなかったら else if (timer > autoTitleLoadTime) { //タイトルに戻る fmana.FadeOut("Title"); } timer += Time.deltaTime; }
//---------------------------------------------------------- // オープニングアニメーションの処理 // private IEnumerator OpeningLoop() { // フェードイン fm.FadeIn(); // フェードインが終わるまで待つ yield return(new WaitForSeconds(fm.fadeInTime)); // 日電ロゴを指定秒表示 yield return(new WaitForSeconds(jeclogoVisibleTime)); // ツクモロゴと入れ替え while (true) { jecLogo.color = new Color(jecLogo.color.r, jecLogo.color.g, jecLogo.color.b, (jecLogo.color.a - (0.5f * Time.deltaTime))); tukumoLogo.color = new Color(jecLogo.color.r, jecLogo.color.g, jecLogo.color.b, (tukumoLogo.color.a + (0.5f * Time.deltaTime))); // 入れ替えが終わればループを抜ける if (tukumoLogo.color.a >= 1.0f) { break; } else { yield return(0); } } // ツクモロゴを指定秒表示 yield return(new WaitForSeconds(jeclogoVisibleTime)); // フェードアウト fm.FadeOut(); }
IEnumerator CoNextStage() { fadeManager.FadeOut(); nowField.SetActive(false); player.SetActive(false); // 조이스틱 이동과 중복 되서 위치 이동 이상하게 됌 그래서 추가 player.GetComponent <PlayerTargeting>().monsterList = null; yield return(new WaitForSeconds(0.5f)); // 시각적으로 보이는 것 때문에 일부로 딜레이 nowField = startPosList[currentStage - 1].parent.gameObject; player.transform.position = startPosList[currentStage - 1].position; nowField.SetActive(true); isBattle = false; // 포탈 Obj 초기화 portal = nowField.transform.Find("Portal").gameObject; portal.transform.GetChild(0).GetComponent <Animator>().SetBool("Clear", false); portal.SetActive(false); player.SetActive(true); player.GetComponent <PlayerController>().animator.SetFloat("AtkSpeed", player.GetComponent <PlayerController>().characterBase.atkSpeed); fadeManager.FadeIn(); stageTextAnimation.StageAnimationStart(currentStage.ToString() + " - 튜토리얼"); }
void TransSceneIfReady() { if (Storage.Contains("Chain") && Storage.Contains("BackNum")) { fadeManager.FadeOut(0.5f, Ease.InQuad, () => Application.LoadLevel("Main")); } }
public void Retry() { if (toggle) { return; } toggle = true; GameVariables._pauseGame = true; fade.FadeOut(SceneManager.GetActiveScene().name); }
IEnumerator TransferCoroutine() { theFade.FadeOut(); yield return(new WaitForSeconds(2f)); SceneManager.LoadScene("Stage00"); theFade.FadeOut(); yield return(new WaitForSeconds(1.5f)); theFade.FadeIn(); }
//---------------------------------------------------------- // カメラ移動処理 // private IEnumerator CameraMoveITween(List <iTweenPath> path) { int i = 0; while (true) { // パスが始まる前にフェードイン fm.FadeIn(); //パスを通したオブジェクトのパスを取得 currentPathName = path[i].GetComponent <iTweenPath>().pathName; //パスの一番目の座標にカメラを移動 this.transform.position = path[i].nodes[0]; //パスを通してカメラを移動 iTween.MoveTo(this.gameObject, iTween.Hash("path", iTweenPath.GetPath(currentPathName), "time", times[i], "orienttopath", false, "easetype", iTween.EaseType.linear, "looptype", iTween.LoopType.none)); yield return(new WaitForSeconds(times[i] - fm.fadeOutTime)); // 現在のパスが終わる前にフェードアウト fm.FadeOut(); // フェードアウトが終わるまで待つ while (true) { if (fm.fadeState == FadeState.FadeOut) { yield return(0); } else { break; } } // 次のパスへ if (i < path.Count - 1) { i++; } else { i = 0; } } }
void OnTriggerEnter2D(Collider2D col) { if (col.tag == Tags.Player) { var pu = col.GetComponent <PickUpDocuments>(); List <GameObject> objectsToRemove = new List <GameObject>(); foreach (var doc in pu.m_DocumentTrail.Where(x => x.tag != Tags.Player && x.GetComponent <Document>().DocumentType == acceptedDocuments)) { PlayerStats.DocumentsDepositedCount++; objectsToRemove.Add(doc); Destroy(doc); if (PlayerStats.DocumentsDepositedCount >= PlayerStats.DocumentsWinCriterea) { Debug.Log("player win"); FadeManager.FadeOut(this, () => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }); } } foreach (var doc in objectsToRemove) { pu.RemoveDocument(doc); } if (objectsToRemove.Count() > 0) { SoundManager.Play(this, "paper_deposit", transform.position); } } }
IEnumerator CoFadeOut() { fadeManager.FadeOut(); yield return(new WaitForSeconds(0.5f)); StartCoroutine(CoLoadScene()); }
void Update() { if (Input.GetKeyDown(KeyCode.Q)) { FadeManager.FadeIn(this, () => { Debug.Log("Done fading in"); }); } if (Input.GetKeyDown(KeyCode.Z)) { FadeManager.FadeOut(this, () => { Debug.Log("Done fading out"); }, 0.1f); } if (Input.GetKeyDown(KeyCode.E)) { var p = ParticleManager.GetParticle("BloodExplosion"); var pInstance = Instantiate(p); pInstance.transform.position = this.transform.position; _(5, () => { Destroy(pInstance); }); } if (Input.GetKeyDown(KeyCode.R)) { SoundManager.Play(this, "bic", this.transform.position); } if (Input.GetKeyDown(KeyCode.F)) { } if (Input.GetKeyDown(KeyCode.G)) { } if (Input.GetKeyDown(KeyCode.C)) { } }
// Update is called once per frame void Update() { if (Input.GetKeyDown("return")) { FadeManager.FadeOut(2); } }
private IEnumerator LoadScene() { yield return(StartCoroutine(m_FadeManager.FadeOut(m_Fade))); SceneManager.LoadScene(0); Destroy(gameObject); }
void GameOver() { var volume = audioSource.volume; DOTween.To(() => 1, value => audioSource.volume = volume * value, 0, 1f); fadeManager.FadeOut(1f, DG.Tweening.Ease.Linear, () => Application.LoadLevel("Result")); }
void Start() { FadeManager.FadeIn(); for (int i = 1; i < stages.Count + 1; i++) { float xMargin = 100; float yMargin = -200; Vector3 buttonPosition = new Vector3(i * xMargin, yMargin, 0); GameObject buttonObject = (GameObject)Instantiate(this.buttonPrefab, buttonPosition, Quaternion.identity); buttonObject.transform.SetParent(mainCanvas.transform, false); buttonObject.name = i.ToString(); Button button = buttonObject.GetComponent <Button>(); Text t = button.transform.FindChild("Text").gameObject.GetComponent <Text>(); t.text = "Stage" + i.ToString(); button.onClick.AddListener(() => { //Debug.Log(buttonObject.name); //各シーンの読み込み処理 FadeManager.FadeOut(t.text); }); } }
IEnumerator waitFadeOut() { fadeManager.FadeOut(); yield return(new WaitForSeconds(2f)); state = State.FadeIn; }
/// <summary> /// タイトルシーンへ遷移する条件を満たしていれば遷移する。 /// </summary> void FadeOutToTitle() { if (IsTransitionCondistions()) { fadeManager.FadeOut(); } }
private void Update() { if (Input.GetMouseButtonDown(0)) { FadeManager.FadeOut(1); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Space)) { FadeManager.FadeOut(0); } }
IEnumerator ChangeCamPos(int i, Collider other) { snapshots[i].TransitionTo(1.0f); fm.FadeOut(); yield return(new WaitForSeconds(0.5f)); if (i == 0) { if (!other.transform.GetChild(0).gameObject.activeSelf) { other.transform.GetChild(0).gameObject.SetActive(true); try { other.transform.GetChild(1).gameObject.SetActive(true); } catch { } } } else if (i == 1) { other.transform.GetChild(0).gameObject.SetActive(false); other.transform.GetChild(1).gameObject.SetActive(false); } else if (i == 2) { other.transform.GetChild(0).gameObject.SetActive(false); } cam.transform.position = cameraPos[i].transform.position; fm.FadeIn(); }
IEnumerator ChangeScene() { fm.FadeOut(); yield return(new WaitForSeconds(2f)); SceneManager.LoadScene(loadLevel); }
void Scene() { if (Input.GetKeyDown("joystick button 7")) { FadeManager.FadeOut("Title"); } }
// 初期化 public override void Init(CommonData common_data) { data = common_data.cup_final_data; if (GameEnd.Cleared && !common_data.is_stage_select) { MusicManager.Play(BgmCode.CupClear); } else if (!common_data.is_stage_select) { MusicManager.Play(BgmCode.CupResult); } if (common_data.is_stage_select) { FadeManager.FadeOut(1.0f, "MainGameScene"); } else { if (GameEnd.Cleared) { foreach (ParticleSystem effect in common_data.fireworks) { effect.Play(); } } ++Director.phase;// = Mathf.Min(9, Director.phase + 1); SceneManager.LoadScene("GameEndScene", LoadSceneMode.Additive); } }
public void OnClick() { Data.GAME_MODE = Data.GAME_MODE_A; PlayClickSound(); FadeManager.FadeOut(nextScene, fadeOutTime); }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Return)) { FadeManager.FadeOut(2); } }
//Player死亡時に呼び出す関数 public void PlayerDead() { Debug.Log("dead!"); Time.timeScale = 0f; //ゲーム内の時間の流れを停止(これ以降はInvokeとか使えなくなるので注意、使いたい場合はコルーチンを利用する) FadeManager.FadeOut(untilReloadTime, 0, ReloadScene, true); }
public void StageSelectButton() { s_Effect.PlayOneShot(s_Effect.clip); Time.timeScale = 1f; FadeManager.FadeOut(1); Destroy(BGM); }
private void OnTriggerEnter(Collider collider) { if (collider.GetComponent <Tag>().HasTag(TagType.Player)) { FadeManager.FadeOut(1); } }
void Start() { PlayerStats.DocumentsDepositedCount--; GetComponent <Button>().onClick.AddListener(() => { _conditionsMet = PaintManager.CheckAllFields(); if (_conditionsMet) { if (PlayerStats.DocumentsDepositedCount > 0) { PlayerStats.DocumentsDepositedCount--; PaintManager.ClearAllFields(); GameObject.Find("Contract").GetComponent <ContractInitiator>().GenerateNew(); } else { FadeManager.FadeOut(this, () => { SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1); }); } } else { SoundManager.Play(this, "error", Vector3.zero, 0.2f); StartCoroutine(WarnAWhile()); } }); }
// Update is called once per frame void Update() { if (talking && keyActivated) { if (Input.GetKeyDown(KeyCode.Z)) { keyActivated = false; count++; text.text = ""; if (count == listSentences.Count) { StopAllCoroutines(); ExitDialogue(); } else { StopAllCoroutines(); StartCoroutine(StartDialogueCoroutine()); } } else if (Input.GetKeyDown(KeyCode.C)) { StopAllCoroutines(); ExitDialogue(); theFade.FadeOut(); SceneManager.LoadScene("EndingCredit"); } } }
public IEnumerator iExit() { FadeManager.FadeOut(uiPanel, 0.5f, true); Debug.Log(this.name + " Exit: " + Time.time); yield return(new WaitForSeconds(0.5f)); }