28 lines
572 B
C#
28 lines
572 B
C#
using Reset.World;
|
|
using UnityEngine;
|
|
public class Zone : MonoBehaviour{
|
|
public ZoneEvent activeEvent;
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
public bool TryNewEvent(){
|
|
int eventIndex = Random.Range(0, World.ZoneEventsMasterList.Count);
|
|
|
|
if (Random.value * 100 < World.ZoneEventsMasterList[eventIndex].eventRarity) {
|
|
activeEvent = World.ZoneEventsMasterList[eventIndex];
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|