public void sign(string roleId) { if (_roleId != "") { return; } CreateRoleConfig createRoleCfg = _createRoleCfg; _roleId = roleId; _roleLevel = 1; _roleExp = 0; _gold = Convert.ToInt32(createRoleCfg.gold); _paper = Convert.ToInt32(createRoleCfg.paper); int configId = Convert.ToInt32(createRoleCfg.heroId); int level = Convert.ToInt32(createRoleCfg.heroLevel); HeroMgr hMgr = (HeroMgr)_engine.getMgr(typeof(HeroMgr)); HeroModel heroModel = hMgr.createHero(configId, level, 0); hMgr.addHero(heroModel); //Fix me:Test Data. for (int i = 1; i <= 5; i++) { HeroModel hero = hMgr.createHero(i, 5, 5); hMgr.addHero(hero); } hMgr.saveData(); PartnerMgr pMgr = (PartnerMgr)_engine.getMgr(typeof(PartnerMgr)); pMgr.setPartner(0, heroModel); saveData(); }