Hello,world! for RPG Maker XP
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 Window_Hello < Window_Base | |
def initialize | |
super(380 , 20, 220, 60) | |
self.contents = Bitmap.new(width - 32, height - 32) | |
@time = 0 | |
end | |
def update | |
if @time == 0 | |
self.contents.clear | |
self.contents.draw_text(4, 0 , width - 40, 32, "Hello", 1) | |
elsif @time == 100 | |
self.contents.clear | |
self.contents.draw_text(4, 0 , width - 40, 32, "World!", 1) | |
elsif @time == 200 | |
@time = -1 | |
end | |
@time = @time + 1 | |
end | |
end | |
class Scene_Map | |
alias old_main main | |
def main | |
@hello = Window_Hello.new | |
old_main | |
@hello.dispose | |
end | |
alias old_update update | |
def update | |
@hello.update | |
old_update | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment