add areaname
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Assets.Scripts.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AI;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class Player : MonoBehaviour
|
||||
private PlayerStates _currentActing;
|
||||
private AnimationStates _currentAnimation;
|
||||
|
||||
public Dictionary<StatsId, Stat> Stats;
|
||||
public Dictionary<StatsId, object> Stats;
|
||||
public JobPositions JobPosition { get; set; }
|
||||
|
||||
public EducationSkill Education { get; set; }
|
||||
@@ -33,6 +33,7 @@ public class Player : MonoBehaviour
|
||||
|
||||
private ContainerItem _containerItem;
|
||||
private Action _OnAnimationFinish;
|
||||
private string _locationName;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -213,27 +214,27 @@ public class Player : MonoBehaviour
|
||||
switch (_currentActing)
|
||||
{
|
||||
case PlayerStates.Eating:
|
||||
Stats[StatsId.Food].increase(10f);
|
||||
(Stats[StatsId.Food] as INumericStat).increase(10f);
|
||||
break;
|
||||
case PlayerStates.Sleeping:
|
||||
Stats[StatsId.Energy].increase(0.2f);
|
||||
Stats[StatsId.Food].deduct(0.03f);
|
||||
(Stats[StatsId.Energy] as INumericStat).increase(0.2f);
|
||||
(Stats[StatsId.Food] as INumericStat).deduct(0.03f);
|
||||
break;
|
||||
default:
|
||||
Stats[StatsId.Food].deduct(0.05f); // 48 hours it's 100, 100/2880=~0.034 per minute
|
||||
Stats[StatsId.Energy].deduct(0.1f); // 24 hours it's 100, 100/1440=~0.096 per minute
|
||||
(Stats[StatsId.Food] as INumericStat).deduct(0.05f); // 48 hours it's 100, 100/2880=~0.034 per minute
|
||||
(Stats[StatsId.Energy] as INumericStat).deduct(0.1f); // 24 hours it's 100, 100/1440=~0.096 per minute
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void Pay(float amount)
|
||||
{
|
||||
Stats[StatsId.Money].deduct(amount);
|
||||
(Stats[StatsId.Money] as INumericStat).deduct(amount);
|
||||
}
|
||||
|
||||
public void AddMoney(float amount)
|
||||
{
|
||||
Stats[StatsId.Money].increase(amount);
|
||||
(Stats[StatsId.Money] as INumericStat).increase(amount);
|
||||
}
|
||||
|
||||
public void SetContainerItem(ContainerItem containerItem)
|
||||
@@ -255,4 +256,13 @@ public class Player : MonoBehaviour
|
||||
{
|
||||
return _containerItem != null;
|
||||
}
|
||||
|
||||
public void SetLocationName(string locationName)
|
||||
{
|
||||
_locationName = locationName;
|
||||
}
|
||||
public string GetLocationName()
|
||||
{
|
||||
return _locationName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user