Rocket-Bytes/Source/Main.lua

27 lines
522 B
Lua
Raw Normal View History

2022-04-17 19:27:36 +00:00
import "CoreLibs/graphics"
import "CoreLibs/sprites"
import "Player"
2022-04-19 21:32:18 +00:00
import "Map"
gfx <const> = playdate.graphics
local disp <const> = playdate.display
2022-04-17 19:27:36 +00:00
local font <const> = gfx.font.new("gfx/font")
gfx.setFont(font)
gfx.setBackgroundColor(gfx.kColorBlack)
2022-04-19 21:32:18 +00:00
local song1 <const> = playdate.sound.sampleplayer.new("sfx/song1")
2022-04-17 19:27:36 +00:00
song1:play(0, 1)
addTiles("levels/level1.rocketbyte")
2022-04-17 19:27:36 +00:00
addPlayer(10,10)
2022-04-17 19:27:36 +00:00
function playdate.update()
2022-04-17 19:27:36 +00:00
updatePlayer()
2022-04-17 19:27:36 +00:00
gfx.clear(gfx.kColorBlack)
gfx.sprite.update()
drawTiles()
2022-04-17 19:27:36 +00:00
end