allow passing arguments through drawfunctions
This commit is contained in:
parent
1086c87426
commit
b86c942732
17
MANUAL.md
17
MANUAL.md
|
@ -303,6 +303,23 @@ end
|
||||||
|
|
||||||
**Nested AFs are supported.** As with all complicated things in this template, check out the [`ActorFrame` example](#simple-actorframe-setup) for a simple working setup.
|
**Nested AFs are supported.** As with all complicated things in this template, check out the [`ActorFrame` example](#simple-actorframe-setup) for a simple working setup.
|
||||||
|
|
||||||
|
An additional extra feature Uranium Template adds to assist with rendering multiple instances is the ability to pass in arguments through `Draw()`:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
setDrawFunction(af, function(x, y)
|
||||||
|
quad:xy(x, y)
|
||||||
|
quad:Draw()
|
||||||
|
end)
|
||||||
|
|
||||||
|
function uranium.update()
|
||||||
|
for x = 0, 3 do
|
||||||
|
for y = 0, 3 do
|
||||||
|
af:Draw(x, y)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
#### `ActorScroller`
|
#### `ActorScroller`
|
||||||
|
|
||||||
`ActorFrame` already has an extremely, _extremely_ complicated setup powering it in the back-end; and `ActorScroller` is way too niche for me to give it the same treatment. Sorry!
|
`ActorFrame` already has an extremely, _extremely_ complicated setup powering it in the back-end; and `ActorScroller` is way too niche for me to give it the same treatment. Sorry!
|
||||||
|
|
2
template
2
template
|
@ -1 +1 @@
|
||||||
Subproject commit 9681b0538e69fc9255d38cce7d763c6b189ae421
|
Subproject commit 99f8ab7f8bae6a95419881bb5dbe105c807ad3ba
|
Loading…
Reference in New Issue