20 lines
No EOL
445 B
Lua
20 lines
No EOL
445 B
Lua
-- this module provides some helpful functions
|
|
-- for setting color!!
|
|
|
|
Color = class("Color")
|
|
|
|
function Color:initialize(inColor)
|
|
local r, g, b, a
|
|
if inColor == "red" then
|
|
r, g, b, a = 255, 0, 0, 255
|
|
elseif inColor == "green" then
|
|
r, g, b, a = 0, 255, 0, 255
|
|
elseif inColor == "blue" then
|
|
r, g, b, a = 0, 0, 255, 255
|
|
end
|
|
self.r, self.g, self.b, self.a = r, g, b, a
|
|
end
|
|
|
|
function Color:set()
|
|
return self.r, self.g, self.b, self.a
|
|
end |