// Use this for initialization void Start() { load_cnt = Set_Load_Cnt(); stage_lv = GameStartText.Set_Stage_Lv(); //move_diff_x = Skes_speed(); /* * if (load_cnt == 0) * { * move_diff_x = 0; * load_cnt = 1; * } * if (load_cnt == 1) * { * move_diff_x = Skes_speed(); * } */ move_diff_x += stage_lv * 0.0005f; move_x -= move_diff_x; move_left_x = move_x; c_wait = GameObject.Find("c_wait"); //c_waitをオブジェクトの名前から取得して変数に格納する script = c_wait.GetComponent <Move_Endless>(); //c_waitの中にあるmoveを取得して変数に格納する sound01 = GetComponent <AudioSource>(); MainSpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); debris_time = 0; count = 0; skill = PlayerPrefs.GetInt("yukou_button_number", 0); lv = PlayerPrefs.GetInt("lv_6", 1); point_count = 0; }
// ハイスコア // Use this for initialization void Start() { score = Score_Endless.getScore(); stage_lv = GameStartText.Set_Stage_Lv(); Not_Network_dialog.SetActive(false); time = 0; One = true; text_f = false; cnt = 0; time2 = 0; coin_num = PlayerPrefs.GetInt("coin_num", 0); PlayerPrefs.SetInt("Stage_Lv", stage_lv); //PlayerPrefs.SetInt("Score", 0); PlayerPrefs.Save(); //score_2 = Score.getScore(); //score = 1450; //デバック用 score_zero = 0; coin_zero = 0; canvas.SetActive(false); Massage_Box.SetActive(false); next_text.SetActive(false); button_f = false; next_scene = false; //AdMobManager.instance.DestroyBanner(); //AdMobManager.instance.RequestInterstitial(); //Scene_name = PlayerPrefs.GetString("Scene_name"); //bairitu = 10; }
void Update() { bool flush_f = script.hit_check1; bool warning_OK = script2.warning_OK; if (flush_f == true) { this.img.color = new Color(0.5f, 0f, 0f, 0.5f); } else { this.img.color = Color.Lerp(this.img.color, Color.clear, Time.deltaTime); } if (warning_OK == true) { scene_cnt = GameStartText.Set_num(); if (scene_cnt == 0) { this.img1.color = new Color(1.0f, 0f, 0f, 0.5f); this.img1.color = Color.Lerp(this.img1.color, Color.clear, Mathf.PingPong(Time.time * 2.0f, 1.0F)); } if (scene_cnt == 1) { this.img2.color = new Color(0f, 1.0f, 0f, 0.5f); this.img2.color = Color.Lerp(this.img2.color, Color.clear, Mathf.PingPong(Time.time * 2.0f, 1.0F)); } if (scene_cnt == 2) { this.img3.color = new Color(0f, 0f, 1.0f, 0.5f); this.img3.color = Color.Lerp(this.img3.color, Color.clear, Mathf.PingPong(Time.time * 2.0f, 1.0F)); } } }
// Use this for initialization void Start() { load_cnt = Set_Load_Cnt(); stage_lv = GameStartText.Set_Stage_Lv(); skeleton_count = Skel4_num(); /* * if (load_cnt == 0) * { * skeleton_count = 10; * load_cnt = 1; * } * if (load_cnt == 1) * { * skeleton_count = Skel4_num(); * } */ skeleton_count += stage_lv * 0.1; GameStart = GameObject.Find("GameStart"); script = GameStart.GetComponent <GameStartText>(); warning_f1 = false; cnt = 0; InvokeRepeating("SpawnObj", 0.1f, interval); //d_016 = GameObject.Find("d_016"); //script2 = d_016.GetComponent<Boss_Endless>(); Endless_f1 = false; }
// Use this for initialization void Start() { obj.SetActive(false); GameStart = GameObject.Find("GameStart"); script = GameStart.GetComponent <GameStartText>(); cnt = 0; }
// Use this for initialization void Start() { GameStart = GameObject.Find("GameStart"); script = GameStart.GetComponent <GameStartText>(); warning_gold = false; cnt = 0; InvokeRepeating("SpawnObj", 0.1f, interval); var2 = Random.Range(0, 3); //d_016 = GameObject.Find("d_016"); //script2 = d_016.GetComponent<Boss_Endless>(); Endless_f_gold = false; }
// Use this for initialization void Start() { Warning = GameObject.Find("Warning"); Max_Range_Lv = GameStartText.Set_Stage_Lv(); //script1 = Warning.GetComponent<Warning3>(); InvokeRepeating("_Bless", 0.1f, interval); time = 0; flash_f = false; Bless.SetActive(false); d_f = Boss_Endless2.Set_dragon_posOK(); //d_016_1 = GameObject.Find("d_016"); //script2 = d_016_1.GetComponent<Boss_Endless>(); }
// Use this for initialization void Start() { Bonus = 0; litlle.SetActive(false); litlle_time = 0; little_f = false; dragon_f = false; nextTime = Time.time; Warning = GameObject.Find("Warning"); script1 = Warning.GetComponent <Warning3>(); Fire.SetActive(false); boss_sound.SetActive(false); sound01 = GetComponent <AudioSource>(); BossObj = GameObject.Find("d_016"); //num = Random.Range(1, 4); boss_sound_play = false; //stage_fade.transform.position = new Vector3(80,2.3f,0); get_num = GameStartText.Set_num(); }
// Use this for initialization void Start() { dragon_pre_Red.SetActive(false); dragon_pre_Green.SetActive(false); dragon_pre_Blue.SetActive(false); dragon_Red.SetActive(false); dragon_Green.SetActive(false); dragon_Blue.SetActive(false); get_num = GameStartText.Set_num(); if (get_num == 0) { dragon_pre_Red.SetActive(true); dragon_Red.SetActive(true); //dragon_pre_Green.SetActive(false); //dragon_pre_Blue.SetActive(false); } if (get_num == 1) { //dragon_pre_Red.SetActive(false); dragon_pre_Green.SetActive(true); dragon_Green.SetActive(true); //dragon_pre_Blue.SetActive(false); } if (get_num == 2) { //dragon_pre_Red.SetActive(false); //dragon_pre_Green.SetActive(false); dragon_pre_Blue.SetActive(true); dragon_Blue.SetActive(true); } time = 0; dragon_preview_f = false; Warning = GameObject.Find("Warning"); script1 = Warning.GetComponent <Warning3>(); }
void Start() { //AdMobManager.instance.RequestBanner(); Scene_name = SceneManager.GetActiveScene().name; PlayerPrefs.SetString("Scene_name", Scene_name); //AdMobManager.instance.RequestBanner(); //このobjectのSpriteRendererを取得 MainSpriteRenderer = gameObject.GetComponent <SpriteRenderer>(); rb2d = GetComponent <Rigidbody2D>(); timer = 0; space_cnt = 0; nextTime = Time.time; AudioSource[] audioSources = GetComponents <AudioSource>(); sound01 = audioSources[0]; sound02 = audioSources[1]; HeartObj1 = GameObject.Find("heart1"); //はじめに消えるハート HeartObj2 = GameObject.Find("heart2"); //2番目に消えるハート HeartObj3 = GameObject.Find("heart3"); //最後に消えるハート HeartObj4 = GameObject.Find("heart4"); //heart1の隣のハート HeartObj5 = GameObject.Find("heart5"); //heart4の隣のハート HeartObj6 = GameObject.Find("heart6"); //heart5の隣のハート //damage_cnt = 0; gauge_check = 0; TiredGauge1.SetActive(false); TiredGauge2.SetActive(false); TiredGauge3.SetActive(false); GameStart = GameObject.Find("GameStart"); script = GameStart.GetComponent <GameStartText>(); comboActive.SetActive(false); comboLabelActive.SetActive(false); combo_f = false; combo_score_f = false; Canvas = GameObject.Find("Canvas"); script2 = Canvas.GetComponent <Combo_Endless>(); TextPlus.SetActive(false); ComboTextPlus.SetActive(false); tired_timer = 0; space_not = false; EXPL1 = GameObject.Find("EXPL1"); //damage_cnt = Move_Endless.getDamage_cnt(); stage_fade = GameObject.Find("stage_fade"); script4 = stage_fade.GetComponent <Stage_Fade_Endless_Next>(); sound03 = audioSources[2]; life = PlayerPrefs.GetInt("Heart", 3); if (life == 3) { HeartObj1.SetActive(true); HeartObj2.SetActive(true); HeartObj3.SetActive(true); } if (life == 2) { HeartObj1.SetActive(false); HeartObj2.SetActive(true); HeartObj3.SetActive(true); } if (life == 1) { HeartObj1.SetActive(false); HeartObj2.SetActive(false); HeartObj3.SetActive(true); } //------超人化--------------- lv = PlayerPrefs.GetInt("lv_6", 1); if (lv >= 1 && lv < 30) { tired_timer_num = 4; } if (lv >= 30 && lv < 60) { tired_timer_num = 3; } if (lv >= 60 && lv < 90) { tired_timer_num = 2; } if (lv >= 90 && lv < 100) { tired_timer_num = 2; } if (lv >= 100) { tired_timer_num = 1; } //------超人化(終わり)--------------- }
void Update() { if (PauseScreen.activeSelf) { SaveLoad.musicVol = MusicVolSlider.GetComponent <Slider>().value; SaveLoad.fXVol = SFXVolSlider.GetComponent <Slider>().value; } Music.GetComponent <AudioSource>().volume = SaveLoad.musicVol; var ppp = ppb.colorGrading.settings; SaveLoad.hueShift += 0.1f; ppp.basic.hueShift = SaveLoad.hueShift; ppb.colorGrading.settings = ppp; if ((!GameStarted) && Input.anyKey) //player has started game { GameStarted = true; GameStartText.SetActive(false); LevelTime = Time.time; } if (GameStarted) { if (Input.GetKeyDown(KeyCode.Escape) && !ResettingScene && PlayerHealth > 0) //pause the game { PauseGame(); } if (Time.timeScale != 0) //game isnt paused { AmmoRegenTimer += Time.deltaTime; //wait for regen to start ShotCDTimer += Time.deltaTime; //shotspeed incrememnt if ((Time.time - LevelTime) >= (50 * OnLevel) + OnLevel && PlayerHealth > 0) //Level Up { LevelUp(); } if (InstructionsUI.transform.position.y < 40 && Time.timeSinceLevelLoad > 8) { InstructionsUI.transform.position += Vector3.up / 50; } if (AmmoRegenTimer > AmmoWait && AmmoCount < MaxAmmo) //start regening ammo { AmmoCount += 1.25f; } UpdateBarUI(); if (PlayerHealth <= 0 && ResettingScene == false) //do the end game ui's { EndGameUI(); } else { if (Input.GetKey(KeyCode.Space)) { Fire(); } if (Input.GetKey(KeyCode.LeftArrow)) { Barrel.transform.GetChild(2).GetComponent <ParticleSystem>().Play(); BarrelRotate(Vector3.forward); } else if (Input.GetKey(KeyCode.RightArrow)) { Barrel.transform.GetChild(1).GetComponent <ParticleSystem>().Play(); BarrelRotate(-Vector3.forward); } else { BarrelMoveSpeed = 100; } } } } }