示例#1
0
 public RangeHighlightAPI(ModEntry mod)
 {
     // can't take these types as args directly because they are less
     // visible than this class (which must be public because SMAPI
     // doesn't currently support using a non-public implementation
     // class for a mod's API).
     this.config           = mod.config;
     this.rangeHighlighter = mod.highlighter;
 }
示例#2
0
 public override void Entry(IModHelper helper)
 {
     this.helper   = helper;
     config        = helper.ReadConfig <ModConfig>();
     highlighter   = new RangeHighlighter(this.Monitor, helper, config);
     api           = _api_private = new RangeHighlightAPI(this);
     defaultShapes = new DefaultShapes(api);
     installDefaultHighlights();
     helper.Events.GameLoop.GameLaunched += onLaunched;
 }
示例#3
0
 public override void Entry(IModHelper helper)
 {
     this.helper = helper;
     I18n.Init(helper.Translation);
     config        = helper.ReadConfig <ModConfig>();
     highlighter   = new RangeHighlighter(this);
     api           = _api_private = new RangeHighlightAPI(this);
     defaultShapes = new DefaultShapes(api);
     helper.Events.GameLoop.GameLaunched    += onLaunched;
     helper.Events.GameLoop.SaveLoaded      += OnSaveLoaded;
     helper.Events.GameLoop.ReturnedToTitle += OnReturnedToTitle;
 }