random talk
This commit is contained in:
parent
21c2cc101a
commit
0ebb8af771
|
@ -50,7 +50,7 @@ public class Developer : MonoBehaviour
|
|||
private DeveloperStats _baseStats = DeveloperStats.Default;
|
||||
|
||||
[SerializeField]
|
||||
private float _talkRange = 2.0f;
|
||||
private float _talkRange = 3.0f;
|
||||
|
||||
[Header("Aktuelle Informationen")]
|
||||
[SerializeField, ShowOnly]
|
||||
|
@ -420,7 +420,7 @@ public class Developer : MonoBehaviour
|
|||
{
|
||||
if (!_hasTalkedBeforeSleeping)
|
||||
{
|
||||
Talk("The Developer is very sleepy right now duo to a lack of caffeine, The Developer takes a nap now", 0, true);
|
||||
Talk("The Developer is very sleepy right now duo to a lack of caffeine, The Developer informs Gottfried that he will do a short nap any time soon", 0, true);
|
||||
_privateContextBuffer.Add($"The developer took a refreshing nap but is annoyed that Gottfried forgot to bring him any caffeine before the nap");
|
||||
_hasTalkedBeforeSleeping = true;
|
||||
}
|
||||
|
|
|
@ -78,6 +78,16 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
|||
public double ExpectedRemainingGameDuration => _remainingGameDurationSeconds / _currentEfficiency;
|
||||
|
||||
private bool _isStarted;
|
||||
|
||||
private float _randomContextTimer = 20f;
|
||||
|
||||
private List<string> _randomContextList = new List<string>() { "The Developer finally fixed a bug that bothered him a lot",
|
||||
"The Developer tells Gottfried that Richard farted again",
|
||||
"The Developer is struggling really hard to solve the bug",
|
||||
"The Developer tells Gottfried about his lovely cat Mautzi",
|
||||
"The Developer is afraid Zombies might come around",
|
||||
"The Developer is curious about how Gottfrieds day was so far",
|
||||
"The Developer blames Gottfried for some random nonsense"};
|
||||
|
||||
public bool IsGameRunning => _gameRunning.IsTrue;
|
||||
|
||||
|
@ -88,6 +98,16 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
|||
//StartGame();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
_randomContextTimer -= Time.deltaTime;
|
||||
if (_randomContextTimer < 0)
|
||||
{
|
||||
_randomContextTimer = 30f;
|
||||
AddContext(_randomContextList.GetRandomElement());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Startet ein neues Spiel.
|
||||
|
|
Loading…
Reference in New Issue