diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 19:08:49 -0500 | 
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2021-02-26 19:08:49 -0500 | 
| commit | c304defdd7b0c5a8bea83f2540c009ededd450cb (patch) | |
| tree | f959d12fe879c7d1d20eeb8689ee62a0aa073990 /res/scripts/common.lua | |
| parent | c1fc60c5a2a4b96b830afc29942648714944b9d7 (diff) | |
| download | tanetane-c304defdd7b0c5a8bea83f2540c009ededd450cb.tar.gz tanetane-c304defdd7b0c5a8bea83f2540c009ededd450cb.tar.bz2 tanetane-c304defdd7b0c5a8bea83f2540c009ededd450cb.zip | |
Added animation slowdown effect (for Lucas underwater)
Diffstat (limited to 'res/scripts/common.lua')
| -rw-r--r-- | res/scripts/common.lua | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 825d2e5..2a51419 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
| @@ -344,3 +344,12 @@ function StopBobbing(spriteName) | |||
| 344 | local sprite = getSprite(spriteId) | 344 | local sprite = getSprite(spriteId) | 
| 345 | sprite.bobsWhenNormal = false | 345 | sprite.bobsWhenNormal = false | 
| 346 | end | 346 | end | 
| 347 | |||
| 348 | --- Sets the animation slowdown for a sprite. | ||
| 349 | -- @param spriteName the alias of the sprite to modify | ||
| 350 | -- @param amount the number of animation frames needed to advance the sprite's animation (1 means the effect is disabled) | ||
| 351 | function SetAnimationSlowdown(spriteName, amount) | ||
| 352 | local spriteId = getSpriteByAlias(spriteName) | ||
| 353 | local sprite = getSprite(spriteId) | ||
| 354 | sprite.animSlowdown = amount | ||
| 355 | end | ||
