public void ChangeCamera() { MainCamera.SetActive(!MainCamera.activeSelf); SubCamera.SetActive(!SubCamera.activeSelf); this.gameObject.SetActive(false); Cannons.transform.Find("Cannon6Arc").gameObject.SetActive(true); Cannons.transform.Find("CannonMng").gameObject.SetActive(true); OnCursors(); _slider_Background.gameObject.SetActive(true); _slider_Fillarea.gameObject.SetActive(true); _sliderText1.gameObject.SetActive(true); _sliderText2.gameObject.SetActive(true); _slider_Handle.gameObject.SetActive(true); FadeController.Begin(FadeObj.gameObject, true, Rate); if (S_timer == null) { S_timer = GameObject.FindObjectOfType <StartTimer>(); S_timer.On_TimeStartFlg(); } else { S_timer.On_TimeStartFlg(); } FadeObj.m_onFinished -= ChangeCamera; }
// Update is called once per frame void Update() { if (!VanishGroundFlg) { VanishGround.OnVanish(); VanishParent1.OnVanish(); VanishParent2.OnVanish(); VanishParent3.OnVanish(); VanishGroundFlg = true; } if (Count < 110) { this.transform.position -= new Vector3(Speed * Time.deltaTime, 0.0f, 0.0f); //this.transform.Rotate(0, Speed * Time.deltaTime, 0); Count += Speed * Time.deltaTime; } else if (!FadeObj.IsFade && FadeFlg == false) //フェードイン { FadeObj.gameObject.SetActive(true); FadeController.Begin(FadeObj.gameObject, false, Rate); FadeFlg = true; FadeObj.m_onFinished += ChangeCamera; } this.transform.LookAt(LookTarget.transform); }
// Update is called once per frame void Update() { if (Count < 270) { this.transform.Rotate(0, Speed * Time.deltaTime, 0); Count += Speed * Time.deltaTime; } else if (!FadeObj.IsFade && FadeFlg == false) //フェードイン { FadeObj.gameObject.SetActive(true); FadeController.Begin(FadeObj.gameObject, false, Rate); FadeFlg = true; FadeObj.m_onFinished += ChangeCamera; } }
// Update is called once per frame void Update() { if (!Fireballflg) { clone = Instantiate(fireball, new Vector3(0.0f, 100.0f, 0.0f), Quaternion.identity); Instantiate(fireball, new Vector3(15.0f, 120.0f, -15.0f), Quaternion.identity); Instantiate(fireball, new Vector3(-15.0f, 140.0f, -15.0f), Quaternion.identity); Fireballflg = true; } if (clone == null) { Destroy(clone); } if (lifeTime < 0.0f) { transform.position = savePosition; lifeTime = 0.0f; } if (lifeTime > 0.0f) { lifeTime -= Time.deltaTime; float x_val = Random.Range(lowRangeX, maxRangeX); float y_val = Random.Range(lowRangeY, maxRangeY); transform.position = new Vector3(x_val, y_val, transform.position.z); } if (Count < 90) { CatchShake(); //this.transform.Rotate(-5 * Time.deltaTime, 0, 0); Count += Speed * Time.deltaTime; } else if (!FadeObj.IsFade && FadeFlg == false) //フェードイン { Destroy(clone); FadeObj.gameObject.SetActive(true); FadeController.Begin(FadeObj.gameObject, false, Rate); FadeFlg = true; FadeObj.m_onFinished += ChangeCamera; } if (clone != null) { this.transform.LookAt(clone.transform); } }