diff options
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 14 |
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 |
424 | end | 424 | end |
425 | 425 | ||
426 | --- Fades out the given sprite. | ||
427 | function FadeOutSprite(spriteName) | ||
428 | local spriteId = getSpriteByAlias(spriteName) | ||
429 | local sprite = getSprite(spriteId) | ||
430 | sprite.shouldBeFadedIn = false | ||
431 | end | ||
432 | |||
433 | --- Fades out the given sprite. | ||
434 | function FadeInSprite(spriteName) | ||
435 | local spriteId = getSpriteByAlias(spriteName) | ||
436 | local sprite = getSprite(spriteId) | ||
437 | sprite.shouldBeFadedIn = true | ||
438 | end | ||
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. |
428 | function AddEnclosureZone(spriteName, zone) | 442 | function AddEnclosureZone(spriteName, zone) |