//private //game mode process private void gameModeProcess() { switch (gameMode) { case gmFadein: //fadein if (gmCnt == 0) { //screen fade in scr.setFadein(); } gmCnt++; break; case gmEnding: //title if (gmCnt == 0) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm201); } if (gmCnt == 5) { //description start dsc.setDescriptionText(); } if (gmCnt == 30) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_mnyfix); } //jk tap process Vector2 mpos; if (Input.GetMouseButtonUp(0)) { mpos = Input.mousePosition; Ray ray = Camera.main.ScreenPointToRay(mpos); RaycastHit hit; if (Physics.Raycast(ray, out hit, Mathf.Infinity) == true) { if (hit.collider.tag == "player") { if (tapDesc == true) { tapDesc = false; } else { //sound if (tapcnt <= 50) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_ds110); } //tap process tapcnt++; if (tapcnt == 10) { //naked process plc.naked(); dsc.setMask(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_naked); } if (tapcnt == 50) { //mask off process dsc.setMaskOff(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_wea); } } } } } gmCnt++; break; case gmFadeout: //fade out if (gmCnt == 0) { //stop description dsc.setDescriptionTextDisable(); //fade out scr.setFadeout(); } gmCnt++; break; case gmLoadScene: //load scene if (gmCnt == 0) { //set title scene scn.setTitleScene(); } gmCnt++; break; default: break; } }
//private //game mode process private void gameModeProcess() { switch (gameMode) { case gmFadein: //fadein if (gmCnt == 0) { //screen fade in scr.setFadein(); //score dsc.updateScore(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_rststart); } gmCnt++; break; case gmResult: //result if (gmCnt == 0) { //sound if (cmn_staticData.Instance.lastresult == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_stt); } } if (gmCnt == 75) { //generate title dsc.generateTitleText(); //sound if (cmn_staticData.Instance.lastresult == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_sl130); // cmn_soundController.Instance.playSound (cmn_soundController.Instance.sd_se_h_downback); } else { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_encount); } } if (gmCnt == 130) { //description start dsc.makeDescriptionText(); dsc.setDescriptionText(); //sound if (cmn_staticData.Instance.lastresult == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm101); } else { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm251); } } if (gmCnt >= 130) { if (Input.GetMouseButtonDown(0) == true) { dsc.skipDescriptionText(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_ds110); break; } } gmCnt++; break; case gmWait: //wait //tap if (Input.GetMouseButtonDown(0) == true) { //sound if (cmn_staticData.Instance.gameover == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_gamovr_110); } else { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_sl130); } cmn_soundController.Instance.fadeoutBgm(); gameMode = gmFadeout; gmCnt = 0; break; } if (gmCnt == 0) { //sound if (cmn_staticData.Instance.gameover == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_gameover); } else if (cmn_staticData.Instance.clear == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_clear); } else if (cmn_staticData.Instance.nextfield == true) { if (cmn_staticData.Instance.lastresult == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_moneyfix110); } else { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_gameover); } } } if (gmCnt == 50) { //sound if (cmn_staticData.Instance.gameover == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_gamovr_100); } else if (cmn_staticData.Instance.clear == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_h_ht); } else if (cmn_staticData.Instance.nextfield == true) { if (cmn_staticData.Instance.lastresult == true) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_h_ht); } else { // cmn_soundController.Instance.playSound (cmn_soundController.Instance.sd_vo_p_lse); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_gamovr_100); } } } gmCnt++; break; case gmFadeout: //fade out if (gmCnt == 0) { //fade out scr.setFadeout(); } gmCnt++; break; case gmLoadScene: //load scene if (gmCnt == 0) { if (cmn_staticData.Instance.gameover == true) { //set title scene scn.setTitleScene(); } else if (cmn_staticData.Instance.clear == true) { //set ending scene scn.setEndingScene(); } else if (cmn_staticData.Instance.nextfield == true) { scn.setFieldScene(); } } gmCnt++; break; default: break; } }
//private //game mode process private void gameModeProcess() { switch (gameMode) { case gmFadein: //fadein if (gmCnt == 0) { //screen fade in scr.setFadein(); } gmCnt++; break; case gmTitle: //title if (gmCnt == 0) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm501); } if (gmCnt == 5) { //description start dsc.setDescriptionText(); } if (gmCnt == 30) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_ttl); } if (gmCnt == 40) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_chime); } //jk tap process Vector2 mpos; if (Input.GetMouseButtonUp(0)) { mpos = Input.mousePosition; Ray ray = Camera.main.ScreenPointToRay(mpos); RaycastHit hit; if (Physics.Raycast(ray, out hit, Mathf.Infinity) == true) { if (hit.collider.tag == "player") { if (tapDesc == true) { tapDesc = false; } else { if (dsc.getLicenseDisp() == false) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_ds110); //tap process tapcnt++; if (tapcnt == 10) { tapcnt = 0; //naked process plc.change(); } } } } } } gmCnt++; break; case gmFadeout: //fade out if (gmCnt == 0) { //stop description dsc.setDescriptionTextDisable(); //fade out scr.setFadeout(); } gmCnt++; break; case gmLoadScene: //load scene if (gmCnt == 0) { //set field scene scn.setFieldScene(); } gmCnt++; break; default: break; } }
//private //game mode process private void gameModeProcess() { switch (gameMode) { case gmFadein: //fade in if (gmCnt == 0) { //screen fade in scr.setFadein(); //score dsc.updateScore(); } gmCnt++; break; case gmReady: //ready if (gmCnt == 0) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm301); } if (gmCnt == 25) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_start); } gmCnt++; if (gmCnt == 1) { //camera cameraCtr.zoomUp(); //display dsc.setSubmessage("READY..."); //player plc.termWakeup(); //hiari hac.termWakeup(); } if (gmCnt == 60) { gameMode = gmWaitStart; gmCnt = 0; cameraCtr.zoomOut(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_ready); } break; case gmWaitStart: //wait start gmCnt++; if (gmCnt == 1) { // dsc.setSubmessage ("TAP TO START!"); } if (gmCnt == 50) { //disp tap to start dsc.setSubmessage("TAP TO START!"); } if (gmCnt >= 50) { //tap input to field mode //input start bool inputstart = false; //for unity editor only #if UNITY_EDITOR if (Input.anyKey == true) { if (Input.GetKeyDown(KeyCode.Space)) { inputstart = true; } } #endif //tap if (Input.GetMouseButtonDown(0) == true) { inputstart = true; } //fight start if (inputstart == true) { gameMode = gmField; gmCnt = 0; //camera cameraCtr.zoomOut(); //display dsc.setSubmessage(""); //player plc.setFieldStart(); //hiari hac.setFieldStart(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_go); } } break; case gmField: //field //encount score process enstime = enstime + Time.deltaTime; if (enstime >= 3.0f) { enstime = 0.0f; cmn_staticData.Instance.timebonus -= 80; if (cmn_staticData.Instance.timebonus <= 0) { cmn_staticData.Instance.timebonus = 0; } else { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_ds100); } dsc.setStatus(); } //position message Vector3 ppos = plc.getPlayerPos(); Vector3 hpos = hac.getHiariPos(); //near? if ((Mathf.Abs(ppos.x - hpos.x) <= 50) && (Mathf.Abs(ppos.z - hpos.z) <= 50)) { //message dsc.setAlertmessage("ポケベルにメッセージ!\n「ヒアリ チカクニイル」"); dsc.setPokebellOn(); //sound if (pokesnd == false) { pokesnd = true; cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_pokebell); } } else { //message dsc.setAlertmessage(""); dsc.setPokebellOff(); //sound pokesnd = false; cmn_soundController.Instance.stopLoopSe(); } break; case gmEncount: //encount if (gmCnt == 0) { //sound cmn_soundController.Instance.stopBgm(); pokesnd = false; cmn_soundController.Instance.stopLoopSe(); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_h_encount); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_encount); } if (gmCnt == 45) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_encount); } gmCnt++; if (gmCnt == 1) { //camera cameraCtr.zoomUpEncount(); //message dsc.setAlertmessage(""); dsc.setPokebellOff(); // dsc.setSubmessage ("ヒアリ発見!!\n"); dsc.setSubmessage("ヒアリ発見!!"); //hiari hac.setEncount(); } // if (gmCnt == 50) { // //message // dsc.setSubmessage ("ヒアリ発見!!\n(TAP TO SKIP)"); // } if (gmCnt == 120) { //message // dsc.setSubmessage ("生け捕り開始!!\n(TAP TO SKIP)"); dsc.setSubmessage("生け捕り開始!!"); } if (gmCnt == 160) { //mov gameMode = gmFadeout; gmCnt = 0; } if (gmCnt >= 50) { if (Input.GetMouseButtonDown(0) == true) { //mov gameMode = gmFadeout; gmCnt = 0; } } break; case gmFadeout: //fade out if (gmCnt == 0) { //fade out scr.setFadeout(); } gmCnt++; break; case gmLoadScene: //load scene if (gmCnt == 0) { //set battle scene scn.setBattleScene(); } gmCnt++; break; default: break; } }
//private //game mode process private void gameModeProcess() { //game mode process switch (gameMode) { case gmFadein: //fade in if (gmCnt == 0) { //screen fade in scr.setFadein(); dsc.setHiariName(hac.getHiariLevel()); dsc.setHiariLevel(hac.getHiariLevel()); dsc.updateScore(); } gmCnt++; break; case gmReady: //ready if (gmCnt == 0) { //display dsc.termWakeup(); dsc.setSubmessage("READY..."); //player plc.termWakeup(); //hiari hac.termWakeup(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_btlstart); } if (gmCnt == 4) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_stt_110); } if (gmCnt == 65) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_ready); } if (gmCnt >= 120) { //mode gameMode = gmWaitStart; gmCnt = 0; } else { gmCnt++; } break; case gmWaitStart: //wait start if (gmCnt == 0) { //display dsc.setSubmessage("TAP TO START!"); } //input start bool inputstart = false; //for unity editor only #if UNITY_EDITOR if (Input.anyKey == true) { if (Input.GetKeyDown(KeyCode.Space)) { inputstart = true; } } #endif //tap if (Input.GetMouseButtonDown(0) == true) { inputstart = true; } //fight start if (inputstart == true) { gameMode = gmFight; gmCnt = 0; //display dsc.setSubmessage(""); //player plc.setFightStart(); //hiari hac.setFightStart(); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm401); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_go); } else { gmCnt++; } break; case gmFight: //fight //high priority voice cnt process cmn_staticData.Instance.highvoicecnt1--; if (cmn_staticData.Instance.highvoicecnt1 <= 0) { cmn_staticData.Instance.highvoicecnt1 = 0; } cmn_staticData.Instance.highvoicecnt2--; if (cmn_staticData.Instance.highvoicecnt2 <= 0) { cmn_staticData.Instance.highvoicecnt2 = 0; } cmn_staticData.Instance.highvoicecnt3--; if (cmn_staticData.Instance.highvoicecnt3 <= 0) { cmn_staticData.Instance.highvoicecnt3 = 0; } break; case gmHiariKo: //hiari ko if (gmCnt == 0) { //slow 1 Time.timeScale = 0.02f; } if (gmCnt == 1) { //slow 2 Time.timeScale = 0.2f; } if (gmCnt == 15) { //normal speed Time.timeScale = 1.0f; //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_p_wn100); } if (gmCnt == 76) { //camera cameraCtr.setHiariKo(); //display dsc.setSubmessage("生け捕り成功!!"); //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_hkoback); //(loop) cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_h_ko_back); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_hkoback_e); } if ((gmCnt >= 76) && (gmCnt <= 455)) { if (gmCnt % 65 == 0) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_hkoback); } if (gmCnt % 2 == 0) { if (Random.Range(0, 7) == 0) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_exp); } } } if (gmCnt >= 76) { //tap if (cmn_staticData.Instance.kodemo == false) { if (Input.GetMouseButtonUp(0) == true) { if (pause == false) { if (tapCansel == false) { gameMode = gmFadeout; gmCnt = 0; //state cmn_staticData.Instance.kodemo = false; //sound cmn_soundController.Instance.fadeoutBgm(); cmn_soundController.Instance.stopSe(); cmn_soundController.Instance.stopVoice(); break; } else { tapCansel = false; } } } } } if (gmCnt == 90) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_h_ht); } if (gmCnt == 110) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm451); } if (gmCnt == 200) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_hkoback_e); } if (gmCnt == 456) { //display dsc.setEarthExplosion(); //sound //(stop) // cmn_soundController.Instance.stopBgm(); cmn_soundController.Instance.pauseBgm(); cmn_soundController.Instance.stopSe(); // cmn_soundController.Instance.stopLoopSe (); cmn_soundController.Instance.stopVoice(); //(space) cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_space100); } if (gmCnt == 536) { hac.termHiari(); } if (gmCnt == 546) { //display dsc.termEarthExplosion(); //sound //(stop) cmn_soundController.Instance.stopSe(); // cmn_soundController.Instance.stopLoopSe (); //(hko back) // cmn_soundController.Instance.playSound (cmn_soundController.Instance.sd_bgm451); cmn_soundController.Instance.resumeBgm(); cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_hkoback); //(loop) cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_h_hkoback_e); } if (gmCnt == 584) { //hiari particles hac.termHiariParticles(); } if (gmCnt == 765) { //sound cmn_soundController.Instance.stopLoopSe(); } if (gmCnt == 797) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_wn); } if (gmCnt >= 886) { gameMode = gmFadeout; gmCnt = 0; //state cmn_staticData.Instance.kodemo = false; //sound cmn_soundController.Instance.fadeoutBgm(); cmn_soundController.Instance.stopSe(); break; } else { gmCnt++; } break; case gmPlayerKo: //player ko if (gmCnt == 0) { //slow 1 Time.timeScale = 0.02f; } if (gmCnt == 1) { //slow 2 Time.timeScale = 0.2f; } if (gmCnt == 15) { //normal speed Time.timeScale = 1.0f; } if (gmCnt == 75) { //camera cameraCtr.setPlayerKo(); //display dsc.setSubmessage("生け捕り失敗..."); } if (gmCnt >= 75) { //tap if (cmn_staticData.Instance.kodemo == false) { if (Input.GetMouseButtonUp(0) == true) { if (pause == false) { if (tapCansel == false) { gameMode = gmFadeout; gmCnt = 0; //state cmn_staticData.Instance.kodemo = false; //sound cmn_soundController.Instance.fadeoutBgm(); cmn_soundController.Instance.stopSe(); cmn_soundController.Instance.stopVoice(); break; } else { tapCansel = false; } } } } } if (gmCnt == 90) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_se_p_los110); } if (gmCnt == 110) { //sound cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_bgm351); } if (gmCnt == 160) { //sound if (cmn_staticData.Instance.pko_vo_cnt == 0) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_ko_110); } else if (cmn_staticData.Instance.pko_vo_cnt == 1) { cmn_soundController.Instance.playSound(cmn_soundController.Instance.sd_vo_p_ko_100); } cmn_staticData.Instance.pko_vo_cnt++; if (cmn_staticData.Instance.pko_vo_cnt >= 2) { cmn_staticData.Instance.pko_vo_cnt = 0; } } if (gmCnt >= 485) { gameMode = gmFadeout; gmCnt = 0; //state cmn_staticData.Instance.kodemo = false; //sound cmn_soundController.Instance.fadeoutBgm(); cmn_soundController.Instance.stopSe(); cmn_soundController.Instance.stopVoice(); break; } else { gmCnt++; } break; case gmFadeout: //fade out if (gmCnt == 0) { scr.setFadeout(); } gmCnt++; break; case gmLoadScene: //load scene if (gmCnt == 0) { //static data if (result == true) { //hiari level up cmn_staticData.Instance.hlevel++; if (cmn_staticData.Instance.hlevel >= 5) { cmn_staticData.Instance.hlevel = 4; } //hiari win num cmn_staticData.Instance.hiariwin++; } else { //hiari lose num cmn_staticData.Instance.hiarilose++; } //load scene scn.setResultScene(); } gmCnt++; break; default: break; } }