Class: TyranoDsl::WritingWords::SetBackground

Inherits:
Object
  • Object
show all
Defined in:
lib/tyrano_dsl/writing_words/set_background.rb

Instance Method Summary collapse

Instance Method Details

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



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

def run(writing_context, world, word_location, parameters)
  background = world.backgrounds[parameters[:name]]
  writing_context.append_content(
      word_location,
      "[bg storage=\"#{background.target_short_file_name}\" time=\"1000\"]"
  )
  writing_context.add_asset_loading(
      word_location,
      background.target_long_file_name
  )
end