cleanup, add typings

This commit is contained in:
Jill 2022-09-23 19:26:31 +03:00
parent f6638b8f3e
commit e7d49fa562
2 changed files with 9 additions and 6 deletions

View File

@ -1,6 +0,0 @@
<ActorFrame Condition="(function() print('actorframe condition'); recursionc = (recursionc or 0) + 1; return recursionc < 4 end)()" InitCommand="%function(self) print('actorframe initcommand'); self:removecommand('Init') end">
<children>
<Layer Condition="(function() print('sprite condition'); return true end)()" InitCommand="%function(self) print('sprite initcommand'); self:removecommand('Init') end"/>
<Layer Condition="(function() print('file condition'); return true end)()" InitCommand="%function(self) print('file initcommand'); self:removecommand('Init') end" File="actorsTest.xml" />
</children>
</ActorFrame>

View File

@ -50,12 +50,21 @@ function ActorFrameTexture() end
---@return RageShaderProgram
--- Defines a shader. `frag` and `vert` can either be filenames or shader code.
function Shader(frag, vert) end
---@return ActorFrame
---@see addChild
--- Defines an ActorFrame. Add children to it with `addChild`.
function ActorFrame() end
---@param actor Actor
--- Resets an actor to its initial state
function reset(actor) end
resetActor = reset
---@param frame ActorFrame
---@param actor Actor
--- Adds a child to an ActorFrame. **Please be aware of the side-effects!**
function addChild(frame, actor) end
---@type number
--- A simple timer. Ticks upwards at a rate of 1/sec.
---