forked from pyrex/chameleonic
Golf level selector
This commit is contained in:
parent
137a390b65
commit
9fbccee378
@ -192,11 +192,7 @@ end
|
|||||||
title={}
|
title={}
|
||||||
add(modules,title)
|
add(modules,title)
|
||||||
|
|
||||||
function title:init()
|
blinkcol=10
|
||||||
end
|
|
||||||
|
|
||||||
blinkcol = 10
|
|
||||||
|
|
||||||
function title:draw()
|
function title:draw()
|
||||||
cls(0)
|
cls(0)
|
||||||
-- this is right for 72x32
|
-- this is right for 72x32
|
||||||
@ -209,29 +205,18 @@ function title:draw()
|
|||||||
print(lvlstr,51,90,blinkcol)
|
print(lvlstr,51,90,blinkcol)
|
||||||
end
|
end
|
||||||
|
|
||||||
start_level = 0
|
start_level=0
|
||||||
max_level=15
|
max_level=15
|
||||||
|
|
||||||
function title:update()
|
function title:update()
|
||||||
if time()*4\1%2==0 then
|
blinkcol=9
|
||||||
blinkcol=10
|
if (time()*4\1%2==0) blinkcol=10
|
||||||
else
|
|
||||||
blinkcol=9
|
|
||||||
end
|
|
||||||
|
|
||||||
if btnp(0) then
|
if (btnp"0") start_level-=1
|
||||||
start_level -= 1
|
if (btnp"1") start_level+=1
|
||||||
if (start_level<0) start_level=max_level
|
start_level%=max_level
|
||||||
end
|
|
||||||
if btnp(1) then
|
if (btnp"4" or btnp"5") modules=real_modules _init() music(0)
|
||||||
start_level += 1
|
|
||||||
if (start_level>max_level) start_level=0
|
|
||||||
end
|
|
||||||
if btnp(4) or btnp(5) then
|
|
||||||
modules=real_modules
|
|
||||||
_init()
|
|
||||||
music(0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-->8
|
-->8
|
||||||
|
Loading…
Reference in New Issue
Block a user