Exemple #1
0
        public HeroDataFormat(HeroSaveDataFormat heroSaveData)
        {
            HeroAttributeFormat _attributes = new HeroAttributeFormat(heroSaveData);

            List <HeroSkillFormat> _skillList = new List <HeroSkillFormat> ();

            heroSaveData.SkillSaveDataList.ForEach(item => {
                HeroSkillFormat _skill = new HeroSkillFormat(item);
                _skillList.Add(_skill);
            });


            List <HeroEquipmentFormat> _equipmentList = new List <HeroEquipmentFormat> ();

            heroSaveData.EquipmentSaveDataList.ForEach(item => {
                HeroEquipmentFormat _equip = new HeroEquipmentFormat(item);
                _equipmentList.Add(_equip);
            });

            this.Attributes    = _attributes;
            this.SkillList     = _skillList;
            this.EquipmentList = _equipmentList;

            var _data = HeroTableReader.Instance.FindDefaultUnique(heroSaveData.DBHeroID);;

            this.AnimationInfo = new HeroAnimationFormat(_data);
        }
Exemple #2
0
//    public HeroDataFormat()
//    {
//      this.Attributes = new HeroAttributeFormat();
//      this.SkillList = new List<HeroSkillFormat>();
//      this.EquipmentList = new List<HeroEquipmentFormat>();
//      this.AnimationInfo = new HeroAnimationFormat ();
//    }

        public HeroDataFormat(HeroAttributeFormat attributes, List <HeroSkillFormat> skillList, List <HeroEquipmentFormat> equipmentList, HeroAnimationFormat animation)
        {
            this.Attributes    = attributes.CloneEx();
            this.SkillList     = skillList.CloneEx();
            this.EquipmentList = equipmentList.CloneEx();
            this.AnimationInfo = animation.CloneEx();
        }