Feature/timer (#3)

* add timer component

* remov old components folder
This commit is contained in:
Maxim Tuprikov
2019-03-27 22:19:47 +03:00
committed by GitHub
parent f660476046
commit 3996ba4b04
16 changed files with 61 additions and 986 deletions

View File

@@ -13,4 +13,12 @@ function M.centrate_text_with_icon(text_node, icon_node)
gui.set_position(icon_node, pos_i)
end
function M.step(current, target, step)
if current < target then
return math.min(current + step, target)
else
return math.max(target, current - step)
end
end
return M