meat tables + factory creation
This commit is contained in:
parent
e52e10c0c8
commit
eb1a82d1f3
12 changed files with 161 additions and 16 deletions
21
meat.lua
Normal file
21
meat.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
-- meat.lua
|
||||
Meat = {}
|
||||
Meat.__index = Meat
|
||||
|
||||
function Meat:new()
|
||||
local instance = setmetatable({}, Meat)
|
||||
instance.meatType = ""
|
||||
instance.images = {}
|
||||
instance.scorePending = false
|
||||
instance.value = 1
|
||||
return instance
|
||||
end
|
||||
|
||||
function Meat:loadImages()
|
||||
self.images.chicken = love.graphics.newImage("assets/images/meats/chicken.png")
|
||||
self.images.pig = love.graphics.newImage("assets/images/meats/pig.png")
|
||||
self.images.cow = love.graphics.newImage("assets/images/meats/cow.png")
|
||||
self.currentImage = self.images.chicken
|
||||
end
|
||||
|
||||
return Meat
|
||||
Loading…
Add table
Add a link
Reference in a new issue