void OnTriggerEnter(Collider other) { if (other.tag == "Player") { var PlayerController = other.GetComponent("PlayerController") as PlayerController; if (!PlayerController.HitGoalPole) { RuleObject = GameObject.Find("GameRule"); Rule = RuleObject.GetComponent("GameRule") as GameRule; Rule.AddScore(GoleScore); } PlayerController.HitGoalPole = true; } }
// プレイヤーのパワーアップ public void PlayerPawerUp() { // 現在の状態によってパワーアップ switch (State) { case PLAYER_STATE.PLAYER_NORMAL: State = PLAYER_STATE.PLAYER_SUPER; break; case PLAYER_STATE.PLAYER_SUPER: State = PLAYER_STATE.PLAYER_FIRE; break; case PLAYER_STATE.PLAYER_FIRE: rule.AddScore(500); break; default: break; } // プレイヤーパワーアップSEの再生 PlayerSE.PlayerSEPlay(PlayerSEManager.PLAYER_SE_LABEL.PLAYER_SE_PAWER_UP); SetState(State); }