Exemplo n.º 1
0
        internal CoreApiFactory(IMod mod, ItemDelegator itemDelegator)
        {
            this._itemDelegator = itemDelegator;

            // Create texture tracker
            this._textureTracker = new TextureTracker(mod);
            mod.Helper.Content.AssetEditors.Add(this._textureTracker);
        }
Exemplo n.º 2
0
        public CoreApi(IMod owner, ItemDelegator itemDelegator, TextureTracker textureTracker)
        {
            this.Owner             = owner;
            this.ContentSource     = new ModContentSource(owner);
            this.TranslationHelper = new CoreTranslationHelper(this);

            // Create the APIs
            this._drawing = new Lazy <IDrawingApi>(() => new DrawingApi(new ApiHelper(this, "Drawing"), textureTracker));
            this._items   = new Lazy <IItemApi>(() => new ItemApi(new ApiHelper(this, "Items"), itemDelegator));
            this._json    = new Lazy <IJsonApi>(() => new JsonApi(new ApiHelper(this, "Json")));
        }