//実行すると繰り返される void Update() { if (_isPlaying) { CheckNextNotes(); _score += combo * 10; scoreText.text = _score.ToString(); if (score <= 0) { SceneManager.LoadScene("GameOver"); } else if (score > 20) { _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "10,200,10,10"); } else if (score <= 20 && score > 10) { _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "0,0,0,400"); } else if (score < 10) { _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "200,10,10,10"); } } if (!_audioSource.isPlaying && _isPlaying == true) { StartCoroutine(WaitAndGo()); SceneManager.LoadScene("GameClear"); } }
public void RLoad() { _LightWriter = GameObject.Find("LightWriter").GetComponent <LightWriter>(); _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "500,500,500,500"); SceneManager.LoadScene("Choose Music"); //Debug.Log("aaa"); }
// Update is called once per frame void Update() { if (transform.position.z > 2 || transform.position.z < -2) { _LightWriter = GameObject.Find("LightWriter").GetComponent <LightWriter>(); _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "500,500,500,500"); Debug.Log("mmm"); SceneManager.LoadScene("Choose Music"); } }
//ゲームを取り込んだり初期設定を行う void Start() { _audioSource = GameObject.Find("GameMusic").GetComponent <AudioSource>(); _slider = GameObject.Find("HP").GetComponent <Slider>(); _slideryellow = GameObject.Find("HPYellow").GetComponent <Slider>(); _sliderred = GameObject.Find("HPRed").GetComponent <Slider>(); _LightWriter = GameObject.Find("LightWriter").GetComponent <LightWriter>(); _slider.value = 0; _timing = new float[1024]; _lineNum = new int[1024]; _score = 0; maxcombo = 0; _LightWriter.WriteCSV("Assets/Resources/Light/Color.txt", "500,500,500,500"); LoadCSV(); }