using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class NPC_Behavior : MonoBehaviour
{
[SerializeField] private double _caffeineLevel = 0.0; // max 100, min 0
[SerializeField] private double _hungerLevel = 0.0; // max 100, min 0
[SerializeField] private double _happinessLevel = 100.0; // max 100, min 0
[SerializeField] private double _baseDevelopementPower = 100.0; // max 100, min 0
[SerializeField] private double _developementPower = 100.0; // max unlimited, min 0
[SerializeField] double eventRate = 1.0; // max 60, min 0 -> how many events are requested per minute
///
/// Gibt das Koffeinlevel des Entwicklers zurück
///
public double CaffeineLevel => _caffeineLevel;
///
/// Gibt das Hungerlevel des Entwicklers zurück
///
public double HungerLevel => _hungerLevel;
///
/// Gibt das Zufriedenheitslevel des Entwicklers zurück
///
public double HappnessLevel => _happinessLevel;
///
/// Gibt die Basisentwicklungskraft des Entwicklers zurück
///
public double BaseDevelopementPower => _baseDevelopementPower;
///
/// Gibt die jetzige Entwicklungskraft des Entwicklers zurück
///
public double DevelopmentPower => _developementPower;
public GameManager _gameManager;
// Start is called before the first frame update
void Start()
{
_gameManager = GameManager.Instance;
}
// Update is called once per frame
void Update()
{
// fire event
if (UnityEngine.Random.Range(0, 60) == 0)
{
Debug.Log("TEST");
}
}
public Dictionary GetStats()
{
return new Dictionary
{
{ "Caffine", _caffeineLevel },
{ "Hunger", _hungerLevel },
{ "Happiness", _happinessLevel },
{ "Developement Power", _developementPower }
};
}
public void SetStats(Dictionary stats)
{
foreach (string key in stats.Keys)
{
switch (key)
{
case "Caffine":
_caffeineLevel = stats[key];
break;
case "Hunger":
_hungerLevel = stats[key];
break;
case "Happiness":
_happinessLevel = stats[key];
break;
case "Developement Power":
_developementPower = stats[key];
break;
default:
Debug.LogError("Unknown Stat/Key");
break;
}
}
}
}