stdlib.aft: aftSetup for convenience

This commit is contained in:
Jill 2023-05-04 22:10:23 +03:00
parent dcc4848989
commit ee6c543c57
Signed by: oat
GPG Key ID: 33489AA58A955108
2 changed files with 5 additions and 12 deletions

View File

@ -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`

@ -1 +1 @@
Subproject commit 1bc3604f9f0bfa1ba8c2f66fd59c7ec7cf553c7d
Subproject commit 215aab41d3c974b94127f05f53eb0e77e4eff421