Compare commits

...

1 Commits
cport ... main

Author SHA1 Message Date
25b0d8533e Start implementing I/O for level data. 2023-10-06 19:42:22 -04:00

View File

@ -4,13 +4,24 @@
import "CoreLibs/object" import "CoreLibs/object"
import "entity" import "entity"
local yaml = import "lib/lyaml"
local gfx <const> = playdate.graphics local gfx <const> = playdate.graphics
local geom <const> = playdate.geometry local geom <const> = playdate.geometry
class("Wave").extends() class("Wave").extends()
function Wave.new() -- returns a new Wave by loading in and parsing the wave data at path
function Wave.new(path)
local w = Wave() local w = Wave()
local file = io.open(path)
if not file then return nil end
local data = yaml.load(file.read("*a"))
for e in data.entities do
-- tk
end
return w return w
end end