public static void Update(GameTime gameTime) { if (selectedHeroIndex != SelectionUtility.currentSelectedPartyMember && SelectionUtility.currentSelectedPartyMember != -1) { selectedHeroIndex = SelectionUtility.currentSelectedPartyMember; selectedHero = (BasicTeamUtility.parties[(int)BasicTeamUtility.FriendlyParties.Party][selectedHeroIndex] as BasicHero); GUIBigPic = selectedHero.charAsset.bigGUIPic; GUIBigPicBounds = selectedHero.charAsset.bigGUIPicBounds; SpellBarHandler.bGenerateBounds = true; int i = 0; SpellBarHandler.activeSpellsBounds.Clear(); SpellBarHandler.activeSpells.Clear(); foreach (var spell in selectedHero.activeSpells) { if (spell != default(Spell)) { if (SpellBarHandler.bGenerateBounds) { SpellBarHandler.activeSpells.Add(spell); SpellBarHandler.activeSpellsBounds.Add(new Rectangle(315 + 16 + i * (64 + 2 + 16), 672 + 15, 64, 64)); } } i++; } SpellBarHandler.bGenerateBounds = false; SpellBarHandler.Update(gameTime); } else if (SelectionUtility.currentSelectedPartyMember != -1) { SpellBarHandler.Update(gameTime); } if (targetedCharacter != (SelectionUtility.secondSelectedCharacter)) { targetedCharacter = SelectionUtility.secondSelectedCharacter; if (SelectionUtility.secondSelectedCharacter != default(BaseCharacter)) { bigGUIPicTarget = SelectionUtility.secondSelectedCharacter.charAsset.bigGUIPic; GUIBigPicBoundsTarget = SelectionUtility.secondSelectedCharacter.charAsset.bigGUIPicBounds; HBarSLocTarget = new Vector2(-(128 + 16 + 16 + 16) + 1366 - GUIBigPicBounds.Width, 48 + 16); HBarLocTarget = new Vector2(-(HBarLoc.X) + 1366 - GUIBigPicBounds.Width, 48 + 16 + 16 + fontMargin); MBarSLocTarget = new Vector2(-(128 + 16 + 16 + 16) + 1366 - GUIBigPicBounds.Width, 80 + 16); MBarLocTarget = new Vector2(-(MBarLoc.X) + 1366 - GUIBigPicBounds.Width, 80 + 16 + 16 + fontMargin); } } selectedHeroIndex = SelectionUtility.currentSelectedPartyMember; }
public void setOptionChosen(MenuOptions optionChosen) { switch (optionChosen) { case MenuOptions.SELECT_CRUSADER: this.heroToShow = new Crusader(); break; case MenuOptions.SELECT_ENCHANTRESS: this.heroToShow = new Enchantress(); break; case MenuOptions.SELECT_HALFGOBLIN: this.heroToShow = new HalfGoblin(); break; case MenuOptions.SELECT_KNIGHT: this.heroToShow = new Knight(); break; case MenuOptions.SELECT_MERCENARY: this.heroToShow = new Mercenary(); break; case MenuOptions.SELECT_MINSTREL: this.heroToShow = new Minstrel(); break; case MenuOptions.SELECT_OCCULTIST: this.heroToShow = new Occultist(); break; case MenuOptions.SELECT_SPELLSWORD: this.heroToShow = new Spellsword(); break; } }
public ConfirmSpecificHeroSelectionMenu() : base() { this.maxOption = 2; this.heroToShow = new DefaultBasicHero(); }
public SmartObject[] getSmartObjects(BasicHero a) { return(smartObjects); }