public void GameOverCameraTest_Rect() { Rect test = GameOverCamera.CreateCenteredRect(100.0f, 100.0f); Assert.AreEqual(test.width, 100); Assert.AreEqual(test.height, 100); }
// Update is called once per frame void Update() { //Debug.Log(Time.time + ": Flag :" +SinarioFlag); Vector3 Ppos = Player.transform.position; if (SinarioFlag == 0) { StartCamera.SetActive(true); OtherCamara.SetActive(false); ControllText.SetActive(false); //Trajectory.GetComponent<Material>().color = new Color(1.0f, 1.0f, 1.0f, 0.0f); } if (SinarioFlag == 1) { //audioSource.Play(); audioSource.SetActive(true); StartCamera.SetActive(false); OtherCamara.SetActive(true); ControllText.SetActive(true); Player.gameObject.GetComponent <UnityChanControlScriptWithRgidBody>().enabled = true; if (Input.GetKey(KeyCode.UpArrow) || Input.GetKey(KeyCode.W)) { Text.SetActive(false); } if (atari.AtariFlag == 1) { Notification.SetActive(true); } } else { Notification.SetActive(false); } if (SinarioFlag == 2) { Invoke("StopShake", 10); } if (SinarioFlag == 3) { if (Input.GetKeyUp(KeyCode.UpArrow)) { if (ShakeCount <= 2) { ShakeCount = 1; Debug.Log("ShakeCount : " + ShakeCount); } } if (Input.GetKey(KeyCode.LeftArrow) || Input.GetKey(KeyCode.RightArrow)) { if (ShakeCount == 0) { ShakeCount = 2; Debug.Log("ShakeCount : " + ShakeCount); } } if (Input.GetKey(KeyCode.C)) { ShakeCount = 3; Debug.Log("ShakeCount : " + ShakeCount); } } if (SinarioFlag == 4) { Debug.Log("シナリオ4です。"); } if (SinarioFlag == 5) { Player.gameObject.GetComponent <UnityChanControlScriptWithRgidBody>().enabled = false; OtherCamara.SetActive(false); GameOverCamera.SetActive(false); ResultCamera.SetActive(true); audioSource.SetActive(false); if (HinanCount.AreaCount == 1) { FinishButton.SetActive(true); } if (HighHinan.HighHinanCount == 1) { FinishButton2.SetActive(true); } if (Camerachanger.ChangerCount == 0) { ResultText1.SetActive(false); ResultText2.SetActive(true); } else if (Camerachanger.ChangerCount == 1) { ResultText1.SetActive(true); ResultText2.SetActive(false); } //Wave.GetComponent<WaveController>().enabled = false; //Trajectory.GetComponent<Material>().color = new Color(1.0f, 1.0f, 1.0f, 1.0f); //Trajectory.SetActive(true); } if (SinarioFlag == 6) { Start(); } if (SinarioFlag == 1 || SinarioFlag == 2 || SinarioFlag == 3 || SinarioFlag == 4) { if (MapDisplayFlag == 0) { if (Input.GetKeyDown(KeyCode.M)) { MapDisplay.SetActive(true); MapDisplayFlag = 1; Debug.Log("Mapを表示"); if (SinarioFlag == 3) { HinanArea.SetActive(true); } } } else { if (Input.GetKeyDown(KeyCode.M)) { MapDisplay.SetActive(false); MapDisplayFlag = 0; Debug.Log("Mapを非表示"); if (SinarioFlag == 3) { HinanArea.SetActive(false); } } } } }