aboutsummaryrefslogtreecommitdiff
path: root/main.lua
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-04-30 21:50:07 -0700
committer1029chris <1029chris@gmail.com>2016-04-30 21:50:07 -0700
commit9cbb6fa487c4e87085c1e32269ce671e99760b44 (patch)
treef7056cc4e2abe913f26d82a6c09d81a7876de611 /main.lua
parent0b95f7b3e6531d599d705fb8692d86fc0abb45d6 (diff)
Added more to the fight
ship explodes at 20 health fight stops at 0 health other fixes refresh rate adjustments
Diffstat (limited to 'main.lua')
-rw-r--r--main.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 1c1d836..4e87380 100644
--- a/main.lua
+++ b/main.lua
@@ -37,6 +37,8 @@ end
function love.update(dt)
delta = dt
time = time + dt
+ fps = love.timer.getFPS()
+ sys.s = 60/fps
sys.w = love.graphics.getWidth()
sys.h = love.graphics.getHeight()
minim = love.graphics.getHeight()+10
@@ -77,6 +79,10 @@ function love.keyreleased(key)
if key == "f11" then
v1.c.chat.msgs = v1.c.chat.msgs + 1
end
+ if key == "f10" then
+ v1.c.health = v1.c.health - 5
+ v1.spm = v1.spm + 0.25*(sys.h/1080)
+ end
end
function love.mousereleased(x, y, button)
sys.mouse.p.p = false