So jetzt aber
This commit is contained in:
@ -19,12 +19,12 @@ public struct DeveloperStats
|
||||
public double HungerDrainFactor;
|
||||
public double UrinationDrainFactor;
|
||||
public double HappinessDrainFactor;
|
||||
public double UrinationUrgeFromCoffee;
|
||||
public double UrinationUrgeFromMate;
|
||||
public double UrinationUrgeFromPizza;
|
||||
|
||||
// TODO: Not yet used
|
||||
public double CoffeePreference;
|
||||
public double MatePreference;
|
||||
|
||||
public DeveloperStats(double baseEfficiency, int fingers, double caffeineDrainFactor, double hungerDrainFactor, double urinationDrainFactor, double happinessDrainFactor, double coffeePreference, double matePreference)
|
||||
public DeveloperStats(double baseEfficiency, int fingers, double caffeineDrainFactor, double hungerDrainFactor, double urinationDrainFactor, double happinessDrainFactor, double urinationUrgeFromCoffee, double urinationUrgeFromMate, double urinationUrgeFromPizza)
|
||||
{
|
||||
BaseEfficiency = baseEfficiency;
|
||||
Fingers = fingers;
|
||||
@ -32,11 +32,12 @@ public struct DeveloperStats
|
||||
HungerDrainFactor = hungerDrainFactor;
|
||||
UrinationDrainFactor = urinationDrainFactor;
|
||||
HappinessDrainFactor = happinessDrainFactor;
|
||||
CoffeePreference = coffeePreference;
|
||||
MatePreference = matePreference;
|
||||
UrinationUrgeFromCoffee = urinationUrgeFromCoffee;
|
||||
UrinationUrgeFromMate = urinationUrgeFromMate;
|
||||
UrinationUrgeFromPizza = urinationUrgeFromPizza;
|
||||
}
|
||||
|
||||
public static readonly DeveloperStats Default = new DeveloperStats(1.0, 10, 1, 1, 1, 1, 0.5, 0.5);
|
||||
public static readonly DeveloperStats Default = new DeveloperStats(1.0, 10, 1, 1, 1, 1, 0.2, 0.2, 0.2);
|
||||
}
|
||||
|
||||
public class Developer : MonoBehaviour
|
||||
@ -242,7 +243,10 @@ public class Developer : MonoBehaviour
|
||||
_happiness += 0.2;
|
||||
}
|
||||
|
||||
_urgeToUrinateLevel -= caffeineAmount / 2.0;
|
||||
if (drinkType == WantedConsumable.Coffee)
|
||||
_urgeToUrinateLevel -= _baseStats.UrinationUrgeFromCoffee;
|
||||
else if (drinkType == WantedConsumable.Mate)
|
||||
_urgeToUrinateLevel -= _baseStats.UrinationUrgeFromMate;
|
||||
|
||||
_wantedDrink = WantedConsumable.None;
|
||||
|
||||
@ -279,7 +283,7 @@ public class Developer : MonoBehaviour
|
||||
_happiness += 0.2;
|
||||
}
|
||||
|
||||
_urgeToUrinateLevel -= foodAmount / 2.0;
|
||||
_urgeToUrinateLevel -= _baseStats.UrinationUrgeFromPizza;
|
||||
|
||||
_wantedFood = WantedConsumable.None;
|
||||
}
|
||||
@ -479,7 +483,7 @@ public class Developer : MonoBehaviour
|
||||
return 1.0;
|
||||
|
||||
// https://easings.net/#easeOutExpo
|
||||
return _urgeToUrinateLevel / GameManager.Instance.NeedNotificationThreshold;
|
||||
return 1.0; //_urgeToUrinateLevel / GameManager.Instance.NeedNotificationThreshold;
|
||||
|
||||
//Math.Abs(_urgeToUrinateLevel - 1.0) < 0.0001f ? 1.0 : 1.0 - Math.Pow(2, -10 * _urgeToUrinateLevel);
|
||||
}
|
||||
|
||||
@ -77,11 +77,15 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
||||
/// </summary>
|
||||
public double ExpectedRemainingGameDuration => _remainingGameDurationSeconds / _currentEfficiency;
|
||||
|
||||
private bool _isStarted;
|
||||
|
||||
public bool IsGameRunning => _gameRunning.IsTrue;
|
||||
|
||||
public bool IsStarted => _isStarted;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartGame();
|
||||
//StartGame();
|
||||
}
|
||||
|
||||
|
||||
@ -89,8 +93,10 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
||||
/// Startet ein neues Spiel.
|
||||
/// </summary>
|
||||
[ContextMenu("Start Game")]
|
||||
private void StartGame()
|
||||
public void StartGame()
|
||||
{
|
||||
_isStarted = true;
|
||||
|
||||
TimeManager.Instance.Init();
|
||||
|
||||
_contextBuffer = new CircularBuffer<string>(_maxContextBufferSize);
|
||||
@ -103,7 +109,7 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
|
||||
|
||||
_remainingGameDurationSeconds = _totalGameDurationSeconds;
|
||||
|
||||
ResumeGame();
|
||||
ResumeGame();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -83,6 +83,11 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
|
||||
_showDown = ShowDown.NotYet;
|
||||
}
|
||||
|
||||
if (!GameManager.Instance.IsStarted)
|
||||
{
|
||||
_showDown = ShowDown.NotYet;
|
||||
}
|
||||
|
||||
if (oldShowDown != _showDown)
|
||||
{
|
||||
switch (_showDown)
|
||||
|
||||
@ -11,8 +11,6 @@ using OpenAI_API.Models;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Google.Cloud.TextToSpeech.V1;
|
||||
using Palmmedia.ReportGenerator.Core;
|
||||
|
||||
[Serializable]
|
||||
public class TextToSpeechResponse
|
||||
@ -140,7 +138,7 @@ public class Text2Speech : MonoBehaviour
|
||||
|
||||
if (filteredVoices.Count > 0)
|
||||
{
|
||||
// Auswahl einer zuf<75>lligen Stimme aus den gefilterten Ergebnissen
|
||||
// Auswahl einer zuf<75>lligen Stimme aus den gefilterten Ergebnissen
|
||||
var randomVoice = filteredVoices[UnityEngine.Random.Range(0, filteredVoices.Count)];
|
||||
|
||||
System.Random random = new System.Random();
|
||||
|
||||
@ -41,9 +41,12 @@ public class UiController : MonoBehaviour
|
||||
|
||||
public GameObject WinScreen;
|
||||
public GameObject LoseScreen;
|
||||
public GameObject StartScreen;
|
||||
|
||||
void Update()
|
||||
{
|
||||
StartScreen.SetActive(!GameManager.Instance.IsStarted);
|
||||
|
||||
UpdateActionDisplay();
|
||||
UpdateProgressBar();
|
||||
UpdateDeadlineDateStuffTexts();
|
||||
@ -113,7 +116,7 @@ public class UiController : MonoBehaviour
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
UnityEditor.EditorApplication.isPlaying = false;
|
||||
//UnityEditor.EditorApplication.isPlaying = false;
|
||||
Application.Quit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,6 +58,17 @@ public class Zeitschaltuhr : MonoBehaviour, ISerializationCallbackReceiver
|
||||
|
||||
void UpdateOn()
|
||||
{
|
||||
if (!GameManager.Instance.IsStarted)
|
||||
{
|
||||
bool wasOn = IsOn;
|
||||
IsOn = false;
|
||||
if (IsOn != wasOn)
|
||||
{
|
||||
UpdateChildren();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (_turnOnTimeSpan < _turnOffTimeSpan)
|
||||
{
|
||||
// beide Zeiten am selben Tag
|
||||
|
||||
Reference in New Issue
Block a user