Ejemplo n.º 1
0
 public void LoadContent(ContentManager contentManager)
 {
     this.texture = contentManager.Load<Texture2D>(SpriteSuffix.GetSpriteName(Unit));
     this.currentSprite = new AnimatedSprite(this.texture, 2, 3);
 }
Ejemplo n.º 2
0
        /// <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);
                }
            }
        }
Ejemplo n.º 3
0
 public void LoadContent(ContentManager contentManager)
 {
     this.walkAnimationTexture = contentManager.Load<Texture2D>(SpritePath + "walksouth");
     this.currentSprite = new AnimatedSprite(this.walkAnimationTexture, 2, 3);
 }