Exemplo n.º 1
0
    public void SingleRollPool()
    {
        int roll       = Random.Range(0, range);
        int rollChance = 0;

        Debug.Log("dropPool roll was " + roll.ToString());


        foreach (GachaDropPool g in dropPools)
        {
            rollChance += g.Chance;
            ItemRarity  = g.rarity;
            if (rollChance > roll)
            {
                dropPool = g;
                Debug.Log("dropPool was " + g.name);
                SelectItem();
                break;
            }
        }
        //if(dropPool == null)
        //{
        //    dropPool = dropPools.Find(pool => pool.name == "Common");
        //    SelectItem();
        //}
    }
Exemplo n.º 2
0
 public void TripleRollPool()
 {
     foreach (GachaDropPool g in dropPools)
     {
         if (g.rarity == Rarity.Mythical)
         {
             dropPool   = g;
             ItemRarity = g.rarity;
             Debug.Log("dropPool was " + g.name);
             SelectItem();
             break;
         }
     }
 }