class Game_Variables
#--------------------------------------------------------------------------
# ● 设置变量
#--------------------------------------------------------------------------
def []=(variable_id, value)
@data[variable_id] = value
on_change(variable_id)
end
#--------------------------------------------------------------------------
# ● 设置变量时的处理
#--------------------------------------------------------------------------
def on_change(variable_id)
$game_map.need_refresh = true
$game_player.refresh if variable_id == 200
end
end
class Game_Variables
#--------------------------------------------------------------------------
# ● 设置变量
#--------------------------------------------------------------------------
def []=(variable_id, value)
@data[variable_id] = value
on_change(variable_id)
end
#--------------------------------------------------------------------------
# ● 设置变量时的处理
#--------------------------------------------------------------------------
def on_change(variable_id)
$game_map.need_refresh = true
$game_player.refresh if variable_id == 200
end
end