Ejemplo n.º 1
0
 public int drawSprite(float x, float y, float width, float height, float angle, float px, float py, int i)
 {
     //if ((x + Math.Abs(width) < -100 && (y + Math.Abs(height) < -100)) || (x - Math.Abs(width) > 400 && (y - Math.Abs(height) > 500)))
     //    return 0;
     if (checkerror() != 1)
     {
         return(-1);
     }
     else
     {
         batcher.drawSprite(x, y, width, height, angle, px, py, Assets.textureregions[i]);
     }
     return(0);
 }
Ejemplo n.º 2
0
    public void drawText(spritebatchextension batcher, string text, float x, float y, float sx, float sy, float tx, float ty)
    {
        int len = text.Length;
        for (int i = 0; i < len; i++)
        {
            int c = text[i] - ' ';
            
            if (c < 0 || c > glyphs.Length - 1)
            continue;

            TextureRegion glyph = glyphs[c];
            batcher.drawSprite(x, y, sx * glyphWidth, sy * glyphHeight, glyph);
            x += glyphWidth * (tx);
        }
    }
Ejemplo n.º 3
0
        private void drawload(float deltaTime)
        {
            batcher.drawSprite(Assets.screenWidth / 2, Assets.screenHeight / 2, Assets.screenWidth, Assets.screenHeight, 0, Assets.loadscreen);

            //gl.glEnable(GL10.GL_BLEND);
            //gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);
            //batcher.drawSprite(Mouse.GetState().X,480-Mouse.GetState().Y, 10,50,55/2,Assets.textureregions[80]);
            // batcher.drawSprite(50, 50,0+360*Assets.loaderp/100,60,0,Assets.circ);
            time = 500 * deltaTime;

            if (time > 2)
            {
                angle += 5;
                angle %= 360;
                time   = 0;
            }
            batcher.endBatch();
        }