Exemple #1
0
        public void Start_AlreadyStarted_NoEffect()
        {
            using var gate = new AutoResetEvent(false);
            IPathfindingManager manager = new PathfindingManager();
            int startCount = 0;

            manager.Started += (_, __) => {
                startCount += 1;
                gate.Set();
            };
            manager.Start();
            gate.WaitOne(DELAY_MS);

            manager.Start();
            gate.WaitOne(DELAY_MS);

            manager.Stop();

            Assert.That(startCount, Is.EqualTo(1));
        }
Exemple #2
0
 public void Awake()
 {
     Instance = this;
     PathfindingManager.Start();
 }