public override void reloadSprite() { if (Sprite == null) { Sprite = new AnimatedSprite(ModEntry.Config.DustTexture); } else { Sprite.textureName.Value = ModEntry.Config.DustTexture; } if (ModEntry.Config.DustColorType.ToLower() != "default") { Sprite.spriteTexture = FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor); } }
public override void reloadSprite() { ModEntry.SMonitor.Log($"reloading bat familiar sprite for {Name} {ModEntry.Config.BatTexture}"); if (Sprite == null) { ModEntry.SMonitor.Log($"creating new sprite"); Sprite = new AnimatedSprite(ModEntry.Config.BatTexture); } else { ModEntry.SMonitor.Log($"updating sprite texture"); Sprite.textureName.Value = ModEntry.Config.BatTexture; } if (ModEntry.Config.BatColorType.ToLower() != "default") { Sprite.spriteTexture = FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor); } HideShadow = true; }
public override void reloadSprite() { ModEntry.SMonitor.Log($"reloading bat familiar sprite for {Name} {ModEntry.Config.BatTexture}"); if (this.Sprite == null) { ModEntry.SMonitor.Log($"creating new sprite"); this.Sprite = new AnimatedSprite(ModEntry.Config.BatTexture); } else { ModEntry.SMonitor.Log($"updating sprite texture"); this.Sprite.textureName.Value = ModEntry.Config.BatTexture; } if (ModEntry.Config.BatColorType.ToLower() != "default") { typeof(AnimatedSprite).GetField("spriteTexture", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(Sprite, FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor)); } base.HideShadow = true; }
public override void reloadSprite() { if (Sprite == null) { Sprite = new AnimatedSprite(ModEntry.Config.ButterflyTexture, baseFrame, 16, 16); } else { Sprite.textureName.Value = ModEntry.Config.ButterflyTexture; } if (ModEntry.Config.DustColorType.ToLower() != "default") { typeof(AnimatedSprite).GetField("spriteTexture", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(Sprite, FamiliarsUtils.ColorFamiliar(Sprite.Texture, mainColor, redColor, greenColor, blueColor)); } }