public void GameFailed() { gameState = G20_GameState.GAMEOVER; Time.timeScale = 0; G20_BGMManager.GetInstance().Play(G20_BGMType.GAMEOVER); G20_VoicePerformer.GetInstance().PlayWithCaption(G20_VoiceType.GAME_OVER1); //ゲームオーバー演出の開始 G20_FailedPerformer.GetInstance().Excute(GameEnd); }
// 字幕表示なし // 再生中はBGM音量下げる public void PlayWithNoCaption(G20_VoiceType voiceNumber) { // 字幕表示しないボイス再生 G20_SEType seType = GetSEType(voiceNumber); PlaySELimit(seType); float clipLength = G20_SEManager.GetInstance().GetClipLength(seType); G20_BGMManager.GetInstance().VolumeDown(clipLength); }
public void GameClear() { IsGesslerBattle = false; gameState = G20_GameState.CLEAR; //gameRootAnim.enabled = true; //gameRootAnim.CrossFade("ToClear", 0.1f); //StartCoroutine(RootAnimOff(2f)); // 敵(残ってれば)全滅 G20_EnemyCabinet.GetInstance().KillAllEnemys(); G20_ScoreApplePopper.GetInstance().DeleteAllScoreApples(); G20_BGMManager.GetInstance().FadeOut(); G20_BulletShooter.GetInstance().coutingHitRate = false; // クリア演出の開始 G20_ClearPerformer.GetInstance().Excute(GameEnd); }
void Start() { _gameController = GameObject.Find("GameManager").GetComponent <GameController>(); _coordinateManager = GameObject.Find("GameManager").GetComponent <CoordinateManager>(); gesslerShootPerformer = G20_ComponentUtility.FindComponentOnScene <G20_GesslerShootPerformer>(); titleCanvas.SetActive(true); G20_BGMManager.GetInstance().Play(G20_BGMType.TITLE); paramCanvas.SetActive(false); //Playerが死んだときにGameOverに移行させるためにアクションを追加 playerObj.deathActions += (x, y) => GameFailed(); RenderSettings.ambientLight = startAmbient; RenderSettings.fogColor = startFogColor; RenderSettings.fogDensity = startFogDensity; }
public override void StartPerformance() { G20_BGMManager.GetInstance().Play(playBGMType); }
IEnumerator FallAppleRoutine(Action on_end_action) { G20_FadeChanger.GetInstance().StartWhiteFadeOut(2.0f); yield return(new WaitForSeconds(2.0f)); SetClearObjects(); playerObj.transform.position = new Vector3(0, 1f, -9.5f); playerObj.transform.eulerAngles = Vector3.zero; yield return(new WaitForSeconds(1f)); G20_BGMManager.GetInstance().Play(G20_BGMType.CLEAR); G20_FadeChanger.GetInstance().StartWhiteFadeIn(2.0f); yield return(new WaitForSeconds(2.0f)); //ランク演出 rankPerformer.StartPerformance(); //スコア算出 var sumScore = G20_ScoreManager.GetInstance().GetSumScore(); // リンゴ落下数の計算 var goldFallCount = G20_ScoreManager.GetInstance().GoldPoint.Value; // 全リンゴ var totalAppleCount = (sumScore / 100) - goldFallCount * 2; // 全リンゴ25、金4のとき // 5,11,17,23番目に落とす(6の倍数-1) // 全リンゴ25、金5のとき // 4,9,14,19,24番目に落とす(5の倍数-1) int goldRate = 9999; if (goldFallCount != 0) { goldRate = totalAppleCount / goldFallCount; } initUI(); //リンゴ積み上げ balanceNum = -fallSize.x; var fallAppleDelay = fallTime / totalAppleCount; for (int i = 0; i < totalAppleCount; i++) { GameObject apple; bool isGoldenApple = (i % goldRate == goldRate - 1); if (isGoldenApple) { apple = Instantiate(goldenAppleObj); } else { apple = Instantiate(appleObj); } var fallAppleSound = apple.GetComponent <G20_FallAppleSound>(); fallAppleSound.firstCollisionHItAction += PlusAppleScore; fallAppleSound.eventArgInteger = isGoldenApple ? 300 : 100; apple.transform.SetParent(transform); if (IsRandomlyFall) { apple.transform.position = GetRandomPosition(); } else { apple.transform.position = GetBalancePosition(); } yield return(new WaitForSeconds(fallAppleDelay)); } yield return(new WaitForSeconds(endWaitTime)); if (on_end_action != null) { on_end_action(); } }
IEnumerator GesslerShootCoroutine(System.Action on_end_action) { BattleSetUP(); var anim = GameObject.Find("G20_Root").GetComponent <Animator>(); anim.enabled = true; anim.CrossFade("ToGesslerBattle", 0.3f); G20_BGMManager.GetInstance().FadeOut(); yield return(new WaitForSeconds(1.0f)); G20_BGMManager.GetInstance().Play(G20_BGMType.BOSS); yield return(new WaitForSeconds(1.9f)); anim.enabled = false; G20_VoicePerformer.GetInstance().PlayWithNoControll(G20_VoiceType.INGAME2); //counterWall(ゲスラーの反撃判定壁)をアクティブに counterWall.SetActive(true); hitCounterApple = counterWall.GetComponent <G20_HitCounterApple>(); yield return(null); // 「SHOOT」表示 ActivateShootObject(true); StartCoroutine(NextGesslerMove()); // ゲスラー撃てるようになる stageBoss.IsInvincible = false; //gesslerにhiteefect追従するように bossHitEffect = stageBoss.GetComponent <G20_HitEffect>(); bossHitEffect.effctParent = stageBoss.transform; bossHitEffect.ChangeEffectType(G20_EffectType.HIT_GESSLER_BODY); Destroy(stageBoss.GetComponent <G20_HitSE>()); stageBoss.GetComponent <G20_HitObject>().ChangeHitTag(G20_HitTag.ASSIST); stageBoss.GetComponent <G20_HitObject>().IsHitRateUp = true; while (stageBoss.HP > 0) { yield return(null); } //counterWall(ゲスラーの反撃判定壁)を非アクティブに counterWall.SetActive(false); gesslerAnim.PlayAnim(G20_GesslerAnimType.Yarare); // 「SHOOT」非表示 foreach (var o in activateObjs) { o.SetActive(false); } G20_VoicePerformer.GetInstance().PlayWithCaption(G20_VoiceType.GAME_CLEAR1); StartCoroutine(GesslerDownMove()); StartCoroutine(ApprochToGessler()); yield return(new WaitForSeconds(1.0f)); // ゲスラー撃破 if (on_end_action != null) { on_end_action(); } }
IEnumerator ToIngameCoroutine() { // 演出中は弾の判定なし G20_BulletShooter.GetInstance().CanShoot = false; titleCanvas.SetActive(false); G20_BGMManager.GetInstance().FadeOut(); var seForest = G20_SEManager.GetInstance().Play(G20_SEType.FOREST, Vector3.zero, false); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 1f)); //playerObj.GetComponent<Animator>().SetBool("zoomout", true); // 環境光は別のコルーチンで遷移 StartCoroutine(LightSettingCoroutine()); // プレイヤー後ずさり等のアニメーション開始 gameRootAnim.CrossFade("ToIngame", 0f); yield return(new WaitForSeconds(5.5f)); summonParticle.Play(); yield return(new WaitForSeconds(0.7f)); paramCanvas.SetActive(true); summonParticle.Stop(); gesslerAnim.enabled = true; gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Attack); yield return(new WaitForSeconds(0.9f)); yield return(new WaitForSeconds(0.6f)); gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Taiki); // ゲスラーふわふわアニメーション開始 // 最初のリンゴ召喚 G20_StageManager.GetInstance().IngameStart(); G20_StageManager.GetInstance().nowStageBehaviour.SetEnableUpdateCall(1); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 1.5f)); // セリフ再生と字幕表示 //G20_VoicePerformer.GetInstance().Play(0); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 0.5f)); gameRootAnim.enabled = false; gesslerShootPerformer.gesslerAnim.PlayAnim(G20_GesslerAnimType.Taiki); // 戦闘開始 G20_BulletShooter.GetInstance().CanShoot = true; gameState = G20_GameState.INGAME; G20_EnemyCabinet.GetInstance().AllEnemyAIStart(); // 「SURVIVE!」表示 uiTextSurvive.SetActive(true); // BGM G20_BGMManager.GetInstance().Play(G20_BGMType.INGAME_0); G20_SEManager.GetInstance().Fadeout(seForest); yield return(new WaitForSeconds(isSkipPerformance ? 0.001f : 5f)); uiTextSurvive.SetActive(false); yield return(null); }