Esempio n. 1
0
        public void Setup(IHost host, IGame game)
        {
            IsDebugEnabled = true;

            _host = host;
            _game = game;

            _host.SetGameCore(this);

            _game.Setup();

            // Create assets
            var drawables = _game.Entities.Cast<Entity>().Where(e => e.IsDrawable).OrderBy(d => d.ZIndex).Cast<IDrawable>().ToList();
            drawables.ForEach(d =>
            {
                _host.GraphicsProvider.RegisterImageResource(d.ResourceUrl, d.ResourceUrl);
                _host.GraphicsProvider.LoadImageResource(d.ResourceUrl);
            });
        }