void AddScore() { //ランク倍率 if (Enemycontroller.EnemyHpRank <= 1) { scoreRank = 1f; } else { scoreRank = Mathf.Floor(Enemycontroller.EnemyHpRank); } if (Conboscript.current.Combo <= 29) { Combonew = Conboscript.current.Combo; } else { Combonew = 30; } //素点 × コンボ数 × ランク = スコア if (this.gameObject.tag == "Enemy/Type1") { float scoretype1 = 10f * Combonew * scoreRank; scorescript.AddScore(scoretype1); } if (this.gameObject.tag == "Enemy/Type2" || this.gameObject.tag == "Enemy/Type3") { float scoretype2 = 50f * Combonew * scoreRank; scorescript.AddScore(scoretype2); } if (this.gameObject.tag == "Enemy/Mid") { float scoretype2 = 500f * Combonew * scoreRank; scorescript.AddScore(scoretype2); } }
void ItemSpawn() { switch (itemint) { case 0: opObj.SetActive(true); opObj.transform.position = transform.position; opObj.transform.rotation = transform.rotation; itemint++; break; case 1: opObj1.SetActive(true); opObj1.transform.position = transform.position; opObj1.transform.rotation = transform.rotation; itemint++; break; default: scorescript.AddScore(5000f); break; } }