M_hero = {} function M_hero:getData(key) if self.datas == nil then return nil end return self.datas[key] end function M_hero:init() self.datas = {} self.datas[1001] = {ID = 1001, name = "狂屠", grade_type = 1, default_have = 1, skill_id = 1001, attribute = 1, atk = 15, icon = "", aspect = "hero1001", speed = 3, zoom_factor = 1} self.datas[1002] = {ID = 1002, name = "圣天使", grade_type = 1, default_have = 1, skill_id = 1002, attribute = 2, atk = 15, icon = "", aspect = "hero1002", speed = 3, zoom_factor = 1} end M_hero:init()