/traderous

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-05-05 00:41:10 UTC
  • Revision ID: josh@9ix.org-20130505004110-hmcvz9payau6q0io
maxVelocity

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
require 'version'
8
8
require 'player'
9
 
require 'enemy'
10
 
require 'cursor'
11
 
 
12
 
util = {
13
 
   signOf = function(value)
14
 
               if value >= 0 then
15
 
                  return 1
16
 
               else
17
 
                  return -1
18
 
               end
19
 
            end
20
 
}
21
9
 
22
10
GameView = View:extend {
23
11
   onNew = function (self)
34
22
              the.player = SpacePlayer:new{x=400,y=300}
35
23
              self:add(the.player)
36
24
 
37
 
              self:add(Enemy:new{x=400, y=300})
38
 
 
39
 
              self:add(Cursor:new())
40
 
 
41
25
              love.mouse.setGrab(true)
42
 
              love.mouse.setVisible(false)
 
26
              --love.mouse.setVisible(false)
43
27
 
44
28
              --self:loadLayers('data/map.lua')
45
29
              self.focus = the.player