module TyranoDsl::Vocabulary

All the available words of the DSL

Constants

ALL_WORDS

All the available words

ASK_QUESTION

Declare a background

CONDITIONAL_JUMP

Conditional jump

DECLARE_BACKGROUND

Declare a background

DECLARE_CHARACTER

Declare a character

DECLARE_LABEL

Declare a label

DECLARE_VARIABLE

Declare a variable

DISPLAY_TEXT

Display some text

HIDE_CHARACTER

Hide a character

HIDE_MESSAGE_WINDOW

Hide the message window

INCLUDE_FILE

Include another file

JUMP

Jump to a scene

SET_BACKGROUND

Set the current background

SET_CHARACTER_STANCE

Set the stance of a character

SET_TITLE_SCREEN_BACKGROUND

Set the background of the title screen

SHOW_CHARACTER

Show a character

SHOW_MESSAGE_WINDOW

Show the message window

START_SCENE

Start a scene

UPDATE_VARIABLE

Update a variable

Public Class Methods

get_words_class(class_file_path) { |word, word_class| ... } click to toggle source

Get the word class corresponding to the words @param [String] class_file_path name of the class

# File lib/tyrano_dsl/vocabulary.rb, line 67
def self.get_words_class(class_file_path)
  TyranoDsl::Vocabulary::ALL_WORDS.each do |word|
    full_path = "#{class_file_path}/#{word}"
    require_relative full_path
    full_class_name = "TyranoDsl::" + full_path.
        split('_').
        collect(&:capitalize).
        join.
        split('/').
        collect do |c|
      c[0] = c[0].upcase
      c
    end.join('::')
    word_class = Kernel.const_get(full_class_name)
    yield(word, word_class)
  end
end