public void LoadContent(ContentManager contentManager) { this.texture = contentManager.Load<Texture2D>(SpriteSuffix.GetSpriteName(Unit)); this.currentSprite = new AnimatedSprite(this.texture, 2, 3); }
/// <summary> /// load the content for the current action and unit /// </summary> /// <param name="contentManager"></param> public virtual void LoadContent(ContentManager contentManager) { this.texture = contentManager.Load<Texture2D>(this.GetSpriteName(Action.ActionType.ToString())); if (this.Action != null) { var unitActionSprite = AvailableActions.FirstOrDefault(x => x.Action == this.Action.ActionType); if (unitActionSprite != null) { this.currentSprite = new AnimatedSprite(this.texture, unitActionSprite.Rows, unitActionSprite.Columns); } } }
public void LoadContent(ContentManager contentManager) { this.walkAnimationTexture = contentManager.Load<Texture2D>(SpritePath + "walksouth"); this.currentSprite = new AnimatedSprite(this.walkAnimationTexture, 2, 3); }