/// <summary> /// Creates all the sprites for this Hero, based on the TextureHolder class. /// </summary> protected override void populateSpriteList() { //Adapt the TextureHolder.ActorImageTypes enumerator to change the values here. Hard coded there, don't do it here. ActorTextureHolder holder = ActorTextureHolder.Holder; int index = (int)ConstantHolder.ActorImageTypes.BaseActor2; actorSprites.Add(holder.MainSprites[index].copySprite()); minimapSprites.Add(holder.MinimapSprites[index].copySprite()); portrait = holder.PortraitSprites[index].copySprite(); }
public Hero(int classID, int level, int[] abilityIndices, int skinIndex, Vector2 GridPosition) { effects = new List <AbilityEffect>(); this.gridPosition = GridPosition; ActorTextureHolder holder = ActorTextureHolder.Holder; actorSprites.Add(holder.MainSprites[skinIndex].copySprite()); minimapSprites.Add(holder.MinimapSprites[skinIndex].copySprite()); portrait = holder.PortraitSprites[skinIndex].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"); ActorTextureHolder.makeHolder(GraphicsDevice); EnvironmentTextureHolder.makeHolder(GraphicsDevice); InterfaceTextureHolder.makeHolder(Content, GraphicsDevice); Controls.Initialize(); // TODO: use this.Content to load your game content here }
/// <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 }