Class: TyranoDsl::ExportGame::WritingWords::Jump

Inherits:
Object
  • Object
show all
Includes:
WritingWordsModule
Defined in:
lib/tyrano_dsl/export_game/writing_words/jump.rb

Instance Method Summary collapse

Methods included from WritingWordsModule

#fetch_scene, #h, #raise_unknown

Instance Method Details

#run(writing_context, world, word_location, parameters) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/tyrano_dsl/export_game/writing_words/jump.rb', line 7

def run(writing_context, world, word_location, parameters)
  scene_name = parameters[:scene_name]
  label_name = parameters[:label_name]
  target_scene = fetch_scene(world, word_location, scene_name)
  label = label_name ? world.labels[label_name].target_name : ''
  writing_context.append_content(
      word_location,
      "[jump storage=\"#{target_scene.target_name}\.ks\" target=\"#{label}\"]"
  )
end