コード例 #1
0
ファイル: LevelEditor.cs プロジェクト: wico-/Code
 public LevelEditor(eContentManager contentMgr)
 {
     contentManager = contentMgr;
     tileTable = new Hashtable();
     players = new List<Player>();
     menuTexture = contentManager.getTexture("crappyMenu");
     replacement = new Artist(new Rectangle(0, 0, 40, 40), contentManager.getTexture("Tiles/engineeringBlock"));
     font = Globals.font;
     selectedTexture = contentManager.getTexture("Tiles/selectedTile");
     blankTile = contentManager.getTexture("Tiles/blankTile");
     tempTiles = new List<Common.Entity>();
     highlightSelection = true;
     textureNames = new List<string>();
     menu = new Menu(menuTexture);
     tiles = new List<Common.Entity>();
     cursorPos = new Vector2();
     highlightTile = new Tile(selectedTexture, new Vector2(0, 0));
     int height = Globals.viewport.Height;
     int width = Globals.viewport.Width;
     int textureWidth = highlightTile.boundary.Width;
     for (int i = 0; i < height; i += 40)
     {
         for (int j = 0; j < width; j += 40)
         {
             tiles.Add(new Tile(blankTile, new Vector2(j, i)));
         }
     }
 }
コード例 #2
0
        public MenuHtmlBuilderTests()
        {
            Mock<HtmlTextWriter> writer = new Mock<HtmlTextWriter>(TextWriter.Null);

            menu = MenuTestHelper.CreateMenu(writer.Object, null);
            menu.Name = "Menu1";

            item = new MenuItem();

            builder = new MenuHtmlBuilder(menu, new Mock<IActionMethodCache>().Object);
        }
コード例 #3
0
 static void Main(string[] args)
 {
     try {
         Application.Init();
         menu = new UI.Menu();
         Application.Run();
     } catch (Exception e) {
         Console.WriteLine("An unexpected error occured");
         Console.WriteLine($"{e.Message}\n{e.StackTrace}");
     }
 }