コード例 #1
0
    private void PickEnemy()
    {
        numberOfDrops = (int)enumInventory.NULL;
        int randomNum = Random.Range(0, numberOfDrops);

        drop = (enumInventory)randomNum;
    }
コード例 #2
0
    public void AddItem(enumInventory item)
    {
        int firstEmptySlot = GetFirstEmptySlot();

        inventoryArray[firstEmptySlot] = item;
        inventorySize++;

        if (inventorySize == 1)
        {
            InitializeSelected();
        }
    }