public override void initialise() { sampleTexture = Mdx.graphics.newTexture(Mdx.files.@internal("mini2Dx.png")); sampleRegion = Mdx.graphics.newTextureRegion(sampleTexture); sampleRegion2 = Mdx.graphics.newTextureRegion(sampleTexture).split(16, 17)[1][1]; sampleRegion2.flip(false, true); sampleSprite = Mdx.graphics.newSprite(sampleTexture); sampleNinePatch = Mdx.graphics.newNinePatch(Mdx.graphics.newTexture(Mdx.files.@internal("ninepatch.png")), 6, 6, 6, 6); sampleAtlas = Mdx.graphics.newTextureAtlas(Mdx.files.@internal("packfile.atlas")); sampleAtlasRegion = sampleAtlas.findRegion("tileGreen", 47); sampleTilingDrawable = Mdx.graphics.newTilingDrawable(Mdx.graphics.newTextureRegion(Mdx.graphics.newTexture(Mdx.files.@internal("background.png")))); Mdx.graphicsContext.setColor(Mdx.graphics.newColor(1f, 1f, 1f, 1f)); Mdx.graphicsContext.setBackgroundColor(new MonoGameColor(Color.Blue)); sampleSprite.setOriginCenter(); music = Mdx.audio.newMusic(Mdx.files.@internal("music.ogg")); sound = Mdx.audio.newSound(Mdx.files.@internal("sound.wav")); Mdx.audio.addMusicCompletionListener(new AudioCompletionListener()); Mdx.audio.addSoundCompletionListener(new AudioCompletionListener()); Mdx.input.newXboxGamePad((GamePad)Mdx.input.getGamePads().get(0)).addListener(new UATInputProcessor(this)); sampleShader = Mdx.graphics.newShader("grayscaleShader"); Mdx.graphicsContext.setFont(Mdx.fonts.newBitmapFont(Mdx.files.@internal("arial24.fnt"))); Mdx.graphicsContext.getFont().setColor(Mdx.graphics.newColor(255, 255, 255, 255)); sampleFontCache = Mdx.graphicsContext.getFont().newCache(); sampleFontCache.setColor(Mdx.graphics.newColor(255, 255, 255, 255)); sampleFontCache.addText("Hello!\nBonjour!\nCiao!\nGuten tag!\nNamaste!", 400, 165, 100, Align.LEFT, true); sampleFontCache.addText("Hello!\nBonjour!\nCiao!\nGuten tag!\nNamaste!", 500, 165, 100, Align.CENTER, true); sampleFontCache.addText("Hello!\nBonjour!\nCiao!\nGuten tag!\nNamaste!", 600, 165, 100, Align.RIGHT, true); sampleMap = new TiledMap(Mdx.files.@internal("orthogonal_no_cache.tmx")); Mdx.input.setInputProcessor(new UATInputProcessor(this)); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { Mdx.graphicsContext = new MonoGameGraphics(GraphicsDevice); Mdx.graphics = new MonoGameGraphicsUtils(GraphicsDevice); Mdx.audio = new MonoGameAudio(); sampleTexture = Mdx.graphics.newTexture(Mdx.files.@internal("mini2Dx.png")); sampleRegion = Mdx.graphics.newTextureRegion(sampleTexture); sampleRegion2 = Mdx.graphics.newTextureRegion(sampleTexture).split(16, 17)[1][1]; sampleRegion2.flip(false, true); sampleSprite = Mdx.graphics.newSprite(sampleTexture); sampleNinePatch = Mdx.graphics.newNinePatch(Mdx.graphics.newTexture(Mdx.files.@internal("ninepatch.png")), 6, 6, 6, 6); sampleAtlas = Mdx.graphics.newTextureAtlas(Mdx.files.@internal("pack.atlas")); sampleAtlasRegion = sampleAtlas.findRegion("tileGreen", 47); sampleTilingDrawable = new MonoGameTilingDrawable(Mdx.graphics.newTexture(Mdx.files.@internal("background.png"))); Mdx.graphicsContext.setColor(new MonoGameColor(255, 255, 255, 255)); Mdx.graphicsContext.setBackgroundColor(new MonoGameColor(Color.Blue)); sampleSprite.setOriginCenter(); music = Mdx.audio.newMusic(Mdx.files.@internal("music.ogg")); sound = Mdx.audio.newSound(Mdx.files.@internal("sound.wav")); Mdx.audio.addMusicCompletionListener(new AudioCompletionListener()); Mdx.audio.addSoundCompletionListener(new AudioCompletionListener()); Mdx.input.newXbox360GamePad((GamePad)Mdx.input.getGamePads().get(0)).addListener(new UATInputProcessor(this)); }
public void drawTilingDrawable(TilingDrawable tilingDrawable, float x, float y, float width, float height) { beginRendering(); tilingDrawable.draw(this, x, y, width, height); }
public void drawTilingDrawable(TilingDrawable tilingDrawable, float x, float y, float width, float height) { tilingDrawable.draw(this, x, y, width, height); }
public void drawTilingDrawable(TilingDrawable td, float f1, float f2, float f3, float f4) { throw new System.NotImplementedException(); }