public override void OnHitConfirm(GameObject other, HitInfo hb, HitResult hr) { //Debug.Log ("Hit Confirm with: " + other); if (other.GetComponent <PropertyHolder> () != null) { PropertyHolder other_ph = other.GetComponent <PropertyHolder> (); PropertyHolder m_ph = GetComponent <PropertyHolder> (); List <Property> pList = m_ph.GetVisibleProperties(); foreach (Property p in pList) { m_ph.TransferProperty(p, other_ph); } } }
public void AddPropertyHolder(PropertyHolder ph, int coordIndex) { PropertyMenu pm; pm = m_propMenus [coordIndex]; if (ph.HolderName == "SameAsObject") { pm.holderName = removeParenthesis(ph.gameObject.name); } else { pm.holderName = ph.HolderName; } pm.MaxSlots = ph.MaxSlots; pm.propertyList = ph.GetVisibleProperties(); pm.holder = ph; AddPropertyList(pm.propertyList, pm.holderName, coordIndex); int left = pm.MaxSlots - pm.NumProps(); pm.slotText.text = left.ToString() + " / " + pm.MaxSlots + "\n Free"; }
public override List <Property> GetVisibleProperties() { Debug.Log("Override"); return(PropHolder.GetVisibleProperties()); }