use class() in more places
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
Arrow = {}
|
||||
Arrow.type = "Arrow"
|
||||
Arrow.supertype = Entity.type
|
||||
Arrow.display = Animation:new(animation.kupo.arrow)
|
||||
setmetatable(Arrow, Entity)
|
||||
Arrow = class(Entity, {
|
||||
type = "Arrow",
|
||||
display = Animation:new(animation.kupo.arrow),
|
||||
})
|
||||
|
||||
|
||||
function Arrow:new(x,y,rotation,speed)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
CursedBook = {}
|
||||
CursedBook.type = "CursedBook"
|
||||
CursedBook.supertype = Entity.type
|
||||
CursedBook.display = Animation:new(animation.cursed_book.flying)
|
||||
setmetatable(CursedBook, Entity)
|
||||
CursedBook = class(Entity, {
|
||||
type = "CursedBook",
|
||||
display = Animation:new(animation.cursed_book.flying),
|
||||
})
|
||||
|
||||
function CursedBook:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Candelabra = {}
|
||||
Candelabra.type = "Candelabra"
|
||||
Candelabra.supertype = Decoration.type
|
||||
Candelabra.display = Animation:new(animation.decoration.candelabra)
|
||||
setmetatable(Candelabra, Decoration)
|
||||
Candelabra = class(Decoration, {
|
||||
type = "Candelabra",
|
||||
display = Animation:new(animation.decoration.candelabra),
|
||||
})
|
||||
|
||||
function Candelabra:new(x,y)
|
||||
local light_data = {}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Fairy = {}
|
||||
Fairy.type = "Fairy"
|
||||
Fairy.supertype = Entity.type
|
||||
Fairy.display = Animation:new(animation.fairy.flying)
|
||||
setmetatable(Fairy, Entity)
|
||||
Fairy = class(Entity, {
|
||||
type = "Fairy",
|
||||
display = Animation:new(animation.fairy.flying),
|
||||
})
|
||||
|
||||
function Fairy:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
HookAnchor = {}
|
||||
HookAnchor.type = "HookAnchor"
|
||||
HookAnchor.supertype = Entity.type
|
||||
HookAnchor.display = Animation:new(animation.fairy.flying)
|
||||
setmetatable(HookAnchor, Entity)
|
||||
HookAnchor = class(Entity, {
|
||||
type = "HookAnchor",
|
||||
display = Animation:new(animation.fairy.flying),
|
||||
})
|
||||
|
||||
function HookAnchor:new(x,y,hook_distance)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Kupo = {}
|
||||
Kupo.type = "Kupo"
|
||||
Kupo.supertype = Entity.type
|
||||
Kupo.display = Animation:new(animation.kupo.body)
|
||||
setmetatable(Kupo, Entity)
|
||||
Kupo = class(Entity, {
|
||||
type = "Kupo",
|
||||
display = Animation:new(animation.kupo.body),
|
||||
})
|
||||
|
||||
function Kupo:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
LoadedObjects.Particles = {}
|
||||
Particle = {}
|
||||
Particle.type = "Particle"
|
||||
Particle.supertype = Entity.type
|
||||
Particle.display = Animation:new(animation.particle.simple)
|
||||
setmetatable(Particle, Entity)
|
||||
Particle = class(Entity, {
|
||||
type = "Particle",
|
||||
display = Animation:new(animation.particle.simple),
|
||||
})
|
||||
|
||||
function Particle:new(x,y,particle_data)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Player = {}
|
||||
Player.type = "Player"
|
||||
Player.supertype = Entity.type
|
||||
Player.display = Animation:new(animation.nancy.idle)
|
||||
setmetatable(Player, Entity)
|
||||
Player = class(Entity, {
|
||||
type = "Player",
|
||||
display = Animation:new(animation.nancy.idle),
|
||||
})
|
||||
|
||||
function Player:new(x,y)
|
||||
local o = Entity:new(x,y)
|
||||
|
||||
Reference in New Issue
Block a user