Love:Mike: cleaned up formatting

This commit is contained in:
2017-08-10 10:59:40 -07:00
parent ea0bf0a56c
commit 23bbad4f2b
4 changed files with 12 additions and 31 deletions

View File

@@ -18,7 +18,7 @@ function love.load()
actors.ball.y_speed = (-actors.ball.speed /2)
actors.ball.score = 0
-- Timer vars (see keys.lua for loaded timer vars)
actors.start = love.timer.getTime()
actors.end_timer = 0
end
@@ -30,21 +30,21 @@ function love.update(dt)
end
function love.draw()
--Draw paddle
-- Draw paddle
love.graphics.setColor(255,255,255)
love.graphics.rectangle("line", actors.player.x, actors.player.y,
actors.player.width, actors.player.height)
--Draw ball
-- Draw ball
love.graphics.setColor(255,0,0)
love.graphics.circle("line", actors.ball.x, actors.ball.y,
actors.ball.width, actors.ball.height)
--FPS counter
-- FPS counter
love.graphics.setColor(128,72,25)
love.graphics.print("FPS: "..tostring(love.timer.getFPS( )), 10, 10)
--Ball Score
-- Ball Score
love.graphics.setColor(255,0,0)
love.graphics.print("Score: "..actors.ball.score, screen.width -80, 10)
--Timer
-- Timer
love.graphics.setColor(125,42,19)
love.graphics.print(string.format("Time M: %.2f", actors.end_timer/60), screen.width -85, 50)
love.graphics.print(string.format("Time S: %.2f", actors.end_timer), screen.width -85, 30)