I know there are a lot of game templates out there. Is anyone aware of one (paid or otherwise) that provides a level selection scheme like angry birds? By this I mean the ability to initially display a locked graphic for each level not yet completed and... then unlock each level as it is completed. Perhapse even display a number of stars to indicate how well the player did on the level.
Thanks!
Tim
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Game Template Wanted: Angry Bird Level Structure/Menu
It's very easy. This code come from my olllldd game :) First you need some data container:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | require "sqlite3" require "toggle" local path = system.pathForFile("thegolfwar.db", system.DocumentsDirectory) db = sqlite3.open( path ) local function onSystemEvent( event ) if( event.type == "applicationExit" ) then db:close() end end --Setup the table if it doesn't exist local tablesetup = [[CREATE TABLE IF NOT EXISTS audio (id INTEGER PRIMARY KEY, wartosc);]] local pointsStore = [[CREATE TABLE IF NOT EXISTS points (id INTEGER PRIMARY KEY, current, best);]] db:exec( tablesetup ) db:exec( pointsStore ) --First time sound init local soundInit = function() local row_inConfig_count = 0 for row in db:nrows('SELECT * FROM audio') do row_inConfig_count = row_inConfig_count + 1 end local audioStartConfig = [[INSERT INTO audio VALUES(1, 1);]] if (row_inConfig_count == 0) then db:exec( audioStartConfig ) for i=1,36 do local pointsStoreInit = [[INSERT INTO points VALUES(']]..i..[[', 0, 0);]] db:exec( pointsStoreInit ) end end end |
Thanks gtatarkin! I appreciate you taking the time to share that.
Tim
thanks gata ,it's great for me.
views:1565 update:2012/2/9 11:37:26
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
WebService
Omniblaster - My first iPhone game/app is now "In Review" at the App Store
using Director makes global variables not visible to external modules?
BIG PROJECT!!
MiniFono toy phone for toddlers 1.1
Per object gravity?
Adding Mobclix as an ad provider in Corona Ad SDK
Build for ARMv6 with old version
Mobile Couchbase (NoSQL) for Corona?
Corona.243 builds and % CPU
Omniblaster - My first iPhone game/app is now "In Review" at the App Store
using Director makes global variables not visible to external modules?
BIG PROJECT!!
MiniFono toy phone for toddlers 1.1
Per object gravity?
Adding Mobclix as an ad provider in Corona Ad SDK
Build for ARMv6 with old version
Mobile Couchbase (NoSQL) for Corona?
Corona.243 builds and % CPU
corona forums © 2003-2011