public void Show(BallMonitor ball, bool isSuccess) { QUI.Show(this.gameObject); QUI.Hide(gameUI); if (isSuccess) { detail.text = $"{ball}"; QUI.SetText("Title", "Moon Run!"); QUI.SetButton("Restart", "Next Level", () => { MoonShot.NextLevel(); Hide(); MoonShot.Reset(); }); } else { detail.text = $"{ball}"; QUI.SetText("Title", "Moon Out!"); QUI.SetButton("Restart", "Retry", () => { Hide(); MoonShot.Reset(); }); } //FURTHER TODO: moon foul Debug.Log($"result {ball}"); ball.Reset(); }
public static void ShowResultSuccess() { BallMonitor ball = FindObjectsOfType <BallMonitor> () [0]; DisableBat(); FindObjectsOfType <MoonShotResultUI> () [0].Show(ball, true); GameObject.Find("Firework").GetComponent <ParticleSystem> ().Play(); }
public static void ThrowBall() { BallMonitor ball = FindObjectsOfType <BallMonitor> () [0]; ball.ThrowBall(); }
public static void ShowResultFailed(BallMonitor ball) { DisableBat(); FindObjectsOfType <MoonShotResultUI> () [0].Show(ball, false); }
public StopState(BallMonitor ball) : base(ball) { Debug.Log($"Ball is stopped!"); state = BallState.Stop; MoonShot.ShowResultFailed(ball); }
public HitState(BallMonitor ball) : base(ball) { state = BallState.Hit; }
public PitchState(BallMonitor ball) : base(ball) { state = BallState.Pitch; //ball.ThrowBall (); }
public State(BallMonitor ball) { this.ball = ball; }