#encoding:utf-8
#==============================================================================
# ■ DataManager
#------------------------------------------------------------------------------
# 数据库和游戏实例的管理器。所有在游戏中使用的全局变量都在这里初始化。
#==============================================================================
module DataManager
class << self
alias_method :create_game_objects_20150416, :create_game_objects
#--------------------------------------------------------------------------
# ● 生成各种游戏对象
#--------------------------------------------------------------------------
def create_game_objects
create_game_objects_20150416
$step = Hash.new(0)
end
#--------------------------------------------------------------------------
# ● 生成存档内容
#--------------------------------------------------------------------------
alias_method :make_save_contents_20150416, :make_save_contents
def make_save_contents
contents = make_save_contents_20150416
contents[:step] = $step
contents
end
#--------------------------------------------------------------------------
# ● 展开存档内容
#--------------------------------------------------------------------------
alias_method :extract_save_contents_20150416, :extract_save_contents
def extract_save_contents(contents)
extract_save_contents_20150416(contents)
$step = contents[:step]
end
end
end