Ejemplo n.º 1
0
        void Start()
        {
            _mainCamera           = Camera.main;
            _rigidbody            = GetComponent <Rigidbody>();
            _rigidbody.useGravity = false;

            _sceneLoadingHandler = FindObjectOfType <SceneLoadingHandler>();
            _sceneLoadingHandler.SceneStartEvent += EnableGravity;

            _defaultRotation = transform.rotation;
        }
Ejemplo n.º 2
0
        void Start()
        {
            InputTracking.Recenter();

            _sceneLoadingHandler = FindObjectOfType <SceneLoadingHandler>();
            _sceneLoadingHandler.SceneStartEvent += StartGame;

            SpawnTrackBlock(_trackBlocksEasy, 0, Vector3.zero);
            SpawnTrackBlock(_trackBlocksEasy, 0, new Vector3(0, 0, BlockLength));
            SpawnTrackBlock(_trackBlocksEasy, 0, new Vector3(0, 0, 2 * BlockLength));
            SpawnTrackBlock(_trackBlocksEasy, 0, new Vector3(0, 0, 3 * BlockLength));
        }