monochrome
This commit is contained in:
parent
f963cd0aca
commit
cc2bcc08c5
1 changed files with 3 additions and 4 deletions
7
main.lua
7
main.lua
|
@ -4,7 +4,7 @@ function love.load()
|
|||
|
||||
fov = 30
|
||||
|
||||
love.graphics.setBackgroundColor(0.3, 0.3, 0.3, 1)
|
||||
love.graphics.setBackgroundColor(0, 0, 0, 1)
|
||||
love.window.setMode(1024, 512)
|
||||
|
||||
player = {}
|
||||
|
@ -91,7 +91,7 @@ function love.draw()
|
|||
end
|
||||
|
||||
function drawPlayer()
|
||||
love.graphics.setColor(1, 1, 0)
|
||||
love.graphics.setColor(1, 1, 1)
|
||||
love.graphics.rectangle("fill",
|
||||
player.x - player.size / 2, player.y - player.size / 2,
|
||||
player.size, player.size
|
||||
|
@ -229,16 +229,15 @@ function drawRays3D()
|
|||
ray.x = vx
|
||||
ray.y = vy
|
||||
disT = disV
|
||||
love.graphics.setColor(0.9, 0, 0)
|
||||
end
|
||||
|
||||
if disH < disV then
|
||||
ray.x = hx
|
||||
ray.y = hy
|
||||
disT = disH
|
||||
love.graphics.setColor(0.7, 0, 0)
|
||||
end
|
||||
|
||||
love.graphics.setColor(1, 1, 1)
|
||||
love.graphics.setLineWidth(1)
|
||||
love.graphics.line(
|
||||
player.x, player.y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue