public void DropCoins() { int coinCount = Random.Range(coinsMin, coinsMax); for (int i = 0; i < coinCount; i++) { GameObject obj = poolYard.pool_item_Coin.GetPoolObject(); if (obj == null) { return; } obj.transform.position = transform.position + (Vector3)(Random.insideUnitCircle * lootDropRadius); obj.transform.rotation = transform.rotation; obj.SetActive(true); } if (DropsLoot) { PoolController theLootPool = lootTable[Random.Range(0, 3)]; GameObject obj; obj = theLootPool.GetPoolObject(); if (obj == null) { return; } obj.transform.position = transform.position + (Vector3)(Random.insideUnitCircle * lootDropRadius); obj.transform.rotation = transform.rotation; obj.SetActive(true); } }