/// <summary> /// Creates a GUI element to show information about the selected Person and their abilities. /// </summary> /// <param name="CharacterLifeRect">Game screen area to draw the portrait, life and energy bars, any AbilityEffect icons, and level information</param> /// <param name="abilityAreaRect">Area to display the ability buttons, as well as the experience bar if the selected person is a hero.</param> public CharacterBox(Rectangle CharacterLifeRect, Rectangle abilityAreaRect) { Options = new TextButton[4]; HealthBox = CharacterLifeRect; ExpBarBox = abilityAreaRect; Rectangle buttonRect = new Rectangle(ExpBarBox.X + 10, ExpBarBox.Y + 10, (ExpBarBox.Width - 25) / 4, ExpBarBox.Height - 50); interfaceHolder = InterfaceTextureHolder.Holder; combatHolder = CombatTextureHolder.Holder; Options[0] = new TextButton(buttonRect, interfaceHolder.ButtonSprites[(int)ConstantHolder.ButtonBackgrounds.Exit].copySprite(), buttonZero, interfaceHolder.Fonts[(int)ConstantHolder.Fonts.defaultFont], "Yo, dawg."); buttonRect.X += (ExpBarBox.Width - 25) / 4 + 5; Options[1] = new TextButton(buttonRect, interfaceHolder.ButtonSprites[(int)ConstantHolder.ButtonBackgrounds.Exit].copySprite(), buttonOne, interfaceHolder.Fonts[(int)ConstantHolder.Fonts.defaultFont], "Sup, son."); buttonRect.X += (ExpBarBox.Width - 25) / 4 + 5; Options[2] = new TextButton(buttonRect, interfaceHolder.ButtonSprites[(int)ConstantHolder.ButtonBackgrounds.Exit].copySprite(), buttonTwo, interfaceHolder.Fonts[(int)ConstantHolder.Fonts.defaultFont], "I heard you liek mudkips"); buttonRect.X += (ExpBarBox.Width - 25) / 4 + 5; Options[3] = new TextButton(buttonRect, interfaceHolder.ButtonSprites[(int)ConstantHolder.ButtonBackgrounds.Exit].copySprite(), buttonThree, interfaceHolder.Fonts[(int)ConstantHolder.Fonts.defaultFont], "Bro do you even lift?"); healthPanelBackground = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.PortraitBackground].copySprite(); abilityPanelBackground = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.AbilityBackground].copySprite(); mouseoverBackground = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.MouseOverBackground].copySprite(); healthPanelFrame = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.PortraitFrame].copySprite(); abilityPanelFrame = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.AbilityFrame].copySprite(); mouseOverFrame = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.MouseOverFrame].copySprite(); healthBar = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.HealthBar].copySprite(); healthBarM = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.HealthBar].copySprite(); energyBar = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.EnergyBar].copySprite(); energyBarM = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.EnergyBar].copySprite(); experienceBar = interfaceHolder.GUISprites[(int)ConstantHolder.GUIMemberImages.ExperienceBar].copySprite(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); ConstantHolder.textureLoader = TextureListXML.loadTextureXMLs("Content\\XMLs\\Textures\\Textures.xml"); ActorHolder = ActorTextureHolder.makeHolder(GraphicsDevice); CombatHolder = CombatTextureHolder.makeHolder(GraphicsDevice); EnviroHolder = EnvironmentTextureHolder.makeHolder(GraphicsDevice); InterfaceHolder = InterfaceTextureHolder.makeHolder(Content, GraphicsDevice); currentLevelGrid = Level.loadLevelXML("Content\\XMLs\\level.xml").LevelGrid; GUIMan = GUIManager.MakeManager(); changeState(GameState.Gameplay_Combat); //currentLevelGrid = thing.SimpleLevelGrid; IsMouseVisible = true; changeState(GameState.Gameplay_Combat); //HexagonWidth = hex.Width; // TODO: use this.Content to load your game content here }
numEIS = 0; //Size to make the EffectIconSprite array. /// <summary> /// Constructs the CombatTextureHolder which will be accessable in static by the public. /// Holds all Ability and AbilityEffect related sprites. /// Should be called from the game's main class, in the LoadContent() function. /// </summary> /// <param name="manager">Content loader from the main game class.</param> /// <returns>The CTH created by the constructor.</returns> public static CombatTextureHolder makeHolder(GraphicsDevice graphics) { return(CTHolder = new CombatTextureHolder(graphics)); }
numEIS = 0; //Size to make the EffectIconSprite array. /// <summary> /// Constructs the CombatTextureHolder which will be accessable in static by the public. /// Holds all Ability and AbilityEffect related sprites. /// Should be called from the game's main class, in the LoadContent() function. /// </summary> /// <param name="manager">Content loader from the main game class.</param> /// <returns>The CTH created by the constructor.</returns> public static CombatTextureHolder makeHolder(GraphicsDevice graphics) { return CTHolder = new CombatTextureHolder(graphics); }