public void DebugPrint <Comp>( EcDictDelta <Comp> ecDictDelta ) where Comp : Ecs.INetComponent <Comp>, new() { Console.WriteLine(" To add:"); foreach (KeyValuePair <Ecs.Entity, Comp> pair in ecDictDelta.toAdd) { Ecs.Entity entity = pair.Key; Comp comp = pair.Value; Console.WriteLine(" Entity ID: {0}", entity.id); Console.WriteLine(" Component: {0}", comp); } Console.WriteLine(" To update:"); foreach (KeyValuePair <Ecs.Entity, Comp> pair in ecDictDelta.toUpdate) { Ecs.Entity entity = pair.Key; Comp comp = pair.Value; Console.WriteLine(" Entity ID: {0}", entity.id); Console.WriteLine(" Component: {0}", comp); } Console.WriteLine(" To remove:"); foreach (Ecs.Entity entity in ecDictDelta.toRemove) { Console.WriteLine(" Entity ID: {0}", entity.id); } }
public void DebugPrint <Comp>( EcDict <Comp> ecDict ) where Comp : Ecs.INetComponent <Comp>, new() { foreach (KeyValuePair <Ecs.Entity, Comp> pair in ecDict.data) { Ecs.Entity entity = pair.Key; Comp comp = pair.Value; Console.WriteLine(" Entity ID: {0}", entity.id); Console.WriteLine(" Component: {0}", comp); } }