add areaname
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.tag.ToLower()=="player")
|
||||
{
|
||||
(Player.Instance.Stats[StatsId.LocationName] as IStringStat).SetValue(_areaName);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerStay(Collider other)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18f0e472918ce7a41898514f037c380d
|
||||
@@ -1,4 +1,5 @@
|
||||
|
||||
using Assets.Scripts.Interfaces;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
@@ -49,7 +50,7 @@ public class Fridge : BaseInteractableObject
|
||||
Debug.Log($"Fridge is full");
|
||||
break;
|
||||
case RadialMenuActions.Eat:
|
||||
var hunger = _player.Stats[StatsId.Food].MaxValue - _player.Stats[StatsId.Food].Value;
|
||||
var hunger = (_player.Stats[StatsId.Food] as INumericStat).MaxValue - (_player.Stats[StatsId.Food] as INumericStat).Value;
|
||||
var eatingItems = _foodObjects.Count < (hunger / 10) ? _foodObjects.Count : (hunger / 10);
|
||||
StartCoroutine(EatRoutine(eatingItems));
|
||||
_foodObjects.RemoveRange(0, (int)eatingItems);
|
||||
|
||||
Reference in New Issue
Block a user