Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local lp = shell.resolve(".")
- local w,h = term.getSize()
- local t = w/2 - 3
- local y = h/2 - 3
- os.loadAPI(lp.."/gameutils")
- local updateRate = 0.3
- local fin = gameutils.loadAnimation(lp.."/.startup/fin.nfa", t, y, 1)
- fin.timerID = os.startTimer(updateRate)
- local function runGame()
- while true do
- term.setBackgroundColour(colours.lightGrey)
- term.clear()
- fin:draw()
- local id,key = os.pullEvent("timer")
- if fin:update(key) then
- fin.timerID = os.startTimer(updateRate)
- end
- if fin.currentFrame == fin.upperBound then
- term.setCursorPos(1,1)
- term.clear()
- --code
- return
- end
- end
- end
- runGame()
Advertisement
Add Comment
Please, Sign In to add comment