Example #1
0
        public void EditorUI()
        {
            tileOfChoice = new Tile("Floor", new Point(2, 0), new Vector2(0, 0));
            tileArsenal = new TileArsenal(new Vector2(0, 0), tileSheet, tileSize);

            texts.Add(new Text("SegoeUIMono", "Layer ", Color.White, new Vector2(10, 370)));
            InputText = new Text("SegoeUIMono", "|", Color.White, new Vector2(200, 10));
            saveButton = new Button("Save", new Vector2(200, 40), "SAVE");
            loadButton = new Button("Save", new Vector2(200 + saveButton.Width, 40), "LOAD");
        }
Example #2
0
 public void LeftMouseButton()
 {
     MouseState ms = Mouse.GetState();
     if (ms.LeftButton == ButtonState.Pressed)
     {
         foreach (var tile in tileArsenal.tileArsenal)
         {
             if (tile.GraphicalRectangle().Contains(mousePosition))
             {
                 tileOfChoice = new Tile(tile.Name, tile.sheetPoint, tileOfChoice.Pos);
                 ChangedTile = true;
                 break;
             }
         }
     }
     else
     {
         ChangedTile = false;
     }
 }
Example #3
0
 public void SetTile(Tile newTile, int index, int currentLayer)
 {
     tileLists[currentLayer][index].sheetPoint = newTile.sheetPoint;
 }