Exemple #1
0
 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;
 }
Exemple #2
0
 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;
 }
Exemple #3
0
        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);
        }