Skip to content

Commit

Permalink
show fps and better title
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Dec 17, 2012
1 parent 6dfe2a4 commit 2ab33ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conf.moon
Expand Up @@ -2,5 +2,5 @@
love.conf = (t) ->
t.screen.width = 800
t.screen.height = 450
t.title = "LD25"
t.title = "X-Moon by leafo - Ludum Dare 25"
t.author = "leafo"
8 changes: 6 additions & 2 deletions main.moon
Expand Up @@ -133,6 +133,7 @@ class Game
}

paused: false
show_fps: false

new: =>
@player = Player 100, 100, @
Expand All @@ -151,8 +152,9 @@ class Game

draw: =>
@world\draw!
g.scale 2
p tostring(timer.getFPS!), 2, 50
if @show_fps
g.scale 2
p tostring(timer.getFPS!), 2, 50

update: (dt) =>
return if dt > 0.5
Expand Down Expand Up @@ -190,6 +192,8 @@ class Game
@paused = not @paused
when "f1"
.disable_project = not .disable_project
when "f3"
@show_fps = not @show_fps
false

mousepressed: (x,y, btn) =>
Expand Down

0 comments on commit 2ab33ab

Please sign in to comment.