fix epilepsy
This commit is contained in:
parent
e65a078fb6
commit
062ea9e6e0
14
main.lua
14
main.lua
@ -9,12 +9,21 @@ function love.conf(t)
|
||||
t.console = true
|
||||
end
|
||||
|
||||
local width = 30
|
||||
local height = 30
|
||||
function love.load()
|
||||
local char = character.spawn("Hero", "warrior", Tree.assets.files.sprites.character)
|
||||
char:runTo(Vec3 { 5, 5 })
|
||||
|
||||
Grass = Tree.assets.files.tiles.grass.atlas
|
||||
Gr1 = love.graphics.newQuad(0, 32, 32, 32, Grass)
|
||||
Tilemap = {}
|
||||
for y = 0, height - 1 do
|
||||
Tilemap[y] = {}
|
||||
for x = 0, width - 1 do
|
||||
Tilemap[y][x] = love.graphics.newQuad(math.random(0, 7) * 32, math.random(0, 7) * 32, 32, 32, Grass)
|
||||
end
|
||||
end
|
||||
|
||||
-- PlayerFaction.characters = { Hero1, Hero2 }
|
||||
love.window.setMode(1080, 720, { resizable = true, msaa = 4, vsync = true })
|
||||
@ -30,12 +39,9 @@ end
|
||||
function love.draw()
|
||||
Tree.level.camera:attach()
|
||||
|
||||
local width = 30
|
||||
local height = 30
|
||||
|
||||
for y = 0, height - 1 do
|
||||
for x = 0, width - 1 do
|
||||
love.graphics.draw(Grass, love.graphics.newQuad(math.random(0, 32), math.random(0, 32), 32, 32, Grass), x, y,
|
||||
love.graphics.draw(Grass, Tilemap[x][y], x, y,
|
||||
nil, 1 / 32, 1 / 32)
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user