Difference between revisions of "Lua for TIC80"
Jump to navigation
Jump to search
(→for) |
(→for) |
||
Line 16: | Line 16: | ||
== for == | == for == | ||
+ | |||
+ | [[File:tic80-forloop.png|frame]] | ||
+ | |||
See: https://www.lua.org/pil/4.3.4.html | See: https://www.lua.org/pil/4.3.4.html | ||
Line 28: | Line 31: | ||
end | end | ||
</source> | </source> | ||
− | |||
− | |||
== function == | == function == |
Revision as of 22:21, 31 January 2021
Contents
tables
if
See: https://www.lua.org/pil/4.3.1.html
if btn(0) then
t=t+1
elseif btn(1) then
t=t-1
end
for
See: https://www.lua.org/pil/4.3.4.html
function TIC()
cls(0)
for i=1,100,2 do
rect(0,0,i,i,i%16)
end
end