Achsoo... Dateien muss man speichern?!

This commit is contained in:
Simon Lübeß 2024-04-05 19:32:50 +02:00
parent 1bae35b3be
commit 22c5d4582e
2 changed files with 15 additions and 11 deletions

View File

@ -1039,7 +1039,7 @@ MonoBehaviour:
_fingersLeft: 10 _fingersLeft: 10
_caffeineLevel: 1 _caffeineLevel: 1
_hungerLevel: 1 _hungerLevel: 1
_urinationDrain: 1 _urgeToUrinateLevel: 1
_isSleeping: 0 _isSleeping: 0
_isHyperactive: 0 _isHyperactive: 0
_isOvercaffeinated: 0 _isOvercaffeinated: 0
@ -1094,8 +1094,8 @@ MonoBehaviour:
Needs: Needs:
- {fileID: 2907046783514947559, guid: 92b71cfc6a2687d44b165ead746233f0, type: 3} - {fileID: 2907046783514947559, guid: 92b71cfc6a2687d44b165ead746233f0, type: 3}
- {fileID: 3355435593704932208, guid: b31fb59d198e53b459943bf898293618, type: 3} - {fileID: 3355435593704932208, guid: b31fb59d198e53b459943bf898293618, type: 3}
- {fileID: 2405502523364773131, guid: b396df2098c22e1488c2c2769c6ddcd6, type: 3}
- {fileID: 7697340910557049827, guid: 5d809e3a343d45f4185615db92384dc7, type: 3} - {fileID: 7697340910557049827, guid: 5d809e3a343d45f4185615db92384dc7, type: 3}
- {fileID: 2405502523364773131, guid: b396df2098c22e1488c2c2769c6ddcd6, type: 3}
--- !u!82 &983523623 --- !u!82 &983523623
AudioSource: AudioSource:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1654,6 +1654,10 @@ PrefabInstance:
propertyPath: _developers.Array.data[0] propertyPath: _developers.Array.data[0]
value: value:
objectReference: {fileID: 983523619} objectReference: {fileID: 983523619}
- target: {fileID: 3650884189301972455, guid: e1e33f0b2075b5c40817665dd8a86f31, type: 3}
propertyPath: NeedFullfilledParticleEffect
value:
objectReference: {fileID: 1620116211597326, guid: 094c049ae10f1c3419c96c4bce41cf8c, type: 3}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects: []

View File

@ -34,7 +34,7 @@ public class Developer : MonoBehaviour
[SerializeField] [SerializeField]
private DeveloperStats _baseStats = DeveloperStats.Default; private DeveloperStats _baseStats = DeveloperStats.Default;
[FormerlySerializedAs("_currentCurrentEfficiency")] [SerializeField, ShowOnly] [SerializeField, ShowOnly]
private double _currentEfficiency = 1.0; private double _currentEfficiency = 1.0;
[SerializeField] [SerializeField]
@ -46,8 +46,8 @@ public class Developer : MonoBehaviour
[SerializeField] [SerializeField]
private double _hungerLevel = 1.0; private double _hungerLevel = 1.0;
[FormerlySerializedAs("_urgeToUrinateLevel")] [SerializeField] [SerializeField]
private double _urinationDrain = 1.0; private double _urgeToUrinateLevel = 1.0;
[SerializeField, ShowOnly] [SerializeField, ShowOnly]
private bool _isSleeping = false; private bool _isSleeping = false;
@ -132,9 +132,9 @@ public class Developer : MonoBehaviour
public void Pee(double peeAmount) public void Pee(double peeAmount)
{ {
_urinationDrain += peeAmount; _urgeToUrinateLevel += peeAmount;
if (_toiletNeed != null && _urinationDrain > GameManager.Instance.NeedNotificationThreshold) if (_toiletNeed != null && _urgeToUrinateLevel > GameManager.Instance.NeedNotificationThreshold)
{ {
NeedFullfilled(_toiletNeed); NeedFullfilled(_toiletNeed);
} }
@ -144,11 +144,11 @@ public class Developer : MonoBehaviour
{ {
_caffeineLevel -= caffeineDrain * _baseStats.CaffeineDrainFactor; _caffeineLevel -= caffeineDrain * _baseStats.CaffeineDrainFactor;
_hungerLevel -= hungerDrain * _baseStats.HungerDrainFactor; _hungerLevel -= hungerDrain * _baseStats.HungerDrainFactor;
_urinationDrain -= urinationDrain * _baseStats.UrinationDrainFactor; _urgeToUrinateLevel -= urinationDrain * _baseStats.UrinationDrainFactor;
_caffeineLevel = Math.Clamp(_caffeineLevel, 0.0, 2.0); _caffeineLevel = Math.Clamp(_caffeineLevel, 0.0, 2.0);
_hungerLevel = Math.Clamp(_hungerLevel, 0.0, 1.0); _hungerLevel = Math.Clamp(_hungerLevel, 0.0, 1.0);
_urinationDrain = Math.Clamp(_urinationDrain, 0.0, 1.0); _urgeToUrinateLevel = Math.Clamp(_urgeToUrinateLevel, 0.0, 1.0);
_isHyperactive = _caffeineLevel > 1.0; _isHyperactive = _caffeineLevel > 1.0;
_isOvercaffeinated = _caffeineLevel > 1.5; _isOvercaffeinated = _caffeineLevel > 1.5;
@ -164,7 +164,7 @@ public class Developer : MonoBehaviour
_hungerNeed = _developerNeeds.SpawnHungerNeed(); _hungerNeed = _developerNeeds.SpawnHungerNeed();
} }
if (_urinationDrain < GameManager.Instance.NeedNotificationThreshold && _toiletNeed == null) if (_urgeToUrinateLevel < GameManager.Instance.NeedNotificationThreshold && _toiletNeed == null)
{ {
// TODO: Go to toilet // TODO: Go to toilet
@ -218,7 +218,7 @@ public class Developer : MonoBehaviour
private double CalculateUrinationEfficiency() private double CalculateUrinationEfficiency()
{ {
// https://easings.net/#easeOutExpo // https://easings.net/#easeOutExpo
return Math.Abs(_urinationDrain - 1.0) < 0.0001f ? 1.0 : 1.0 - Math.Pow(2, -10 * _urinationDrain); return Math.Abs(_urgeToUrinateLevel - 1.0) < 0.0001f ? 1.0 : 1.0 - Math.Pow(2, -10 * _urgeToUrinateLevel);
} }
/// <summary> /// <summary>