diff --git a/3d Prototyp/Assets/Scripts/Developer.cs b/3d Prototyp/Assets/Scripts/Developer.cs index de0c14cd..55633ffe 100644 --- a/3d Prototyp/Assets/Scripts/Developer.cs +++ b/3d Prototyp/Assets/Scripts/Developer.cs @@ -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; } diff --git a/3d Prototyp/Assets/Scripts/GameManager.cs b/3d Prototyp/Assets/Scripts/GameManager.cs index fc5c6489..bcd90a86 100644 --- a/3d Prototyp/Assets/Scripts/GameManager.cs +++ b/3d Prototyp/Assets/Scripts/GameManager.cs @@ -78,6 +78,16 @@ public partial class GameManager : MonoBehaviourSingleton public double ExpectedRemainingGameDuration => _remainingGameDurationSeconds / _currentEfficiency; private bool _isStarted; + + private float _randomContextTimer = 20f; + + private List _randomContextList = new List() { "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 //StartGame(); } + private void Update() + { + _randomContextTimer -= Time.deltaTime; + if (_randomContextTimer < 0) + { + _randomContextTimer = 30f; + AddContext(_randomContextList.GetRandomElement()); + } + } + /// /// Startet ein neues Spiel.