void Init() { init = false; GroundController groundController = ground.GetComponent <GroundController>(); groundController.Init(); groundController.StartGeneration(); }
// Use this for initialization void Start() { gameState = GameState.PreGame; // Make the GroundController GameObject tmp = (GameObject)Instantiate(p_groundController, new Vector3(0, 0, 0), transform.rotation); groundController = tmp.GetComponent <GroundController>(); groundController.Init(this); }
private void Start() { gameManager = GameManager.Instance; gameManager.GameEnd += ReloadScene; carController.Init(gameManager.Car, carSettings); groundController.Init(groundSettings, carController); uiController.Init(gameManager.Car); StartGame(); }