From c1a62ba1459cf849b5ee965aa461e10695bb0b01 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Feb 2021 12:32:53 -0500 Subject: Started adding event where Claus joins the party --- src/script_system.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/script_system.cpp') diff --git a/src/script_system.cpp b/src/script_system.cpp index 090bf46..d4ee0ce 100644 --- a/src/script_system.cpp +++ b/src/script_system.cpp @@ -35,7 +35,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { "animFinished", &Sprite::animFinished, "getCurrentFrame", [] (const Sprite& sprite) -> const SpriteFrame& { return sprite.frames[sprite.animations[sprite.animationId].frameIndices[sprite.animationFrame]]; - }); + }, + "persistent", &Sprite::persistent); engine_.new_usertype( "message", @@ -54,6 +55,7 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { engine_.new_usertype( "character", + "addSpriteToParty", &CharacterSystem::addSpriteToParty, "transplantParty", &CharacterSystem::transplantParty, "startRunning", &CharacterSystem::startRunning, "halt", &CharacterSystem::halt); @@ -62,7 +64,8 @@ ScriptSystem::ScriptSystem(Game& game) : game_(game) { "transform", "initSprite", [] (TransformSystem& transform, int spriteId, int x, int y, SpriteLayer layer) { transform.initSprite(spriteId, vec2i{x, y}, layer); - }); + }, + "undoCollision", &TransformSystem::undoCollision); engine_.new_usertype( "effect", -- cgit 1.4.1