/********* ** Public methods *********/ /// <summary>The mod entry point, called after the mod is first loaded.</summary> /// <param name="helper">Provides simplified APIs for writing mods.</param> public override void Entry(IModHelper helper) { this.Config = helper.ReadConfig <HealthBarConfig>(); if (this.Config.ColourScheme < 0) { this.Config.ColourScheme = 0; } if (this.Config.ColourScheme >= this.ColorSchemes.Length) { this.Config.ColourScheme = this.ColorSchemes.Length - 1; } this.Helper.Events.Display.Rendered += this.GraphicsEvents_DrawTick; }
public override void Entry(params object[] objects) { ModConfig = new HealthBarConfig().InitializeConfig(BaseConfigPath); if (ModConfig.ColourScheme < 0) { ModConfig.ColourScheme = 0; } if (ModConfig.ColourScheme >= ColourSchemes.Length) { ModConfig.ColourScheme = ColourSchemes.Length - 1; } GraphicsEvents.DrawTick += drawTickEvent; whitePixel = null; }