This commit is contained in:
0x81c 2015-03-11 20:11:29 -04:00
commit b4905845e6
148 changed files with 30049 additions and 0 deletions

20
color.lua Normal file
View file

@ -0,0 +1,20 @@
-- 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