public void StartButton() { if (!playGame) { timeScript.TimeReset(); timeScript.StartTime(); instancePlayer.StartGame(); startPoint.SetStart(); } else { timeScript.TimeReset(); instancePlayer.StopGame(); timeScript.StartTime(); instancePlayer.StartGame(); startPoint.SetStart(); } playGame = true; }