2022-03-04 14:03:06 +01:00
|
|
|
local scenes = {}
|
|
|
|
|
|
|
|
function scenes:main(game)
|
|
|
|
game.gameloop = {}
|
|
|
|
local cellsize = 44
|
|
|
|
local x = (game.WIDTH-cellsize*5)/2
|
|
|
|
local y = (game.HEIGHT-cellsize*5)/2
|
|
|
|
local grid = game.objects.grid:new(game,x,y,cellsize)
|
|
|
|
game:summon(grid)
|
2022-03-04 14:57:05 +01:00
|
|
|
local background = game.objects.background:new(game,game:newImage("pattern.png"))
|
|
|
|
game:summon(background)
|
2022-03-04 14:03:06 +01:00
|
|
|
end
|
|
|
|
|
2022-03-04 14:34:54 +01:00
|
|
|
function scenes:ending(game,winner)
|
|
|
|
game.gameloop = {}
|
|
|
|
local ending = game.objects.ending:new(game,winner)
|
|
|
|
game:summon(ending)
|
2022-03-04 14:57:05 +01:00
|
|
|
local background = game.objects.background:new(game,game:newImage("pattern.png"))
|
|
|
|
game:summon(background)
|
2022-03-04 14:34:54 +01:00
|
|
|
end
|
|
|
|
|
2022-03-04 14:03:06 +01:00
|
|
|
return scenes
|