Skip to content

Commit

Permalink
stdlib.aft: aftSetup for convenience
Browse files Browse the repository at this point in the history
  • Loading branch information
oatmealine committed May 4, 2023
1 parent dcc4848 commit ee6c543
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
15 changes: 4 additions & 11 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 aft = ActorFrameTexture()

local aftSprite = Sprite()
aftSetup.sprite(aftSprite)
local aftlib = require('stdlib.aft')

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`
Expand Down
2 changes: 1 addition & 1 deletion template
Submodule template updated from 1bc360 to 215aab

0 comments on commit ee6c543

Please sign in to comment.