//This is the method for start the game private void StartGame() { //initialize score text and amount scoreText.text = "Score"; scoreAmount = 0f; pointIncreasedPerSecond = 1f; //if the game state is Stop, start the game //set game state and hide buttons and title gameState = GameState.Start; GameStart = true; //prevent from rotating player.rigidBody.freezeRotation = true; //start run player.Run(); }