Esempio n. 1
0
        public static void Draw(SpriteBatch spriteBatch, Vector2 position, SpriteComponent spriteComponent, FacingDirections FacingDirection)
        {
            var textureSizeModified  = Constants.TILESIZE * spriteComponent.TextureModifier;
            var originVectorModified = spriteComponent.TextureModifier == 1 ? Vector2.Zero : new Vector2(textureSizeModified / 3, textureSizeModified / 2);
            var pot = position - Camera.position;

            DrawHitBoxes(spriteBatch, position, spriteComponent);
            spriteBatch.Draw(spriteComponent.Texture, position - Camera.position, AnimationProcessor.GetFrame(spriteComponent.AnimationComponent), Color.White, 0, originVectorModified, 1, SpriteEffects.None, Constants.Sprites.DEFAULT_UNIT_INDEX);
        }
Esempio n. 2
0
 public static void Update(float deltaTime, SpriteComponent spriteComponent)
 {
     AnimationProcessor.Update(spriteComponent.AnimationComponent, deltaTime);
 }