# HG changeset patch # User Wuzzy # Date 1687355808 0 # Node ID de14b46c7c16c39796e24745a1352d2c26acbe27 # Parent fdd314eb697f3e7d2d58e5155022187c358621fe LuaLibraryAnimate: Rename cinem variable to animation diff -r fdd314eb697f -r de14b46c7c16 LuaLibraryAnimate.wiki --- a/LuaLibraryAnimate.wiki Wed Jun 21 13:54:38 2023 +0000 +++ b/LuaLibraryAnimate.wiki Wed Jun 21 13:56:48 2023 +0000 @@ -125,12 +125,12 @@ Example: -- Makes myHog say "Snails! SNAILS!, wait 3 seconds, move it to the left until its X coordinate equals 2000, then show the caption "But he found no more snails ..." -cinem = { +animation = { {func = AnimSay, args = {myHog, "Snails! SNAILS!", SAY_SAY, 3000}}, {func = AnimMove, args = {myHog, "Left", 2000, 0}}, {func = AddCaption, swh = false, args = {"But he found no more snails ..."}} } -AddAnim(cinem) +AddAnim(animation) ==== `RemoveAnim(animation)` ==== Removes `animation` from the animation list. @@ -138,7 +138,7 @@ ==== `AddSkipFunction(animation, func, args)` ==== Adds `func` to the array of functions used to skip animations, associating it with `animation`. When the animation is skipped (see below), the function is called with `args` as arguments. Example: -AddSkipFunc(cinem, SkipCinem, {}) +AddSkipFunc(animation, myAnimationSkipFunction, {}) ==== `RemoveSkipFunction(animation)` ==== Removes the skip function associated with `animation`. @@ -165,7 +165,7 @@ Adds `element` to the functions array that are to be called after the animation. `element` is a table with the keys: `func`, `args`. Example: -AddFunction({func = AfterCinem, args = {2}}) +AddFunction({func = myAfterAnim, args = {2}}) ==== `RemoveFunction()` ==== Removes the first function from the aforementioned list. @@ -205,10 +205,10 @@ Calls `HogSay` with the first three arguments and increases the wait time by `time`. Example: -cinem = { +animation = { {func = AnimSay, args = {gear1, "You're so defensive!", SAY_SAY, 2500}}, {func = AnimSay, args = {gear2, "No, I'm not!", SAY_SAY, 2000}} - } +} ==== `AnimSound(gear, sound, time)` ==== Plays the sound `sound` and increases the wait time by `time`. @@ -260,7 +260,7 @@ end end -cinem = {{func = AnimCustomFunction, args = {hog1, NeedToTurn, {hog1, hog2}}}} +animation = {{func = AnimCustomFunction, args = {hog1, NeedToTurn, {hog1, hog2}}}} === Event handling ===