stdlib.aft: aftSetup for convenience
This commit is contained in:
parent
b34c18da8a
commit
6a0cb734db
|
@ -17,4 +17,15 @@ function self.aft(self)
|
||||||
self:Create()
|
self:Create()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function self.aftSetup()
|
||||||
|
local a = ActorFrameTexture()
|
||||||
|
local b = Sprite()
|
||||||
|
uranium.on('init', function()
|
||||||
|
self.aft(a)
|
||||||
|
self.sprite(b)
|
||||||
|
b:SetTexture(a:GetTexture())
|
||||||
|
end)
|
||||||
|
return a, b
|
||||||
|
end
|
||||||
|
|
||||||
return self
|
return self
|
|
@ -348,17 +348,17 @@ local function createGenericFunc(type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return Quad
|
|
||||||
--- Defines a Quad actor.
|
--- Defines a Quad actor.
|
||||||
|
---@type fun(): Quad
|
||||||
Quad = createGenericFunc('Quad')
|
Quad = createGenericFunc('Quad')
|
||||||
---@return ActorProxy
|
|
||||||
--- Defines an ActorProxy actor.
|
--- Defines an ActorProxy actor.
|
||||||
|
---@type fun(): ActorProxy
|
||||||
ActorProxy = createGenericFunc('ActorProxy')
|
ActorProxy = createGenericFunc('ActorProxy')
|
||||||
---@return Polygon
|
|
||||||
--- Defines a Polygon actor.
|
--- Defines a Polygon actor.
|
||||||
|
---@type fun(): Polygon
|
||||||
Polygon = createGenericFunc('Polygon')
|
Polygon = createGenericFunc('Polygon')
|
||||||
---@return ActorFrameTexture
|
|
||||||
--- Defines an ActorFrameTexture actor.
|
--- Defines an ActorFrameTexture actor.
|
||||||
|
---@type fun(): ActorFrameTexture
|
||||||
ActorFrameTexture = createGenericFunc('ActorFrameTexture')
|
ActorFrameTexture = createGenericFunc('ActorFrameTexture')
|
||||||
|
|
||||||
---@param file string | nil
|
---@param file string | nil
|
||||||
|
|
Loading…
Reference in New Issue