Esempio n. 1
0
        public static TriColorGraphic Get(
            System.Type graphicClass,
            string path,
            Shader shader,
            Vector2 drawSize,
            Color color,
            Color colorTwo,
            Color colorThree,
            GraphicData data,
            List <ShaderParameter> shaderParameters)
        {
            TriColorGraphicRequest req = new TriColorGraphicRequest(graphicClass, path, shader, drawSize, color, colorTwo, colorThree, data, 0, shaderParameters);

            if (req.graphicClass == typeof(Graphic_Multi))
            {
                return((TriColorGraphic)TriColorGraphicDatabase.GetInner <TriColorGraphic_Multi>(req));
            }
            try
            {
                return((TriColorGraphic)GenGeneric.InvokeStaticGenericMethod(typeof(TriColorGraphicDatabase), req.graphicClass, "GetInner", (object)req));
            }
            catch (Exception ex)
            {
                Log.Error("Exception getting " + (object)graphicClass + " at " + path + ": " + ex.ToString(), false);
            }
            return((TriColorGraphic)BaseContent.BadGraphic);
        }
Esempio n. 2
0
 public override TriColorGraphic GetColoredVersion(
     Shader newShader,
     Color newColor,
     Color newColorTwo,
     Color newColorThree)
 {
     return(TriColorGraphicDatabase.Get <TriColorGraphic_Multi>(this.path, newShader, this.drawSize, newColor, newColorTwo, newColorThree, this.data));
 }
Esempio n. 3
0
 public virtual TriColorGraphic GetCopy(Vector2 newDrawSize)
 {
     return(TriColorGraphicDatabase.Get(this.GetType(),
                                        this.path,
                                        this.Shader,
                                        newDrawSize,
                                        this.color,
                                        this.colorTwo,
                                        this.colorThree));
 }
Esempio n. 4
0
 public static TriColorGraphic Get(
     System.Type graphicClass,
     string path,
     Shader shader,
     Vector2 drawSize,
     Color color,
     Color colorTwo,
     Color colorThree)
 {
     return(TriColorGraphicDatabase.Get(graphicClass, path, shader, drawSize, color, colorTwo, colorThree, (GraphicData)null, (List <ShaderParameter>)null));
 }
Esempio n. 5
0
 /*
  * public static AvaliGraphic Get<T>(string path) where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, ShaderDatabase.Cutout, Vector2.one, Color.white, Color.white, Color.white, (GraphicData)null, 0, (List<ShaderParameter>)null));
  * }
  *
  * public static AvaliGraphic Get<T>(string path, Shader shader) where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, shader, Vector2.one, Color.white, Color.white, Color.white, (GraphicData)null, 0, (List<ShaderParameter>)null));
  * }
  *
  * public static AvaliGraphic Get<T>(string path, Shader shader, Vector2 drawSize, Color color) where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, shader, drawSize, color, Color.white, Color.white, (GraphicData)null, 0, (List<ShaderParameter>)null));
  * }
  *
  * public static AvaliGraphic Get<T>(
  * string path,
  * Shader shader,
  * Vector2 drawSize,
  * Color color,
  * int renderQueue)
  * where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, shader, drawSize, color, Color.white, Color.white, (GraphicData)null, renderQueue, (List<ShaderParameter>)null));
  * }
  *
  * public static AvaliGraphic Get<T>(
  * string path,
  * Shader shader,
  * Vector2 drawSize,
  * Color color,
  * Color colorTwo,
  * Color colorThree)
  * where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, shader, drawSize, color, colorTwo, colorThree, (GraphicData)null, 0, (List<ShaderParameter>)null));
  * }
  * public static AvaliGraphic Get<T>(
  * string path,
  * Shader shader,
  * Vector2 drawSize,
  * Color color,
  * Color colorTwo)
  * where T : AvaliGraphic, new()
  * {
  *  return (AvaliGraphic)AvaliGraphicDatabase.GetInner<T>(new AvaliGraphicRequest(typeof(T), path, shader, drawSize, color, colorTwo, Color.white, (GraphicData)null, 0, (List<ShaderParameter>)null));
  * }
  */
 public static TriColorGraphic Get <T>(
     string path,
     Shader shader,
     Vector2 drawSize,
     Color color,
     Color colorTwo,
     Color colorThree,
     GraphicData data)
     where T : TriColorGraphic, new()
 {
     return((TriColorGraphic)TriColorGraphicDatabase.GetInner <T>(new TriColorGraphicRequest(typeof(T), path, shader, drawSize, color, colorTwo, colorThree, data, 0, (List <ShaderParameter>)null)));
 }
Esempio n. 6
0
 public Graphic GetNakedGraphic(BodyTypeDef bodyType, Shader shader, Color skinColor, Color skinColorSecond, Color skinColorThird, string userpath, string gender) =>
 TriColorGraphicDatabase.Get(typeof(Graphic_Multi), GetNakedPath(bodyType, userpath, this.useGenderedBodies ? gender : ""), shader, Vector2.one,
                             skinColor, skinColorSecond, skinColorThird, data: null, shaderParameters: null);