public ActorManager( IPathfindingManager pathfindingManager ) { _pathfindingManager = pathfindingManager; _actors = new List <Actor>(); _idle = new List <Actor>(); }
public void SetUp() { _gate = new AutoResetEvent(false); _callback = new PathfindingCallback(_gate); _manager = new PathfindingManager(); _manager.Started += (_, __) => { _gate.Set(); }; _manager.Start(); _gate.WaitOne(DELAY_MS); }
private bool CheckPathfindingManager() { if (pathfindingManager != null) { return(true); } pathfindingManager = GetComponent <IPathfindingManager>(); return(pathfindingManager != null); }
public void SetUp() { _pathfindingManager = new PathfindingManager(); _pathfindingManager.Start(); _actorManager = new ActorManager(_pathfindingManager); _jobManager = new JobManager(_actorManager, _pathfindingManager, this); _jobManager.Start(); _actor = new Actor(0, 0, Locomotion.Walk); _actorManager.Add(_actor); }
public JobManager( IJobFitProvider jobFitProvider, IPathfindingManager pathfindingManager, IMapProvider mapProvider ) { _mapProvider = mapProvider; _jobFitProvider = jobFitProvider; _jobs = new List <Job> [JobManager.PriorityCount]; for (int i = 0; i < _jobs.Length; i++) { _jobs[i] = new List <Job>(); } _gate = new AutoResetEvent(false); _isRunning = false; _pendingJobs = new ConcurrentQueue <Job>(); _pathfindingManager = pathfindingManager; _foundRoutes = new Route[InitialMaximum]; _fitness = new int[InitialMaximum]; }
public UpdatePathToTargetPositionSystem(IPathfindingManager pathfindingManager, IECSLogger logger) { _pathfindingManager = pathfindingManager; _logger = logger; }
public void Inject(IPathfindingManager currPathfindingManager, PathfindingGrid currGrid) { pathfindingManager = currPathfindingManager; grid = currGrid; }
public void OneTimeSetUp() { _map = new Map(10, 10, DefaultInitializer); _pathfindingManager = new PathfindingManager(); _pathfindingManager.Start(); }