21 lines
434 B
C#
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)
|
|
{
|
|
}
|
|
}
|