/traderous

To get this branch, use:
bzr branch http://9ix.org/bzr/traderous

« back to all changes in this revision

Viewing changes to player.lua

  • Committer: Josh C
  • Date: 2013-05-20 17:54:50 UTC
  • Revision ID: josh@9ix.org-20130520175450-1p2jpuadg24xutlk
some instructions at game over

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
 
73
73
                     self:die()
74
74
 
75
 
                     local over = Text:new{
76
 
                        y = self.y,
77
 
                        x = self.x - the.app.width / 2,
78
 
                        width = the.app.width,
79
 
                        align = 'center',
80
 
                        font = 25,
81
 
                        text = "Game Over" }
82
 
                     the.app.view:add(over)
 
75
                     the.over.visible = true
 
76
                     the.instructions.visible = true
 
77
                     the.app.view:updateScore()
 
78
 
 
79
                     local score = love.timer.getTime() - the.app.view.gameStart
 
80
                     if score > the.storage.data.highScore then
 
81
                        the.storage.data.highScore = score
 
82
                        the.storage:save()
 
83
 
 
84
                        the.highScore.text = string.format(
 
85
                           'High Score: %d:%02d', score / 60, score % 60
 
86
                        )
 
87
                     end
83
88
                  end
84
89
               end
85
90
}
 
 
b'\\ No newline at end of file'