NeutronLoved/scenes.lua

27 lines
853 B
Lua

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)
local background = game.objects.background:new(game,game:newImage("pattern.png"),30,15)
game:summon(background)
local background = game.objects.background:new(game,game:newImage("pattern2.png"),30,-15)
game:summon(background)
end
function scenes:ending(game,args)
game.gameloop = {}
local ending = game.objects.ending:new(game,args.winner)
game:summon(ending)
local background = game.objects.background:new(game,game:newImage("pattern.png"),30,15)
game:summon(background)
local background = game.objects.background:new(game,game:newImage("pattern2.png"),30,-15)
game:summon(background)
end
return scenes