void HitDetect(ShootController s) { State state; var hitPoint = GetState(out state); score += ((int)state + 1) * scoreMultiplier; OnUpdateScore(score); if (hitPoint != null) { if (lastState == State.PERFECT && state == State.PERFECT) { combo++; OnCombo(combo); } else { combo = 0; } lastState = state; // Debug.Log("Hit" + state); s.FixPosition(hitPoint.obj); hitPoint.Hit(); if (hitPoint.coin) { GetCoin(lastState == State.PERFECT? 2 : 1); } if (pointAngles.TrueForAll(x => x.hit)) { Win(); // return; } // MoveOnNext(); // state = State.BAD; } else { Debug.LogError("NINGGG"); state = State.BAD; s.GravityOff(); GameOver(); } OnStateCheck((int)state); UpdateHighscore(score); }