コード例 #1
0
ファイル: EntityManager.cs プロジェクト: deccer/Xacor
        internal void AddComponent <T>(Entity entity, IComponent component) where T : IComponent
        {
            Debug.Assert(entity != null, "Entity must not be null.");
            Debug.Assert(component != null, "Component must not be null.");

            var type = ComponentTypeManager.GetTypeFor <T>();

            AddComponent(entity, component, type);
        }
コード例 #2
0
ファイル: Aspect.cs プロジェクト: deccer/Xacor
 private static void AppendTypes(StringBuilder builder, string headerMessage, BigInteger typeBits)
 {
     if (typeBits != 0)
     {
         builder.AppendLine(headerMessage);
         foreach (var type in ComponentTypeManager.GetTypesFromBits(typeBits))
         {
             builder.Append(", ");
             builder.AppendLine(type.Name);
         }
     }
 }