Files
SimUL/Assets/Scripts/InteractableObjects/AreaName.cs
T
2023-12-06 14:55:20 +02:00

21 lines
434 B
C#

using Assets.Scripts.Interfaces;
using UnityEngine;
public class AreaName : MonoBehaviour
{
[SerializeField]
private string _areaName;
private void OnTriggerEnter(Collider other)
{
if(other.gameObject.tag.ToLower()=="player")
{
(Player.Instance.Stats[StatsId.LocationName] as IStringStat).SetValue(_areaName);
}
}
private void OnTriggerStay(Collider other)
{
}
}