Example #1
0
        public List <IAssetDef> Process(string wildcard)
        {
            var subset = _resources.Where(x => Wildcard.Matches(wildcard, x.ID));

            foreach (IResource r in subset)
            {
                IAssetDef assetDef = null;

                if (r.ID.Contains("Assets/Game"))
                {
                    assetDef = new GameAssetDef(_game, r);
                }
                else if (r.ID.Contains("Assets/Rooms"))
                {
                    assetDef = new RoomAssetDef(_game, r);
                }
                else
                {
                    throw new NotImplementedException($"Could not infere the asset type from the wildcard '{wildcard}'");
                }

                //TODO! IMPORTANT! Check (CPU-efficiently) if not already processed before with another wildcard!
                assetsDefs.Add(assetDef);
            }

            foreach (IAssetDef assetDef in assetsDefs)
            {
                assetDef.Parse();
            }

            return(assetsDefs);
        }
        protected FakeAGSLoadingScreen(IGame game, string id, IAssetDef def)
        {
            _id   = id;
            _game = game;
            _def  = def;

            _room = _game.Factory.Room.GetRoom(_id);
        }
Example #3
0
 public SplashScreen(IGame game, string id, IAssetDef def) : base(game, id, def)
 {
 }