add dialog
This commit is contained in:
parent
c92c0f6ff7
commit
5413823b26
13 changed files with 390 additions and 32 deletions
|
|
@ -16,7 +16,9 @@ function Entity:initialize(t)
|
|||
self.collision = t.collision --"none", "moveable", "unmoveable"
|
||||
self.sprite = repSprite
|
||||
self.shaAmount = t.sha or 1
|
||||
self.onBump = t.onBump or function(self) return true end
|
||||
-- onBump is a method (see Entity:onBump) so mixins like Dialogable can
|
||||
-- override it; a per-instance t.onBump still wins when supplied.
|
||||
if t.onBump then self.onBump = t.onBump end
|
||||
self.tick = t.tick or function(self) return true end
|
||||
|
||||
self.drawOffset = {x = 0, y = 0}
|
||||
|
|
@ -163,6 +165,10 @@ function Entity:sha()
|
|||
return math.random(-worldSha, worldSha) * .125 * drawScale
|
||||
end
|
||||
|
||||
function Entity:onBump()
|
||||
return true
|
||||
end
|
||||
|
||||
function Entity:bump()
|
||||
return self:onBump()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue