stdlib.aft: aftSetup for convenience
This commit is contained in:
parent
dcc4848989
commit
ee6c543c57
15
MANUAL.md
15
MANUAL.md
|
@ -1095,20 +1095,13 @@ There's _a bit too many_ functions to document, so I'd recommend just looking th
|
|||
|
||||
### `aft`
|
||||
|
||||
An AFT setup library. Sets up sprites and AFTs with `sprite` and `aft`, respectively, making them ready for texturing use.
|
||||
An AFT setup library. Sets up sprites and AFTs with `sprite` and `aft`, or all-in-one with `aftSetup`, making them ready for texturing use.
|
||||
|
||||
```lua
|
||||
local aftSetup = require('stdlib.aft')
|
||||
local aftlib = require('stdlib.aft')
|
||||
|
||||
local aft = ActorFrameTexture()
|
||||
|
||||
local aftSprite = Sprite()
|
||||
aftSetup.sprite(aftSprite)
|
||||
|
||||
aft:addcommand('Init', function(self)
|
||||
aftSetup.aft(aft) -- put this here; else it'll recreate it every frame!
|
||||
aftSprite:SetTexture(self:GetTexture())
|
||||
end)
|
||||
-- aftSprite is a Sprite, set to the texture of aft, an ActorFrameTexture
|
||||
local aft, aftSprite = aftlib.aftSetup()
|
||||
```
|
||||
|
||||
### `noautplay`
|
||||
|
|
2
template
2
template
|
@ -1 +1 @@
|
|||
Subproject commit 1bc3604f9f0bfa1ba8c2f66fd59c7ec7cf553c7d
|
||||
Subproject commit 215aab41d3c974b94127f05f53eb0e77e4eff421
|
Loading…
Reference in New Issue