Ejemplo n.º 1
0
        public void Init()
        {
            _inputWorker = WorkerManager.Get <PlayerInputWorker>();

            _tr.position            = pathCreator.path.GetPointAtTime(positionOnPathAtStart);
            _currentDistanceOnTrack = pathCreator.path.GetClosestDistanceAlongPath(_tr.position);

            _listenToPlayerInput = true;
        }
Ejemplo n.º 2
0
        // public static WorkerManager Instance => _instance;

        private void Awake()
        {
            DontDestroyOnLoad(gameObject);
            if (_instance != null && _instance != this)
            {
                Destroy(this.gameObject);
            }
            else
            {
                _instance = this;
            }
        }
Ejemplo n.º 3
0
        private void Start()
        {
            WorkerManager.Get <PlayerInputWorker>().EnableActions();

            wagon.Init();
        }