erste programme
This commit is contained in:
47
cards/test.p8
Normal file
47
cards/test.p8
Normal file
@@ -0,0 +1,47 @@
|
||||
pico-8 cartridge // http://www.pico-8.com
|
||||
version 43
|
||||
__lua__
|
||||
-- main program block
|
||||
|
||||
function _init()
|
||||
mode = 1
|
||||
end
|
||||
|
||||
function _update()
|
||||
if (mode == 1) then
|
||||
if (btnp(5)) mode = 2
|
||||
elseif (mode == 2) then
|
||||
if (btnp(5)) mode = 3
|
||||
end
|
||||
end
|
||||
|
||||
function _draw()
|
||||
cls()
|
||||
if (mode == 1) then
|
||||
title()
|
||||
elseif (mode == 2) then
|
||||
print("press 'x' to win")
|
||||
else
|
||||
end_screen()
|
||||
end
|
||||
end
|
||||
|
||||
function title()
|
||||
x=60
|
||||
y=60
|
||||
print("press 'x' to start game")
|
||||
print("\^o8ffhello world",x,y,10)
|
||||
end
|
||||
|
||||
function end_screen()
|
||||
print("a winner is you")
|
||||
end
|
||||
|
||||
|
||||
__gfx__
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00077000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
00700700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
Reference in New Issue
Block a user