using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class LootManager : MonoBehaviour
{
public List loot = new List ();
public List spawnPoints = new List ();
void Start ()
{
for(int i = 0; i <loot.Count; i++)
{
if(Random.value * 100 < loot*.spawnChance)*
-
{*
_ Instantiate(loot*.lootObject, spawnPoints[Random.Range(0,spawnPoints.Count)].transform.position,Quaternion. identity);_
Debug.Log(loot_.lootObject.name + "has spawn in the location: " + loot.lootObject.transform.position);
Debug.Log("spawn chance is: " + loot.spawnChance+ “$”);
}
}
}
}*_
* [System.Serializable]*
* public class Loot*
* {*
* public GameObject lootObject;*
* public float spawnChance;*
* }*