summary refs log tree commit diff stats
path: root/res
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2021-07-05 10:39:06 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2021-07-05 10:39:06 -0400
commitd983ef6b8d66d916ed7502cf6d35b573c5366257 (patch)
tree2a98734180fc64f66a8623dc5c0d70b178e7b5af /res
parent35fffb8cf13258a4ff36a3bf56751e106c954a71 (diff)
downloadtanetane-d983ef6b8d66d916ed7502cf6d35b573c5366257.tar.gz
tanetane-d983ef6b8d66d916ed7502cf6d35b573c5366257.tar.bz2
tanetane-d983ef6b8d66d916ed7502cf6d35b573c5366257.zip
Added fading in/out sprites
Diffstat (limited to 'res')
-rw-r--r--res/scripts/common.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index e355a32..2e95f26 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua
@@ -423,6 +423,20 @@ function SetOpacity(spriteName, amount)
423 sprite.opacity = amount 423 sprite.opacity = amount
424end 424end
425 425
426--- Fades out the given sprite.
427function FadeOutSprite(spriteName)
428 local spriteId = getSpriteByAlias(spriteName)
429 local sprite = getSprite(spriteId)
430 sprite.shouldBeFadedIn = false
431end
432
433--- Fades out the given sprite.
434function FadeInSprite(spriteName)
435 local spriteId = getSpriteByAlias(spriteName)
436 local sprite = getSprite(spriteId)
437 sprite.shouldBeFadedIn = true
438end
439
426--- Sets the enclosure zone for a sprite. 440--- Sets the enclosure zone for a sprite.
427-- The sprite will be prevented from exiting the area defined by that zone. 441-- The sprite will be prevented from exiting the area defined by that zone.
428function AddEnclosureZone(spriteName, zone) 442function AddEnclosureZone(spriteName, zone)