Example #1
0
 public void AddDrop(int index, DropListEntry de)
 {
     if (index >= 0 && index < totalDropsInList)
     {
         List[index].index      = de.index;
         List[index].dropChance = de.dropChance;
     }
 }
Example #2
0
    public Drops(int max)
    {
        List             = new DropListEntry[max];
        totalDropsInList = max;

        for (int i = 0; i < max; i++)
        {
            List[i] = new DropListEntry();
        }
    }
Example #3
0
    public void DropItemsFromList(Transform location, Drops list)
    {
        //float radius = 2.0f;
        int count = list.totalDropsInList;

        Debug.Log(count);

        if (count == 1)
        {
        }
        else
        {
            DropListEntry de = list.List[0];
            if (de.dropChance == 1.0f)
            {
                DropItemAtLocation(location.position, DropInstanceList[de.index]);
            }
        }
    }