From 47d1c9192e4050b05dfa26aab57fbe8f6655fb80 Mon Sep 17 00:00:00 2001 From: Logen Kain Date: Tue, 25 Jul 2017 21:47:00 -0700 Subject: [PATCH] mike: Added colors; made ball a ball --- love/mike/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/love/mike/main.lua b/love/mike/main.lua index 434af52..cb05039 100644 --- a/love/mike/main.lua +++ b/love/mike/main.lua @@ -15,7 +15,7 @@ function love.load() -- Create a table to hold all the player data actors.player = create_object(screen.width /2, screen.height - 50, 30, 5, 500) -- Create a table to hold ball data - actors.ball = create_object(screen.width /2, screen.height /2, 1, 1, 600) + actors.ball = create_object(screen.width /2, screen.height /2, 5, 10, 600) actors.ball.x_speed = (actors.ball.speed /2) actors.ball.y_speed = (actors.ball.speed /2) @@ -29,10 +29,12 @@ end function love.draw() --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 - love.graphics.rectangle("line", actors.ball.x, actors.ball.y, + love.graphics.setColor(255,0,0) + love.graphics.circle("line", actors.ball.x, actors.ball.y, actors.ball.width, actors.ball.height) --FPS counter love.graphics.print("FPS: "..tostring(love.timer.getFPS( )), 10, 10)