Ejemplo n.º 1
0
        public override void Draw(GameRegistry registry, SpriteBatch spriteBatch, Vector2 screenPos)
        {
            Texture2D chest  = registry.GetTexture("chest");
            Rectangle src    = GetSourceRect();
            Vector2   pos    = Position - screenPos;
            Vector2   origin = Vector2.Zero;

            spriteBatch.Draw(chest, pos, src, Color.White, 0f, origin, 1f, SpriteEffects.None, 0);
        }
Ejemplo n.º 2
0
        public override void Draw(GameRegistry registry, SpriteBatch spriteBatch, Vector2 screenPos)
        {
            Texture2D tiles  = registry.GetTexture("tiles");
            Rectangle src    = GetSourceRect();
            Vector2   pos    = Position - screenPos;
            Color     color  = _isObstacle ? Color.White * 0.75f : Color.White;
            Vector2   origin = Vector2.Zero;

            spriteBatch.Draw(tiles, pos, src, color, 0f, origin, 1f, SpriteEffects.None, 0);
        }