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); } }
public GameScreen() { guiCam = new Camera2D(Assets.screenWidth, Assets.screenHeight); batcher = new spritebatchextension(Assets.max_texrg); batcherBridge = new BatcherBridge(batcher); ts_bridge = new tools_seting_bridge(); //Sending a handle of this class to c++ Bridge.postobject(this, 0); //Sending a handle of this class to c++ Bridge.postobject(batcherBridge, 1); //Sending a handle of this class to c++ Bridge.postobject(guiCam, 2); ////////////////////////////////////// Bridge.postobject(ts_bridge, 4); ///////////////////////////////// }
public GameScreen() { guiCam = new Camera2D(Assets.screenWidth, Assets.screenHeight); batcher = new spritebatchextension(Assets.max_texrg ); batcherBridge=new BatcherBridge(batcher); ts_bridge=new tools_seting_bridge(); //Sending a handle of this class to c++ Bridge.postobject(this, 0); //Sending a handle of this class to c++ Bridge.postobject(batcherBridge, 1); //Sending a handle of this class to c++ Bridge.postobject(guiCam, 2); ////////////////////////////////////// Bridge.postobject(ts_bridge,4); ///////////////////////////////// }
public void drawText(spritebatchextension batcher, string text, float x, float y) { drawText(batcher, text, x, y,1,1,1,1); }
public BatcherBridge(spritebatchextension batcher) { this.batcher = batcher; }