Beispiel #1
0
 /// <summary>Raised after the game is launched, right before the first update tick. This happens once per game session (unrelated to loading saves). All mods are loaded and initialised at this point, so this is a good time to set up mod integrations.</summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event arguments.</param>
 private void OnGameLaunched(object sender, GameLaunchedEventArgs e)
 {
     settings       = new Settings(Helper);
     configMenu     = new ConfigMenu(settings);
     drawingManager = new LabelDrawingManager(settings);
     detector       = new Detector(settings);
     detector.AddDetector(DetectorType.NPC)
     .AddDetector(DetectorType.Object)
     .AddDetector(DetectorType.FarmAnimal)
     .AddDetector(DetectorType.WaterEntity)
     .AddDetector(DetectorType.Crop);
 }
Beispiel #2
0
        public override void Entry(IModHelper helper)
        {
            settings       = new Config.Settings(Helper);
            configMenu     = new ConfigMenu(settings);
            drawingManager = new LabelDrawingManager(settings);
            detector       = new Detector(settings);
            detector.AddDetector("NPC")
            .AddDetector("Object")
            .AddDetector("FarmAnimal")
            .AddDetector("WaterEntity");

            Helper.Events.Display.RenderingHud += Display_RenderingHud;
            Helper.Events.Player.Warped        += Player_Warped;
            Helper.Events.Input.ButtonPressed  += Input_ButtonPressed;
        }