/traderous

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

« back to all changes in this revision

Viewing changes to enemy.lua

  • Committer: Josh C
  • Date: 2013-06-23 02:06:35 UTC
  • Revision ID: josh@9ix.org-20130623020635-31ov2mbrb67xe0h0
more mirror cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-- player = 300 accel, 400 velLimit
2
2
local accelLimit = 150
3
 
local velLimit = 300
 
3
local velLimit = 200
4
4
Enemy = Tile:extend {
5
5
   image = 'data/enemy.png',
6
6
   maxVelocity = {x=velLimit,y=velLimit},
54
54
                           self.state = 'combat'
55
55
                           self.target = the.player
56
56
                        end
57
 
                     elseif pdist2 > (3 * the.app.width)^2 then
 
57
                     elseif pdist2 > (2 * the.app.width)^2 then
58
58
                        if self.state == 'combat' then
59
59
                           self.state = 'patrolling'
60
60
                           self:chooseTarget()