Пример #1
0
 void LootOrNot()
 {
     if (isBoss)
     {
         pinata.SetActive(true);
         //lootManager.SpawnPinata(transform.position);
     }
     else
     {
         int rng = Random.Range(0, 100);
         if (rng > 50)
         {
             if (rng < 75)
             {
                 lootManager.MakeSpawn(transform.position, 0, 10);
                 return;
             }
             if (rng < 92)
             {
                 lootManager.MakeSpawn(transform.position, 25, 0);
                 return;
             }
             if (rng < 99)
             {
                 lootManager.MakeSpawn(transform.position, 150, 0);
                 return;
             }
             lootManager.MakeSpawn(transform.position, 300, 0);
         }
     }
 }