From b86c9427321c8e87d265aa5d0414afe6025cec35 Mon Sep 17 00:00:00 2001 From: "Jill \"oatmealine\" Monoids" Date: Mon, 17 Oct 2022 13:44:49 +0300 Subject: [PATCH] allow passing arguments through drawfunctions --- MANUAL.md | 17 +++++++++++++++++ template | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/MANUAL.md b/MANUAL.md index ab0594f..0a1ba1a 100644 --- a/MANUAL.md +++ b/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. +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` `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! diff --git a/template b/template index 9681b05..99f8ab7 160000 --- a/template +++ b/template @@ -1 +1 @@ -Subproject commit 9681b0538e69fc9255d38cce7d763c6b189ae421 +Subproject commit 99f8ab7f8bae6a95419881bb5dbe105c807ad3ba