Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.bytejourney.ios.interstitial;
- import com.badlogic.gdx.ApplicationAdapter;
- import com.badlogic.gdx.Gdx;
- import com.badlogic.gdx.graphics.Texture;
- import com.badlogic.gdx.graphics.g2d.SpriteBatch;
- import com.badlogic.gdx.utils.ScreenUtils;
- public class MyGdxGame extends ApplicationAdapter {
- private final AdsController adsController;
- SpriteBatch batch;
- Texture img;
- public MyGdxGame (AdsController adsController){
- this.adsController = adsController;
- }
- @Override
- public void create () {
- batch = new SpriteBatch();
- img = new Texture("badlogic.jpg");
- }
- @Override
- public void render () {
- ScreenUtils.clear(1, 0, 0, 1);
- batch.begin();
- batch.draw(img, 0, 0);
- batch.end();
- if(Gdx.input.justTouched()) if(adsController != null) adsController.loadInterstitial();
- }
- @Override
- public void dispose () {
- batch.dispose();
- img.dispose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement