Example #1
0
        public void Init()
        {
            _inputWorker = WorkerManager.Get <PlayerInputWorker>();

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

            _listenToPlayerInput = true;
        }
Example #2
0
        // public static WorkerManager Instance => _instance;

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

            wagon.Init();
        }