Make games on your phone.
Get the app!
AndroidiOS
Castle
1 Comments
Next up
Castle Tutorial #1: Custom Colors #cli #tutorial #castle #something550 #fullcolor #fullcolors #customcolour
LUA CODE: function rect(x, y, w, h, r, g, b) castle.draw.setColor(r, g, b, 1) castle.draw.rectangle("fill", x, y, w, h) end function onDraw() -- 1:1 area local x = -0.5 local y = -0.5 local w = 5 local h = 1 local barW = w / 5 -- Top bars local topH = h * 1 rect(x + barW*0, y, barW, topH, 0.??, 0.??, 0.??) end - the "??" are for you to fill with numbers.
Reply