Exemple #1
0
 public static void AddToPool(LootItemHolder lootItemHolder)
 {
     lootItemHolder.gameObject.SetActive(false);
     _lootItemHolders.Enqueue(lootItemHolder);
 }
Exemple #2
0
        private static void AssignItemToHolder(Item item, Transform droppingTransform, LootItemHolder lootItemHolder)
        {
            lootItemHolder.TakeItem(item);
            Vector2 randomCirclePoint = UnityEngine.Random.insideUnitCircle * 3f;
            Vector3 randomPosition    = droppingTransform.position + new Vector3(randomCirclePoint.x, 0, randomCirclePoint.y);

            lootItemHolder.transform.position = randomPosition;
        }