Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local this = {}
- local platformName = system.getInfo("platformName")
- local x, y = display.contentWidth * 0.5 - 160, platformName == "Android" and display.screenTop or 0
- local function onAd(event)
- if event.isError then end
- end
- function this.hide()
- ads.hide()
- end
- function this.show()
- --if platformName == "Android" then ads.show("banner", "Bubblex", {x = x, y = y, w = 320, h = 50, timeout = 5}) -- use auto refresh for AdMob
- --else
- ads.show("banner", {x = x, y = y}) -- end
- end
- function this.initialize(group)
- local ad = display.newRect(group, _w * .5 , 0 + 25, 320, 50)
- ad:setFillColor(0.5)
- local slatebit = display.newText({parent = group, text = "Slatebit Studios", x = display.contentCenterX + 3, y = display.screenTop + 29, font = "Bitmap", fontSize = 36})
- slatebit:addEventListener("tap", function() system.openURL("http://www.slatebit.com/") end)
- -- if platformName == "Android" then ads.init("crossinstall", "####", onAd) -- use AdMob
- -- else
- ads.init("iads", "com.lavalevel.pixelcamera", onAd) -- end
- this.show()
- timer.performWithDelay(30000, this.show, 0) -- make only for iAd
- end
- return this
Advertisement
Add Comment
Please, Sign In to add comment