Add directional sticky and skewer box variants
This commit is contained in:
parent
c3f5aafd77
commit
f549eaf523
13 changed files with 723 additions and 101 deletions
10
entity.lua
10
entity.lua
|
|
@ -14,6 +14,8 @@ function Entity:initialize(t)
|
|||
self.name = t.name
|
||||
self.color = Color:new(t.color)
|
||||
self.collision = t.collision --"none", "moveable", "unmoveable"
|
||||
self.sticky = t.sticky or false
|
||||
self.skewer = t.skewer or false
|
||||
self.sprite = repSprite
|
||||
self.shaAmount = t.sha or 1
|
||||
-- onBump is a method (see Entity:onBump) so mixins like Dialogable can
|
||||
|
|
@ -134,6 +136,14 @@ function Entity:canMove()
|
|||
return false
|
||||
end
|
||||
|
||||
function Entity:isSticky()
|
||||
return self.sticky
|
||||
end
|
||||
|
||||
function Entity:isSkewer()
|
||||
return self.skewer
|
||||
end
|
||||
|
||||
function Entity:canPassOver()
|
||||
if self:getCollision() == "none" then
|
||||
return true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue