Beispiel #1
0
        public void CoroutineService_WaitForNumTicksAsync_ReturnTaskThatCompletesAfterNumTicks()
        {
            var coroutineService = new CoroutineService();

            Task task = coroutineService.WaitForNumTicksAsync(2);

            coroutineService.TickCoroutines();

            Assert.IsFalse(task.IsCompleted, "Task completed too early");

            coroutineService.TickCoroutines();

            Assert.IsTrue(task.IsCompleted, "Task did not complete");
        }