change multiple scene system to dynamic indoor scene
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
using Assets.Scripts.Interfaces;
|
||||
using UnityEngine;
|
||||
|
||||
public class AreaName : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private string _areaName;
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if(other.gameObject.GetComponentInChildren<Player>() is Player)
|
||||
{
|
||||
(Player.Instance.Stats[StatsId.LocationName] as IStringStat).SetValue(_areaName);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerStay(Collider other)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user