Esempio n. 1
0
        public static Graphic Get(Type graphicClass, string path, Shader shader, Vector2 drawSize, Color color, Color colorTwo, GraphicData data)
        {
            GraphicRequest graphicRequest = new GraphicRequest(graphicClass, path, shader, drawSize, color, colorTwo, data, 0);

            if (graphicRequest.graphicClass == typeof(Graphic_Single))
            {
                return(GraphicDatabase.GetInner <Graphic_Single>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Terrain))
            {
                return(GraphicDatabase.GetInner <Graphic_Terrain>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Multi))
            {
                return(GraphicDatabase.GetInner <Graphic_Multi>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Mote))
            {
                return(GraphicDatabase.GetInner <Graphic_Mote>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Random))
            {
                return(GraphicDatabase.GetInner <Graphic_Random>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Flicker))
            {
                return(GraphicDatabase.GetInner <Graphic_Flicker>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_Appearances))
            {
                return(GraphicDatabase.GetInner <Graphic_Appearances>(graphicRequest));
            }
            if (graphicRequest.graphicClass == typeof(Graphic_StackCount))
            {
                return(GraphicDatabase.GetInner <Graphic_StackCount>(graphicRequest));
            }
            try
            {
                return((Graphic)GenGeneric.InvokeStaticGenericMethod(typeof(GraphicDatabase), graphicRequest.graphicClass, "GetInner", new object[]
                {
                    graphicRequest
                }));
            }
            catch (Exception ex)
            {
                Log.Error(string.Concat(new object[]
                {
                    "Exception getting ",
                    graphicClass,
                    " at ",
                    path,
                    ": ",
                    ex.ToString()
                }));
            }
            return(BaseContent.BadGraphic);
        }
Esempio n. 2
0
        public static Graphic Get <T>(string path, Shader shader, Vector2 drawSize, Color color, int renderQueue) where T : Graphic, new()
        {
            GraphicRequest req = new GraphicRequest(typeof(T), path, shader, drawSize, color, Color.white, null, renderQueue);

            return(GraphicDatabase.GetInner <T>(req));
        }
Esempio n. 3
0
        public static Graphic Get <T>(string path, Shader shader, Vector2 drawSize, Color color, Color colorTwo, GraphicData data) where T : Graphic, new()
        {
            GraphicRequest req = new GraphicRequest(typeof(T), path, shader, drawSize, color, colorTwo, data, 0);

            return(GraphicDatabase.GetInner <T>(req));
        }
Esempio n. 4
0
        public static Graphic Get <T>(string path, Shader shader) where T : Graphic, new()
        {
            GraphicRequest req = new GraphicRequest(typeof(T), path, shader, Vector2.one, Color.white, Color.white, null, 0);

            return(GraphicDatabase.GetInner <T>(req));
        }