public override void Update(GameTime gameTime, MouseState mouseState) { base.Update(gameTime, mouseState); //will need send a message of some sort /* if (backButton.isClicked()) { finished = true; backButton.reset(); } */ for (int i=dropDowns.Count; i >0; i--) { DropDown dd = (DropDown) dropDowns[i-1]; if (dd.RequestDrop()) { if (dd == dropped) { dd.drop(); } if (!existsADrop) { dd.drop(); dropped = dd; existsADrop = true; } dd.resetRequest(); } if (dd == dropped) { if (!dd.getDown()) { if (dd.getSelected() != "Open") Game1.host.addAIPlayer(dd.getSelected()); dropped = null; existsADrop = false; } } if (startButton.isClicked()) { startButton.reset(); if ((Game1.client.getState().getPlayers().Count > 2) && Game1.host.playersReady()) { backToMenu = false; finished = true; } else { }//error message } } }
public override void updateHelper(int i) { dropDowns[i].setEnabled(true); if (dropped != null) dropped.drop(); dropped = null; existsADrop = false; base.updateHelper(i); }