Update 'mode'

2022-02-18 19:16:12 +01:00
parent f4c6e26ca8
commit fc04b6d7ab

12
mode.md

@@ -1,26 +1,26 @@
# mode(m) # mode(num)
Especifica el [mode gràfic](modegrafic). Especifica el [mode gràfic](modegrafic).
### Paràmetres ### Paràmetres
`m` `num`
Un nombre del 0 al 2. Un nombre del 0 al 2.
### Exemple ### Exemple
``` ```
function init() function init()
m=0 num=0
end end
function update() function update()
cls() cls()
print("Estas en el mode "..m,0,0) print("Estas en el mode "..num,0,0)
print("Pulsa espai per a",0,2) print("Pulsa espai per a",0,2)
print("canviar de mode.",0,3) print("canviar de mode.",0,3)
if btnp(KEY_SPACE) then if btnp(KEY_SPACE) then
m = (m+1) % 3 num = (num+1) % 3
mode(m) mode(num)
end end
end end
``` ```