add setShader instead of using __raw

This commit is contained in:
Jill 2022-09-25 15:21:00 +03:00
parent 12edf6cb9a
commit 7b198abc55
2 changed files with 9 additions and 0 deletions

View File

@ -255,6 +255,11 @@
end)
end
function setShader(actor, shader)
if not shader.__raw then error('uranium: cannot set shader during module loadtime! put this in uranium.init or actor:addcommand(\'Init\', ...)', 2) end
actor:SetShader(shader.__raw)
end
-- actors
local actorQueue = {}

View File

@ -70,6 +70,10 @@ function addChild(frame, actor) end
--- SetDrawFunction with special behavior to account for Uranium's actor loading scheme.
function setDrawFunction(frame, func) end
---@param actor Actor
---@param shader RageShaderProgram
function setShader(actor, shader) end
---@type number
--- A simple timer. Ticks upwards at a rate of 1/sec.
---