Exemplo n.º 1
0
        private TScreen BuildScreen <TScreen>() where TScreen : IScreen
        {
            var screenContext = new ScreenContext(game, this, resourceCache, resourceLocator, networkClient);

            var screen = (TScreen)Activator.CreateInstance(typeof(TScreen), screenContext);

            screen.PrepareResources(graphicsDevice);
            screen.Layout();

            return(screen);
        }
Exemplo n.º 2
0
        public AbstractScreen(ScreenContext screenContext)
        {
            this.Context = screenContext;

            this.RootUI = new StarlightGrid();
        }
Exemplo n.º 3
0
 public AbstractScreen(ScreenContext screenContext) : base(screenContext)
 {
     this.UI = new TControls();
 }