예제 #1
0
        public IEnumerator ShortTermMemoryCommitWithCooldown()
        {
            SetupMemory();

            // Add the three short term memories destined to stay in short term
            controller.AddMemory(shortTermMemory);
            Assert.AreEqual(1, controller.GetShortTermMemories().Length, "The first short term memory item was not committed to memory.");

            controller.AddMemory(shortTermMemory);
            Assert.AreEqual(1, controller.GetShortTermMemories().Length, "The second short term memory item should not have been committed as it is a duplicate of an existing short term memory.");
            Assert.AreEqual(10, controller.GetSimilarShortTermMemory(shortTermMemory).influence);

            yield return(null);
        }