module TyranoDsl::ParsingWords::SetBackground

Public Instance Methods

set_background(background_name) click to toggle source

@param [String] background_name @return [void] @raise [TyranoDsl::TyranoException]

# File lib/tyrano_dsl/parsing_words/set_background.rb, line 6
def set_background(background_name)
  unless context.world.backgrounds.key? background_name
    raise_unknown('background', background_name, context.world.backgrounds.keys)
  end
  add_parsed_word(
      TyranoDsl::Vocabulary::SET_BACKGROUND,
      name: background_name
  )
end