fix epilepsy

This commit is contained in:
PeaAshMeter 2025-08-11 03:04:39 +03:00
parent e65a078fb6
commit 062ea9e6e0

View File

@ -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