public GuiGrid(GuiScreen screen) { this.screen = screen; cells = new Cell[8, 8]; CellSize = new Point(60, 60); SetSize(new Point(cells.GetLength(0) * CellSize.X, cells.GetLength(1) * CellSize.Y)); destroyers = new List<Destroyer>(); random = new Random(); shapes = Enum.GetValues(typeof(Shape)); IsAnimating = false; }
internal GuiScreen ChangeScreen(Type screenType) { GuiScreen screen = null; if (screenType.BaseType == typeof(GuiScreen)) { currentScreen.UnloadContent(); screen = (GuiScreen)Activator.CreateInstance(screenType, this); currentScreen = screen; currentScreen.LoadContent(); } return screen; }
public Match3Game() { Graphics = new GraphicsDeviceManager(this) { PreferredBackBufferWidth = Consts.SCREEN_WIDTH, PreferredBackBufferHeight = Consts.SCREEN_HIEGHT }; Content.RootDirectory = "Content"; sharedContentManager = new ContentManager(Services, "ContentShared"); SharedContent = new Dictionary<int, object>(); IsMouseVisible = true; currentScreen = new StartScreen(this); }