Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI(shell.resolve(".").."/gameutils")
- local obj1 = gameutils.loadAnimation(
- shell.resolve(".").."/flame.nfa", 1, 1, 1)
- gameutils.initializeBuffer()
- while true do
- gameutils.clearBuffer(colours.black)
- gameutils.writeToBuffer(obj1)
- gameutils.drawBuffer()
- local _,key = os.pullEvent("key")
- if key == keys.left then
- obj1.x = obj1.x - 1
- elseif key == keys.right then
- obj1.x = obj1.x + 1
- elseif key == keys.up then
- obj1.y = obj1.y - 1
- elseif key == keys.down then
- obj1.y = obj1.y + 1
- elseif key == keys.q then
- break
- end
- term.setBackgroundColour(colours.black)
- shell.run("clear")
- sleep(0.1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement