private void pButtonMinus_Click(object sender, RoutedEventArgs e) { if (selectedplayer > 0 && selectedplayer <= Retrieval.playerNum - 1) { selectedplayer -= 1; } playerDesc = players[selectedplayer]; }
private void aiButtonMinus_Click(object sender, RoutedEventArgs e) { if (selectedenemy >= 0 && selectedenemy < Retrieval.enemyNum - 1) { selectedenemy += 1; } enemyDesc = enemies[selectedplayer]; }
private void mapButtonMinus_Click(object sender, RoutedEventArgs e) { if (selectedMap > 0 && selectedMap <= Retrieval.mapNum - 1) { selectedMap -= 1; } mapDesc = maps[selectedMap]; }
public MainWindow() { InitializeComponent(); enemies = Retrieval.getEnemies(); maps = Retrieval.getMaps(); players = Retrieval.getPlayers(); selectedenemy = 0; selectedMap = 0; selectedplayer = 0; playerDesc = players[0]; mapDesc = maps[0]; enemyDesc = enemies[0]; PlayerDescBox.Text = playerDesc.typeDesc[0] + "\n" + playerDesc.typeDesc[1]; EnemyDescBox.Text = enemyDesc.typeDesc[0] + "\n" + enemyDesc.typeDesc[1]; MapDescBox.Text = mapDesc.typeDesc[0] + "\n" + mapDesc.typeDesc[1]; }