예제 #1
0
        // ReSharper restore InconsistentNaming

        internal Entity(int id, IComponent[] components)
        {
            Id = id;

            _components = components;
            _sign       = SignBuilder.Create(components);
        }
예제 #2
0
        public void Iteration()
        {
            var components = BuildComponents();
            var sign       = SignBuilder.Create(components);

            var unique = new HashSet <int>();

            foreach (var componentId in sign)
            {
                Assert.True(unique.Add(componentId));
            }

            Assert.Equal(components.Length, unique.Count);
        }