Пример #1
0
        public void GetComponentsForEntityDebugger()
        {
            var           entityWithComponent = new Entity2D(Rectangle.HalfCentered);
            List <object> components          = entityWithComponent.GetComponentsForEditing();

            Assert.AreEqual(5, components.Count);
            Assert.AreEqual(Rectangle.HalfCentered, GetComponent <Rectangle>(components));
            Assert.IsTrue(GetComponent <bool>(components));
        }
Пример #2
0
 protected void Reset()
 {
     row = 0;
     scene.Clear();
     componentControls.Clear();
     componentList = entity.GetComponentsForEditing();
     foreach (object component in componentList)
     {
         AddComponentToScene(component);
     }
 }