basix
This commit is contained in:
commit
b4905845e6
148 changed files with 30049 additions and 0 deletions
20
color.lua
Normal file
20
color.lua
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue