Exemplo n.º 1
0
        public void InitialiseMenu()
        {
            cellPopulator = gameObject.AddComponent <EquipmentCellPopulator>();
            cellPopulator.IntialisePopulator(this, contentView, this, this, this);

            shipDataServicer = SessionData.instance.shipServicer;
            weaponServicer   = SessionData.instance.weaponServicer.GetComponent <IWeaponServicer>();
        }
Exemplo n.º 2
0
        public void IntialisePopulator(IEquipmentMenu equipmentMenu, GameObject contentView, ICheckShipSlot slotChecker, IShipAssign assigner, IInfoPanel infoPanel)
        {
            this.equipmentMenu = equipmentMenu;
            this.contentView   = contentView;
            this.slotChecker   = slotChecker;
            this.assigner      = assigner;
            this.infoPanel     = infoPanel;

            weaponServicer = SessionData.instance.weaponServicer.GetComponent <IWeaponServicer>();
        }
Exemplo n.º 3
0
        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();
        }