added: World, Zone and ZoneEvent classes for world systems

This commit is contained in:
Chris
2025-10-23 18:09:46 -04:00
parent 47b4530dd0
commit fee7b3701e
6 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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()
{
}
}