Ejemplo n.º 1
0
        private void SaveButton_Click(object sender, EventArgs e)
        {
            FogOfWar.SaveFogInternal(displayMap);
            SaveForm SaveDialogue = new SaveForm();

            SaveDialogue.ShowDialog();
        }
Ejemplo n.º 2
0
        private void LoadButton_Click(object sender, EventArgs e)
        {
            LoadForm LoadDialogue = new LoadForm();

            LoadDialogue.ShowDialog();

            if (successfulLoad)
            {
                HideStartingUI();
                displayMap.PrepTable();
                if (FogOfWar.fogOfWarOn && !FogOfWar.fogOfWarHarsh)
                {
                    FogOfWar.LoadFogInternal(displayMap);
                    ShowSecondaryUI();
                }
                else
                {
                    displayMap.SwitchMap(displayMap.CurrentFloor);
                }

                floorMessage.Text   = "Floor " + displayMap.CurrentFloor;
                floorMaxLabel.Text  = "of " + displayMap.NumberOfFloors;
                displayGrid.Visible = true;
                successfulLoad      = false;
            }
        }
Ejemplo n.º 3
0
        private void ShowMap()
        {
            if (FogOfWar.fogOfWarOn)
            {
                ClearDisplayGrid();
                FogOfWar.UpdateFogOfWar(this);
            }

            displayGrid.Visible = true;
        }
Ejemplo n.º 4
0
        public void ActivateDoor()
        {
            int newDoorRow    = displayGrid.CurrentCell.OwningRow.Index;
            int newDoorColumn = displayGrid.CurrentCell.OwningColumn.Index;

            int[] previousDoor = new int[2];
            previousDoor[0] = CurrentDoor[0];
            previousDoor[1] = CurrentDoor[1];

            if (CurrentFloor != 1 || MapGeneration.map1.Contents[newDoorRow, newDoorColumn] != 'D')
            {
                SetCurrentDoor(newDoorRow, newDoorColumn);
                if (displayGrid.Rows[previousDoor[0]].Cells[previousDoor[1]].Style.BackColor == Color.Red)
                {
                    SetCellBlue(previousDoor[0], previousDoor[1]);
                }
                FogOfWar.UpdateFogOfWar(this);
            }
        }
Ejemplo n.º 5
0
        public void SwitchMap(int floor)
        {
            FogOfWar.SaveFogInternal(this);
            ClearDisplayGrid();
            GetStairCoordinates(floor);

            if (floor == 1)
            {
                PrintMapWindow(MapGeneration.map1);
                SetCellColor(MapGeneration.map1, CurrentDoor[0], CurrentDoor[1]);
            }
            else if (floor == 2)
            {
                PrintMapWindow(MapGeneration.map2);
                SetCellColor(MapGeneration.map2, CurrentDoor[0], CurrentDoor[1]);
            }
            else if (floor == 3)
            {
                PrintMapWindow(MapGeneration.map3);
                SetCellColor(MapGeneration.map3, CurrentDoor[0], CurrentDoor[1]);
            }

            FogOfWar.LoadFogInternal(this);
        }
Ejemplo n.º 6
0
 private void FogOfWarDropdownSelected(object sender, EventArgs e)
 {
     FogOfWar.SetFogOfWar(sender as ComboBox);
 }