Created
April 6, 2015 23:10
-
-
Save HimeWorks/fa30c5e6d575e055e4f6 to your computer and use it in GitHub Desktop.
EventBuilder: process_method example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Game_Interpreter | |
def ev_test | |
event = Event.new(3, 21) | |
event.character_name = "actor1" | |
$game_map.add_event(event) | |
# Hold a reference to the interpreter | |
int = self | |
event.build { | |
# Call a separate method, and then insert those commands into the | |
# current list | |
process_method(int, :test_ev) | |
} | |
end | |
def test_ev | |
# Creates a list of event commands as a stand-alone EventBuilder and | |
# returns it | |
eb = EventBuilder.new { | |
show_text | |
add_message("test") | |
} | |
eb | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment