public override void InitEquipment(PeEntity entity, ItemAsset.ItemObject itemObj) { base.InitEquipment(entity, itemObj); m_MotionEquip = m_Entity.GetCmpt <Motion_Equip>(); m_MotionMgr = m_Entity.GetCmpt <MotionMgrCmpt>(); m_Durability = itemObj.GetCmpt <ItemAsset.Durability>(); }
public override void SetItemObject(ItemAsset.ItemObject itemObj) { base.SetItemObject(itemObj); mItemTower = mItemObj.GetCmpt <ItemAsset.Tower>(); mItemEnergy = mItemObj.GetCmpt <ItemAsset.Energy>(); mLifeLimit = mItemObj.GetCmpt <ItemAsset.LifeLimit>(); mDurability = mItemObj.GetCmpt <ItemAsset.Durability>(); if (!Pathea.PeGameMgr.IsMulti && null != tower && null != mLifeLimit) { tower.Entity.SetAttribute(Pathea.AttribType.Hp, mLifeLimit.floatValue.current); } }