changed icon and fixed saving
|
@ -8,7 +8,7 @@ import "Saws"
|
||||||
import "Editor"
|
import "Editor"
|
||||||
|
|
||||||
mode = "menu"
|
mode = "menu"
|
||||||
map = "levels/level1.json"
|
map = "levels/saw.rocketbyte"
|
||||||
|
|
||||||
deaths = 0
|
deaths = 0
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ local tiles = {}
|
||||||
local x = gfx.sprite.new(tilemap)
|
local x = gfx.sprite.new(tilemap)
|
||||||
|
|
||||||
function addMapSave(_file)
|
function addMapSave(_file)
|
||||||
|
playdate.datastore.delete("savegame.json")
|
||||||
playdate.datastore.write({savedLevel=_file,savedDeaths=deaths},"savegame")
|
playdate.datastore.write({savedLevel=_file,savedDeaths=deaths},"savegame")
|
||||||
addMap(_file, false)
|
addMap(_file, false)
|
||||||
mode = "game"
|
mode = "game"
|
||||||
|
|
|
@ -153,7 +153,8 @@ function menuButtonPress(name)
|
||||||
|
|
||||||
elseif name == "START NEW GAME" or name == "CONFIRM" then
|
elseif name == "START NEW GAME" or name == "CONFIRM" then
|
||||||
deaths = 0
|
deaths = 0
|
||||||
addMapSave("levels/level.json")
|
map = "levels/level.rocketbyte"
|
||||||
|
addMapSave("levels/level.rocketbyte")
|
||||||
|
|
||||||
elseif name == "CONTINUE" then
|
elseif name == "CONTINUE" then
|
||||||
addMap(map)
|
addMap(map)
|
||||||
|
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1 +0,0 @@
|
||||||
frames = 1x4, 2x4, 3x4, 4x4
|
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |