// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.A)) { ScoreInfo.HitUfo(); } else if (Input.GetKeyDown(KeyCode.S)) { ScoreInfo.HitMeteorSmall(); } else if (Input.GetKeyDown(KeyCode.D)) { ScoreInfo.HitMeteorNormal(); } else if (Input.GetKeyDown(KeyCode.F)) { ScoreInfo.HitMeteorBig(); } else if (Input.GetKeyDown(KeyCode.G)) { ScoreInfo.HitMars(); } else if (Input.GetKeyDown(KeyCode.Q)) { //セーブ //Debug.ClearDeveloperConsole(); //ハイスコアを確認して、今の点数が今までのハイスコア5つと比べて何番目かを確認している ScoreInfo.AddToHighScores(); //Debug.Log(ScoreInfo.GetTotalScore()); nameCount++; //スコアを新しく作る ScoreInfo.Score = new Score(); //気にしない ScoreInfo.Score.Name = "Name " + nameCount; } //else if (Input.GetKeyDown(KeyCode.W)) //{ // ScoreInfo.SortScoreDescending(); //} }
void OnTriggerEnter(Collider collider) { // メテオ同士か顔に当たったらメテオをリスポーン if (collider.gameObject.tag == "Meteo") { EffectManager.Instance.PlayEffect("explosion", transform.position, Quaternion.identity); SoundManeger.Instance.isPlayMeteoHitToMeteoSe = true; Kill(); } else if (collider.gameObject.tag == "Face") { Kill(); } else if (collider.gameObject.tag == "Missile") { ScoreInfo.HitMeteorNormal(); Kill(); } }
void OnTriggerEnter(Collider collider) { // メテオ同士か顔に当たったらメテオをリスポーン if (collider.gameObject.tag == "Meteo" && isOnCamera) { EffectManager.Instance.PlayEffect("explosion", this.transform.position, Quaternion.identity); SoundManeger.Instance.isPlayMeteoHitToMeteoSe = true; ReSpawn(); } else if (collider.gameObject.tag == "Face") { ReSpawn(); } else if (collider.gameObject.tag == "Missile") { TargetReset.Instance.Reset(); ScoreInfo.HitMeteorNormal(); ReSpawn(); } }