예제 #1
0
 public override void reloadSprite()
 {
     if (Sprite == null)
     {
         Sprite = new AnimatedSprite(ModEntry.Config.DinoTexture);
     }
     else
     {
         Sprite.textureName.Value = ModEntry.Config.DinoTexture;
     }
     if (ModEntry.Config.DinoColorType.ToLower() != "default")
     {
         Sprite.spriteTexture = FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor);
     }
     Sprite.SpriteWidth  = 32;
     Sprite.SpriteHeight = 32;
     Sprite.UpdateSourceRect();
     HideShadow = true;
 }
예제 #2
0
 public override void reloadSprite()
 {
     if (this.Sprite == null)
     {
         this.Sprite = new AnimatedSprite(ModEntry.Config.DinoTexture);
     }
     else
     {
         this.Sprite.textureName.Value = ModEntry.Config.DinoTexture;
     }
     if (ModEntry.Config.DinoColorType.ToLower() != "default")
     {
         typeof(AnimatedSprite).GetField("spriteTexture", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(Sprite, FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor));
     }
     this.Sprite.SpriteWidth  = 32;
     this.Sprite.SpriteHeight = 32;
     this.Sprite.UpdateSourceRect();
     base.HideShadow = true;
 }