You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1006 B
C#

3 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using SiegeSong;
namespace SiegeSong
{
public class LoadingCellManager : MonoBehaviour
{
public RuntimeManager RuntimeManager;
3 years ago
public Transform PlayerTracker;
public string CurrentArea;
public string CurrentLocale;
public string CurrentRegion;
void Start()
{
}
void Update()
{
var hits = Physics.RaycastAll(PlayerTracker.position, -transform.up, 100.0F);
foreach (var hit in hits)
{
var loadingCell = hit.transform.gameObject.GetComponent<LoadingCell>();
if (loadingCell != null && loadingCell.LocationName != CurrentArea)
{
CurrentArea = loadingCell.LocationName;
RuntimeManager.NotificationManager.Notify($"Now Entering {loadingCell.LocationName}");
3 years ago
}
}
}
}
}