Ejemplo n.º 1
0
        public void CanDefineAPostUpdateHook()
        {
            bool hookCalled = false;
            Action <IdleEngine, float, object> hook = (engine, deltaTime, newValue) =>
            {
                hookCalled = true;
            };
            ValueReference reference = new ValueReferenceDefinitionBuilder()
                                       .WithPostUpdateHook(hook)
                                       .Build().CreateValueReference(engine);

            reference.Update(engine, 0);

            Assert.IsTrue(hookCalled);
        }