Exemple #1
0
 private static void ExecuteForGroup(IEnumerable <IEntity> entities, SpriteBatchSystem castSystem)
 {
     foreach (var entity in entities)
     {
         castSystem.Process(entity);
     }
 }
        public static int GetRenderTexture2dId(this SpriteBatchSystem system)
        {
            var possibleAttributes = system.GetType()
                                     .GetCustomAttributes(typeof(ToRenderTexture2dAttribute), true);

            if (!possibleAttributes.Any())
            {
                return(-1);
            }

            var attribute = (ToRenderTexture2dAttribute)possibleAttributes.First();

            return(attribute.RenderTextureId);
        }