Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- var
- player = "O.o"
- plyColor = colors.blue
- underLayer = colors.black
- posX = 10
- posY = 2
- lvl1 = paintutils.loadImage("lvl1")
- function getNextPos()
- -- not now
- end
- while true do
- term.clear()
- paintutils.drawImage(lvl1,1,1)
- term.setBackgroundColor(plyColor)
- term.setCursorPos(posX,posY)
- print(player)
- term.setBackgroundColor(underLayer)
- local e, key, button = os.pullEvent("key")
- if key == 17 then
- posY = posY -1
- end
- if key == 31 then
- posY = posY +1
- end
- if key == 32 then
- posX = posX +1
- end
- if key == 30 then
- posX = posX -1
- end
- end
- -- legend
- -- 17 = W
- -- 32 = D
- -- 31 = S
- -- 30 = A
- -- char 7 = wall
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement