Example #1
0
 public void DespawnLoot(LootScript ls)
 {
     if (l_Active.Contains(ls))
     {
         l_Pool.Add(ls);
         l_Active.Remove(ls);
         GivePlayerItem(ls.data);
         ls.Hide();
     }
 }
Example #2
0
 private void Start()
 {
     Instance = this;
     for (int i = 0; i < MaxNumberOfLoot; i++)
     {
         GameObject obj = Instantiate(lootPrefab, gameObject.transform);
         LootScript ls  = obj.GetComponent <LootScript>();
         ls.Hide();
         l_Pool.Add(ls);
     }
 }