bump chec~~

This commit is contained in:
0x81c 2015-03-16 07:39:54 -04:00
parent 0009355d04
commit 1c1ec291a7
153 changed files with 27 additions and 8 deletions

View file

@ -10,6 +10,7 @@ function Entity:initialize(t)
self.collision = t.collision --"none", "moveable", "unmoveable"
self.sprite = t.sprite
self.shaAmount = t.sha or 1
self.onBump = t.onBump or function() return true end
self.drawOffset = {x = 0, y = 0}
if self.size.w < 1 or self.size.h < 1 then
@ -122,4 +123,8 @@ end
function Entity:sha()
return math.random(-worldSha, worldSha) * .5
end
function Entity:bump()
return self.onBump()
end