示例#1
0
 /// Handles "Show Vertices" Button click event.
 private void ShowVerticesBtn_Click(object sender, EventArgs e)
 {
     drawVerts = !drawVerts; // Toggles bool.
     DeselectTower();
     GameWorldPB.Invalidate();
     DrawBackground();
 }
示例#2
0
 private void FuzzyTowerPB_Click(object sender, EventArgs e)
 {
     this.selectedTower = new FuzzyTower();
     GameWorldPB.Invalidate();
     DeselectTower();
     towerDescription.Text = selectedTower.description;
 }
示例#3
0
 private void Tower3PB_MouseDown(object sender, MouseEventArgs e)
 {
     this.selectedTower = new SplitShotTower();
     GameWorldPB.Invalidate();
     DeselectTower();
     towerDescription.Text = selectedTower.description;
 }
示例#4
0
 /// Handles change of mouse location within PictureBox, redraws.
 private void GameWorldPB_MouseMove(object sender, MouseEventArgs e)
 {
     mousePos = e.Location;
     if (selectedTower == null && !GetTileAtMouse.buildable)
     {
         GameWorldPB.Cursor = Cursors.Hand;
     }
     else
     {
         GameWorldPB.Cursor = Cursors.Default;
     }
     GameWorldPB.Invalidate();
 }
示例#5
0
 private void HandSelectPB_Click(object sender, EventArgs e)
 {
     this.selectedTower = null;
     GameWorldPB.Invalidate();
 }
示例#6
0
 /// Sets mousePos to null after leaving main PictureBox, redraws PictureBox.
 private void GameWorldPB_MouseLeave(object sender, EventArgs e)
 {
     mousePos = null;
     GameWorldPB.Invalidate();
 }