示例#1
0
        public void Draw(SpriteBatch spriteBatch)
        {
            Rectangle arrowSrcRec  = new Rectangle(bombSrcX, bombSrcY, bombSrcWidth, bombSrcHeight);
            Rectangle arrowDestRec = new Rectangle((int)item.GetPosition().X, (int)item.GetPosition().Y, bombDestWidth, bombDestHeight);

            spriteBatch.Begin();
            spriteBatch.Draw(texture, arrowDestRec, arrowSrcRec, Color.White);
            spriteBatch.End();
        }
示例#2
0
        public void Draw(SpriteBatch spriteBatch)
        {
            Rectangle RupeeSrcRec;
            Rectangle RupeeDestRec = new Rectangle((int)item.GetPosition().X, (int)item.GetPosition().Y, RupeeDestWidth, RupeeDestHeight);

            if (curFrame == 1) /*Change these to correct frames, might need to add/delete else if*/
            {
                RupeeSrcX = 271;
                RupeeSrcY = 224;
            }
            else if (curFrame == 2)
            {
                RupeeSrcX = 241;
                RupeeSrcY = 224;
            }
            RupeeSrcRec = new Rectangle(RupeeSrcX, RupeeSrcY, RupeeSrcWidth, RupeeSrcHeight);
            spriteBatch.Begin();
            spriteBatch.Draw(texture, RupeeDestRec, RupeeSrcRec, Color.White);
            spriteBatch.End();
        }