public void EnemyDeath(Transform transform, Enemy enemy) { PlayerData.levelSystem.GiveExp(Exp.EnemyExp(levelData.difficultyLevel + enemy.enemyPrefab.reletiveLevel, enemy.enemyPrefab.expMultiplier)); List <LootPrefab> prefabLoot = levelData.levelLootTable.GetLoot(enemy.enemyPrefab.enemyTier); foreach (LootPrefab item in prefabLoot) { GameObject gameLoot = Instantiate(LootPrefab, transform.position, Quaternion.identity); gameLoot.GetComponent <LootDrop>().SetupLoot(item.CreateItem(levelData.difficultyLevel)); } if (enemy.enemyPrefab.enemyTier == EnemyTier.Boss) { Victory(); } }