Example #1
0
        // ReSharper restore InconsistentNaming

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

            _components = components;
            _sign       = SignBuilder.Create(components);
        }
Example #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);
        }