fix state thigns and port to love11
This commit is contained in:
parent
ff5abf6bcd
commit
c92c0f6ff7
11 changed files with 130 additions and 96 deletions
11
color.lua
11
color.lua
|
|
@ -4,10 +4,11 @@
|
|||
Color = class("Color")
|
||||
|
||||
Color.static.list = {
|
||||
red = {r = 255, g = 0, b = 0, a = 255},
|
||||
green = {r = 0, g = 255, b = 0, a = 255},
|
||||
blue = {r = 0, g = 0, b = 255, a = 255},
|
||||
white = {r = 255, g = 255, b = 255, a = 255}
|
||||
-- LÖVE 11 represents color components as normalized floats, not bytes.
|
||||
red = {r = 1, g = 0, b = 0, a = 1},
|
||||
green = {r = 0, g = 1, b = 0, a = 1},
|
||||
blue = {r = 0, g = 0, b = 1, a = 1},
|
||||
white = {r = 1, g = 1, b = 1, a = 1}
|
||||
}
|
||||
|
||||
function Color:initialize(inColor)
|
||||
|
|
@ -27,4 +28,4 @@ end
|
|||
function randomColor()
|
||||
local colors = {"red", "green", "blue"}
|
||||
return colors[math.random(1, 3)]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue