def update_all_windows instance_variables.each do |varname| ivar = instance_variable_get(varname) ivar.update if ivar.is_a?(Window) end end
喵呜喵5 发表于 2014-8-5 22:19
instance_variables
以字符串数组的形式返回对象中所有变量的名字。instance_variable_get(var)
获取并返 ...
九靈 发表于 2014-8-6 08:16
Scene_Title的实例有[:@viewport, :@sprite1, :@sprite2, :@foreground_sprite, :@command_window]
所以 ...
taroxd 发表于 2014-8-6 08:24
[:@viewport, :@sprite1, :@sprite2, :@foreground_sprite, :@command_window]
这是 Scene_Title 的实例 ...
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |