private void btnFire_Click(object sender, EventArgs e) { if (this.txtPlayerUnitSelected.Text != "") { GameCommand myCommand = new GameCommand(this.me.Id, this.txtPlayerUnitSelected.Text, enCommand.FireFixedGun, distance: 1); myCommand.Save(this.FAppPrivate); } }
private void btnAddVehicle_Click(object sender, EventArgs e) { if (this.lbxUnits.SelectedIndex > -1) { GameCommand myCommand = new GameCommand(this.me.Id, this.lbxUnits.SelectedItem.ToString(), enCommand.AddUnit); myCommand.Save(this.FAppPrivate); } }
private void btnRotateVehicleLeft_Click(object sender, EventArgs e) { if (this.txtPlayerUnitSelected.Text != "") { GameCommand myCommand = new GameCommand(this.me.Id, this.txtPlayerUnitSelected.Text, enCommand.RotateCW, rotation: 45); myCommand.Save(this.FAppPrivate); } }
private void btnLeaveGame_Click(object sender, EventArgs e) { if (this.lbxGames.SelectedIndex > -1) { GameCommand myCommand = new GameCommand(this.me.Id, this.lbxGames.SelectedItem.ToString(), enCommand.LeaveGame); myCommand.Save(this.FAppPrivate); } }