From 078eca583eec21d317e931c84db8f084bef4305d Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Wed, 22 Apr 2026 15:58:41 -0700 Subject: Snapshot --- animation.lua | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 animation.lua (limited to 'animation.lua') diff --git a/animation.lua b/animation.lua new file mode 100644 index 0000000..0f6fba6 --- /dev/null +++ b/animation.lua @@ -0,0 +1,8 @@ +function get_frame(anim, t, theta) + len = #anim.seq + frames_passed = (t / anim.dt) + idx = flr(1 + (frames_passed % len)) + dspritey = 0 + if theta == 1 then dspritey = 16 end + return anim.seq[idx] + dspritey +end \ No newline at end of file -- cgit v1.3