Beispiel #1
0
        private void MoveUnit(UnitControl unit, HexLabel hex)
        {
            int x = hex.Location.X + ((hex.Width - unit.Width) / 2);
            int y = hex.Location.Y + ((hex.Height - unit.Height) / 2);

            unit.Location = new Point(x, y);
        }
Beispiel #2
0
        private void AddHexLabel(Hex hex, int x, int y)
        {
            HexLabel hexLabel = new HexLabel(hex);

            hexLabel.Click += this.HexLabel_Click;
            this.pnlField.Controls.Add(hexLabel);
            hexLabel.Location = new Point(x, y);

            this.hexLabels.Add(hex, hexLabel);
        }
Beispiel #3
0
        private void HexLabel_Click(object sender, EventArgs e)
        {
            HexLabel hexLabel = (HexLabel)sender;

            this.game.OnSelectHex(hexLabel.Hex);
        }