public void SetEntity(COM_Entity entity) { type_ = entity.type_; instId_ = (int)entity.instId_; instName_ = entity.instName_; properties_ = entity.properties_; buffList_ = new List <COM_State>(entity.states_); //skillInsts_ = entity.skill_; skillInsts_.Clear(); skillInsts_.AddRange(entity.skill_); for (int i = 0; i < equips_.Length; ++i) { equips_[i] = null; } for (int k = 0; k < entity.equips_.Length; k++) { equips_[entity.equips_[k].slot_] = entity.equips_[k]; } if (type_ == EntityType.ET_Baby) { CalcBabyEquipSkill(); } gameobjectname_ = Enum.GetName(typeof(EntityType), type_) + "[" + instId_.ToString() + "]"; }
public COM_Entity GetEntity() { COM_Entity entity = new COM_Entity(); entity.type_ = type_; entity.instId_ = (uint)instId_; entity.instName_ = instName_; entity.properties_ = properties_; entity.states_ = buffList_.ToArray(); entity.skill_ = skillInsts_.ToArray(); List <COM_Item> equips = new List <COM_Item>(); for (int k = 0; k < equips_.Length; k++) { equips.Add(equips_[k]); } entity.equips_ = equips.ToArray(); return(entity); }
public void SetEntity(COM_Entity sPlayer) { base.SetEntity(sPlayer); //babiesList = sPlayer.babies1_; //empList = sPlayer.battleEmps_; }