Exemplo n.º 1
0
    //fonction d'utilisation
    public void Use()
    {
        if (Inventory.InventoryScr.AddBag)
        {
            Delete_the_Item();
            BagScr = Instantiate(bagprefab, Inventory.InventoryScr.transform).GetComponent <Bag>();
            BagScr.Initslots(slotnumber);

            if (BagButton == null)
            {
                Inventory.InventoryScr.InitBag(this);
            }
            else
            {
                Inventory.InventoryScr.InitBag2(this, BagButton);
            }

            BagScr.MyBagIndex = BagButton.Index;
        }
    }
Exemplo n.º 2
0
 public void SetUpScript()
 {
     BagScr = Instantiate(bagprefab, Inventory.InventoryScr.transform).GetComponent <Bag>();
     BagScr.Initslots(slotnumber);
 }