Пример #1
0
        public void OnDestroyInvokedWhenEntityDestroyed()
        {
            _defaultEntity.OnDestroyEntity += entity => _didDispatch += 1;
            _defaultEntity.Destroy();

            Assert.AreEqual(1, _didDispatch);
        }
Пример #2
0
        public void ValidateThatDestroyedEntityIsRemovedFromGroup()
        {
            SetupGroupEntities();

            var g = _defaultContext.GetGroup(matcherAB);

            eAB1.Destroy();

            Assert.IsFalse(g.GetEntities().Contains(eAB1));
        }