#--------------------------------------------------------------------------
# ● 设置窗口
#--------------------------------------------------------------------------
class New_Window < Window_Base
#--------------------------------------------------------------------------
# ● 开始处理,设置实例变量@flags、@num
#--------------------------------------------------------------------------
def initialize
super(0, 0, Graphics.width, Graphics.height)
@flags = true
@num = 0
end
#--------------------------------------------------------------------------
# ● 更新,如果@flags打开的时候在控制台输出@num
#--------------------------------------------------------------------------
def update
super
if @flags
p @num
@num += 1
end
end
#--------------------------------------------------------------------------
# ● 类方法 New_Window.change ,@flags变成相反的值
#--------------------------------------------------------------------------
def self.change
@flags = !@flags
p @flags
end
end
#--------------------------------------------------------------------------
# ● 载入地图
#--------------------------------------------------------------------------
class Scene_Map
alias new_create_all_windows create_all_windows
def create_all_windows
new_create_all_windows
@new_window = New_Window.new
end
end