Add spiky box variants
This commit is contained in:
parent
761214fe3e
commit
c3a2692351
10 changed files with 340 additions and 19 deletions
5
room.lua
5
room.lua
|
|
@ -12,6 +12,7 @@ require "dialogue_manager"
|
|||
require "generic_moveable"
|
||||
require "generic_sticky"
|
||||
require "generic_skewer"
|
||||
require "generic_spiky"
|
||||
require "generic_unmoveable"
|
||||
|
||||
local Movement = require "movement"
|
||||
|
|
@ -465,7 +466,7 @@ end
|
|||
|
||||
-- Instantiate one object from the flat {class,color,x,y} schema. `class` names an
|
||||
-- art asset, and its .meta declares the behaviour ("door"/"switch"/"player"/
|
||||
-- "moveable"/"sticky"/"skewer"); anything without a .meta defaults to immoveable. npc is the one
|
||||
-- "moveable"/"sticky"/"skewer"/"spiky"); anything without a .meta defaults to immoveable. npc is the one
|
||||
-- keyword handled directly since it has no art.
|
||||
function Room:createEntity(class, color, x, y)
|
||||
if class == "npc" then
|
||||
|
|
@ -509,6 +510,8 @@ function Room:createEntity(class, color, x, y)
|
|||
entity = GenericSticky:new(x, y, color, sprite, class, cellShape)
|
||||
elseif behavior == "skewer" then
|
||||
entity = GenericSkewer:new(x, y, color, sprite, class, cellShape)
|
||||
elseif behavior == "spiky" then
|
||||
entity = GenericSpiky:new(x, y, color, sprite, class, cellShape)
|
||||
else
|
||||
entity = GenericUnmoveable:new(x, y, color, sprite, cellShape)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue