/zoeplat

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

« back to all changes in this revision

Viewing changes to zoetrope/core/sprite.lua

  • Committer: Josh C
  • Date: 2013-04-22 20:42:06 UTC
  • Revision ID: josh@9ix.org-20130422204206-of4wo7sulpkp0pft
stop build from dropping backup files EVERYWHERE

Show diffs side-by-side

added added

removed removed

Lines of Context:
373
373
 
374
374
                -- physics
375
375
                        
 
376
                if vel.x ~= 0 then self.x = self.x + vel.x * elapsed end
 
377
                if vel.y ~= 0 then self.y = self.y + vel.y * elapsed end
 
378
                if vel.rotation ~= 0 then self.rotation = self.rotation + vel.rotation * elapsed end
 
379
                
376
380
                if acc.x and acc.x ~= 0 then
377
381
                        vel.x = vel.x + acc.x * elapsed
378
382
                else
421
425
                if maxVel.y and vel.y > maxVel.y then vel.y = maxVel.y end
422
426
                if minVel.rotation and vel.rotation < minVel.rotation then vel.rotation = minVel.rotation end
423
427
                if maxVel.rotation and vel.rotation > maxVel.rotation then vel.rotation = maxVel.rotation end
424
 
 
425
 
                if vel.x ~= 0 then self.x = self.x + vel.x * elapsed end
426
 
                if vel.y ~= 0 then self.y = self.y + vel.y * elapsed end
427
 
                if vel.rotation ~= 0 then self.rotation = self.rotation + vel.rotation * elapsed end
428
 
 
 
428
                
429
429
                if self.onUpdate then self:onUpdate(elapsed) end
430
430
        end,
431
431