/spacey

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

« back to all changes in this revision

Viewing changes to main.lua

  • Committer: Josh C
  • Date: 2013-05-13 21:25:26 UTC
  • Revision ID: josh@9ix.org-20130513212526-3q6md6n9xzhcmoa6
and that fixes the corner bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
vector = require 'vector'
7
7
 
8
8
require 'version'
 
9
require 'wrap_tile'
9
10
require 'player'
10
11
require 'enemy'
11
12
require 'cursor'
32
33
              --    end
33
34
              -- end
34
35
 
35
 
              local bg = Tile:new{
36
 
                 image = 'data/stars2.png',
37
 
                 width = 102400,
38
 
                 height = 76800,
39
 
                 x = -51200,
40
 
                 y = -38400
 
36
              the.bg = Tile:new{
 
37
                 image = 'data/stars3.png',
 
38
                 -- 1366x768 * 3
 
39
                 width = 4098,
 
40
                 height = 2304
41
41
              }
42
 
              self:add(bg)
 
42
              self:add(the.bg)
43
43
 
44
44
              --the.player = CrystalPlayer:new{x=400,y=300}
45
 
              the.player = SpacePlayer:new{x=400,y=300}
 
45
              the.player = SpacePlayer:new{x=1366,y=768}
46
46
              self:add(the.player)
47
47
 
48
48
              self:add(Enemy:new{x=400, y=300})
84
84
              if DEBUG then
85
85
                 self.console:watch('VERSION', 'VERSION')
86
86
                 self.console:watch('updateTook', 'the.updateTook')
 
87
                 self.console:watch('the.player.x', 'the.player.x')
 
88
                 self.console:watch('the.player.y', 'the.player.y')
 
89
                 self.console:watch('the.app.width', 'the.app.width')
 
90
                 self.console:watch('the.app.height', 'the.app.height')
87
91
                 --self.console:watch('drawTook', 'the.drawTook')
 
92
 
 
93
                 -- back off that dark overlay a bit
 
94
                 self.console.fill.fill[4] = 75
88
95
              end
89
96
           end,
90
97
   onUpdate = function (self, dt)