Example #1
0
        /// <inheritdoc />
        protected sealed override void InternalLoad()
        {
            this.background = Assets.LoadTexture2D(backgroundID);
            this.walkAreas  = Assets.LoadWalkAreas(walkAreasID);

            this.hotspotsMask      = this.Assets.LoadTexture2D(this.hotSpotMaskID);
            this.hotspotMaskBuffer = this.FindHotspots(this.hotspotsMask);

            this.InitializeEvents();
        }
        internal static IEnumerable<TextureFrame> LoadAtals(Assets assets, string fileName)
        {
            if (string.IsNullOrWhiteSpace(fileName))
                throw new ArgumentNullException(nameof(fileName));

            var ext = Path.GetExtension(fileName).ToUpper();

            AtlasLoader loader;
            if (!_loaders.TryGetValue(ext, out loader))
                throw new Exception($"Loader for extension {ext} not registered");

            var texture = assets.LoadTexture2D(Path.GetFileNameWithoutExtension(fileName));
            var atalsData = assets.LoadText(fileName);
            return loader.LoadAtals(texture, atalsData);
        }
Example #3
0
 /// <inheritdoc />
 protected override void InternalLoad()
 {
     this.image = Assets.LoadTexture2D(Source);
 }