示例#1
0
    public Item GetConsumable(Item.ItemRank rank)
    {
        List <Item> list;

        if (rank == Item.ItemRank.A)
        {
            list = consumableA;
        }
        else if (rank == Item.ItemRank.B)
        {
            list = consumableB;
        }
        else if (rank == Item.ItemRank.C)
        {
            list = consumableC;
        }
        else if (rank == Item.ItemRank.D)
        {
            list = consumableD;
        }
        else
        {
            list = consumableE;
        }

        Item c = list[Random.Range(0, list.Count)];

        return(c);
    }
示例#2
0
    public Item GetAccessory(Item.ItemRank rank)
    {
        List <Item> list;

        if (rank == Item.ItemRank.A)
        {
            list = accessoryA;
        }
        else if (rank == Item.ItemRank.B)
        {
            list = accessoryB;
        }
        else if (rank == Item.ItemRank.C)
        {
            list = accessoryC;
        }
        else if (rank == Item.ItemRank.D)
        {
            list = accessoryD;
        }
        else
        {
            list = accessoryE;
        }


        return(ChooseItem(list));
    }