public void InitialiseCell(string itemID, WeaponAsset weaponAsset) { weaponServicer = SessionData.instance.weaponServicer.GetComponent <IWeaponServicer>(); this.instanceID = itemID; this.type = weaponAsset.defaultData.weaponType; this.price = weaponAsset.price; cellTitle.text = weaponAsset.name; itemPrice.text = "$" + price; availableCount.text = "Inventory: " + weaponServicer.GetAvailableWeaponOccuranceCount(itemID); cellImage.sprite = weaponAsset.weaponPrefab.GetComponent <IImageExtract>().ExtractImage(); }
/* * This is for future use for equipment assets * * public override void InitialiseCell(string itemID, EquipmentAseset weaponAsset) * { * * } */ /// <summary> /// Called when the cell information needs to be updated if there is a change in the list. /// </summary> public override void UpdateCell() { availableCount.text = "Inventory: " + weaponServicer.GetAvailableWeaponOccuranceCount(instanceID); }