Ejemplo n.º 1
0
 /// <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)
 {
     ModConfig = Helper.ReadConfig <SummitConfig>();
     helper.Events.GameLoop.GameLaunched += OnLaunched;
     helper.Events.GameLoop.UpdateTicked += OnUpdateTicked;
     helper.Events.Display.RenderingHud  += OnRenderingHudEvent;
 }
Ejemplo n.º 2
0
        private void OnLaunched(object sender, GameLaunchedEventArgs e)
        {
            var api = Helper.ModRegistry.GetApi <Integrations.GenericModConfigMenuAPI>("spacechase0.GenericModConfigMenu");

            if (api != null)
            {
                api.RegisterModConfig(ModManifest, () => ModConfig = new SummitConfig(), () => Helper.WriteConfig(ModConfig));
                api.RegisterSimpleOption(ModManifest, "Clouds", "Displays clouds in the summit", () => ModConfig.Clouds, (bool val) => ModConfig.Clouds = val);
            }
        }
Ejemplo n.º 3
0
 public override void Entry(IModHelper helper)
 {
     ModConfig              = Helper.ReadConfig <SummitConfig>();
     GameEvents.UpdateTick += GameEvents_UpdateTick;
     GraphicsEvents.OnPreRenderHudEvent += GraphicsEvents_OnPreRenderHudEvent;
 }