diff options
Diffstat (limited to 'res/scripts')
-rw-r--r-- | res/scripts/common.lua | 9 | ||||
-rw-r--r-- | res/scripts/time_passage_antechamber.lua | 5 |
2 files changed, 14 insertions, 0 deletions
diff --git a/res/scripts/common.lua b/res/scripts/common.lua index 8eb491f..1b0c4a9 100644 --- a/res/scripts/common.lua +++ b/res/scripts/common.lua | |||
@@ -313,6 +313,15 @@ function CreateAnimatedSpriteAtPosition(alias, character, x, y, animName, direct | |||
313 | animation():setSpriteAnimation(spriteId, animName) | 313 | animation():setSpriteAnimation(spriteId, animName) |
314 | end | 314 | end |
315 | 315 | ||
316 | function CreateAnimatedSpriteAtWarpPoint(alias, character, warp, animName, direction, layer) | ||
317 | local spriteId = emplaceSprite(alias) | ||
318 | local loc = getMap():getWarpPoint(warp) | ||
319 | transform():initSprite(spriteId, loc:x(), loc:y(), layer) | ||
320 | animation():initSprite(spriteId, "../res/sprites/" .. character .. "_anim.txt") | ||
321 | animation():setSpriteDirection(spriteId, direction) | ||
322 | animation():setSpriteAnimation(spriteId, animName) | ||
323 | end | ||
324 | |||
316 | function DestroyNamedSprite(alias) | 325 | function DestroyNamedSprite(alias) |
317 | local spriteId = getSpriteByAlias(alias) | 326 | local spriteId = getSpriteByAlias(alias) |
318 | destroySprite(spriteId) | 327 | destroySprite(spriteId) |
diff --git a/res/scripts/time_passage_antechamber.lua b/res/scripts/time_passage_antechamber.lua index d70694a..cd5abbe 100644 --- a/res/scripts/time_passage_antechamber.lua +++ b/res/scripts/time_passage_antechamber.lua | |||
@@ -1 +1,6 @@ | |||
1 | time_passage_antechamber = {} | 1 | time_passage_antechamber = {} |
2 | |||
3 | function time_passage_antechamber.enter_door() | ||
4 | CreateAnimatedSpriteAtWarpPoint("entryway", "entryway", "entryway_appear", "time_passage", Direction.DOWN, SpriteLayer.NORMAL) | ||
5 | ChangeMap("time_passage", "fromBottom") | ||
6 | end | ||