
Re: [LUA] SHOT BART V 2.9
Je pense que si tu savais ( Ou tu sais peut être actuellement ) , que ton menu est un peu "nul" .
Je te propose de mettre des conditions de ce type là .
Regarde un menu plus correct
Code :
menu1 = Image.load("images/menu1.png")
menu2 = Image.load("images/menu2.png")
menu3 = Image.load("images/menu3.png")
credits = Image.load("images/credits.png")
statut = 1
oldpad = Controls.read()
while true do
screen:clear()
pad = Controls.read()
System.memclean()
if System.memclean() then
menu1= nil
menu2 = nil
menu3 = nil
credits = nil
end
System.memclean()
collectgarbage()
if pad:up() and oldpad:up() ~= pad:up() and statut > 1 then
statut = statut - 1
end
if pad:down() and oldpad:down() ~= pad:down() and statut < 3 then
statut = statut + 1
end
if statut == 1 then
screen:blit(0,0,menu1)
end
if statut == 2 then
screen:blit(0,0,menu2)
if pad:cross() and oldpad:cross() ~= pad:cross() then
statut = 4
end
end
if statut == 4 then
screen:blit(0,0,credits)
end
if statut == 3 then
screen:blit(0,0,menu3)
if pad:cross() and oldpad:cross() ~= pad:cross() then
System.memclean()
System.Quit()
end
end
collectgarbage()
oldpad = pad
screen.waitVblankStart()
screen.flip()
end