Exemplo n.º 1
0
    void Init()
    {
        init = false;

        GroundController groundController = ground.GetComponent <GroundController>();

        groundController.Init();
        groundController.StartGeneration();
    }
Exemplo n.º 2
0
    // 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);
    }
Exemplo n.º 3
0
        private void Start()
        {
            gameManager = GameManager.Instance;

            gameManager.GameEnd += ReloadScene;

            carController.Init(gameManager.Car, carSettings);
            groundController.Init(groundSettings, carController);
            uiController.Init(gameManager.Car);

            StartGame();
        }