Esempio n. 1
0
    void Start()
    {
        PC        = this.GetComponent <PlayerCharacter>();
        Inventory = this.GetComponent <CharacterInventory>().Inventory;
        CharacterInventory temp = this.GetComponent <CharacterInventory>();

        temp.Inventory.MaxInventorySize = 30;
        Equip = temp.Equipment;
        SetupPC();

        addering[0].AddToInventory(Inventory);
        addering[0].AddToInventory(Inventory);
        addering[0].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[1].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);
        addering[2].AddToInventory(Inventory);

        Inventory.ItemsInInventory[0].Item.Use(Inventory, 0, PC);
        Menu = new  DisplayMenu(PC, Equip, Inventory);
        Menu.CloseInventory();
    }
Esempio n. 2
0
 private void Update()
 {
     if (Input.GetKeyUp(KeyCode.I) && Menu.Displayed)
     {
         Menu.CloseInventory();
     }
     if (Input.GetKeyUp(KeyCode.I) && !Menu.Displayed)
     {
         Menu = new DisplayMenu(PC, Equip, Inventory);
     }
 }