Merge branch 'main' of ssh://gitfrieds.nackenbox.xyz:3011/MeigoFried/GameVsJam

This commit is contained in:
klappstuhl24 2024-04-09 09:59:46 +02:00
commit 21c2cc101a
79 changed files with 1119683 additions and 508 deletions

View File

@ -126,7 +126,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: -234762855687092897, guid: 0fdb80f1a2017e743a410bc6cd2090d5, type: 3} m_Motion: {fileID: 7400000, guid: 116fc94de7c8f8845b15606ef71b73eb, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -153,7 +153,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: -234762855687092897, guid: 0fdb80f1a2017e743a410bc6cd2090d5, type: 3} m_Motion: {fileID: 7400000, guid: 116fc94de7c8f8845b15606ef71b73eb, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -271,7 +271,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 7272434718706070166, guid: 3ba22caa4e386444482e0e38ab2558f1, type: 3} m_Motion: {fileID: 7400000, guid: f1ba1f0cd41eb754b99fa7584f8fd716, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -298,7 +298,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 7272434718706070166, guid: 3ba22caa4e386444482e0e38ab2558f1, type: 3} m_Motion: {fileID: 7400000, guid: f1ba1f0cd41eb754b99fa7584f8fd716, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -399,7 +399,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: -3749703193433276195, guid: 2b97b09b2b672204391a687234eed858, type: 3} m_Motion: {fileID: 7400000, guid: 2cfa63e1687912346bd0843031974a0a, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:
@ -619,37 +619,37 @@ AnimatorController:
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: Walk - m_Name: Walk
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: SitDown - m_Name: SitDown
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: TooMuchCaffein - m_Name: TooMuchCaffein
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: DrinkCoffee - m_Name: DrinkCoffee
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
- m_Name: GetMad - m_Name: GetMad
m_Type: 9 m_Type: 9
m_DefaultFloat: 0 m_DefaultFloat: 0
m_DefaultInt: 0 m_DefaultInt: 0
m_DefaultBool: 0 m_DefaultBool: 0
m_Controller: {fileID: 0} m_Controller: {fileID: 9100000}
m_AnimatorLayers: m_AnimatorLayers:
- serializedVersion: 5 - serializedVersion: 5
m_Name: Base Layer m_Name: Base Layer
@ -964,7 +964,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: -6686394522949657072, guid: 89ba2f766b6843048abf2ab72ff8cb21, type: 3} m_Motion: {fileID: 7400000, guid: 698f1aca2ed9869408e9472586c4b85f, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: m_SpeedParameter:
m_MirrorParameter: m_MirrorParameter:

View File

@ -134,6 +134,8 @@ public class NPCAnimationController : MonoBehaviour
Developer.Pee(1.0, true); Developer.Pee(1.0, true);
ToiletManager.Instance.Toilette.Flush();
// Stehe auf und gehe zur<75>ck zum Ausgangspunkt. // Stehe auf und gehe zur<75>ck zum Ausgangspunkt.
transform.LookAt(new Vector3(toiletLookAtTransform.position.x, toiletLookAtTransform.position.y, toiletLookAtTransform.position.z)); transform.LookAt(new Vector3(toiletLookAtTransform.position.x, toiletLookAtTransform.position.y, toiletLookAtTransform.position.z));
animator.ResetTrigger("SitDown"); // Setze den Sitzen-Trigger zur<75>ck animator.ResetTrigger("SitDown"); // Setze den Sitzen-Trigger zur<75>ck
@ -187,19 +189,22 @@ public class NPCAnimationController : MonoBehaviour
animator.SetTrigger("Walk"); animator.SetTrigger("Walk");
yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("Walk")); yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("Walk"));
MoveTo(dancePlace.position); MoveTo(dancePlace.position);
yield return new WaitUntil(() => agent.remainingDistance <= agent.stoppingDistance); yield return new WaitUntil(() =>
animator.ResetTrigger("Walk"); {
Debug.Log(agent.remainingDistance);
return agent.remainingDistance <= agent.stoppingDistance;
});
animator.SetTrigger("TooMuchCaffein"); animator.SetTrigger("TooMuchCaffein");
yield return new WaitForSeconds(1);
yield return new WaitWhile(() => Developer.IsOvercaffeinated); yield return new WaitWhile(() => Developer.IsOvercaffeinated);
animator.ResetTrigger("TooMuchCaffein");
animator.SetTrigger("Walk"); animator.SetTrigger("Walk");
yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("WalkBack")); yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("WalkBack"));
MoveTo(workPosition.position); MoveTo(workPosition.position);
yield return new WaitUntil(() => agent.remainingDistance <= agent.stoppingDistance); yield return new WaitUntil(() => agent.remainingDistance <= agent.stoppingDistance);
transform.rotation = workPosition.rotation; transform.rotation = workPosition.rotation;
animator.ResetTrigger("Walk"); // Setze den Lauf-Trigger zur<75>ck
animator.SetTrigger("SitDown"); animator.SetTrigger("SitDown");
yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("Sit")); yield return new WaitUntil(() => animator.GetCurrentAnimatorStateInfo(0).IsName("Sit"));
yield return StartCoroutine(FadeLayerWeight(animator.GetLayerIndex("Typing"), 1, 1f)); yield return StartCoroutine(FadeLayerWeight(animator.GetLayerIndex("Typing"), 1, 1f));
@ -210,32 +215,5 @@ public class NPCAnimationController : MonoBehaviour
private void MoveTo(Vector3 destination) private void MoveTo(Vector3 destination)
{ {
agent.destination = destination; agent.destination = destination;
}
private void Update()
{
// Pr<50>ft, ob der Buchstabe 'C' gedr<64>ckt wurde
if (Input.GetKeyDown(KeyCode.C))
{
DrinkCoffee();
}
// Pr<50>ft, ob der Buchstabe 'T' gedr<64>ckt wurde
if (Input.GetKeyDown(KeyCode.T))
{
GoToToilet();
}
// Pr<50>ft, ob der Buchstabe 'M' gedr<64>ckt wurde
if (Input.GetKeyDown(KeyCode.M))
{
GettingMad();
}
// Pr<50>ft, ob der Buchstabe 'C' gedr<64>ckt wurde
if (Input.GetKeyDown(KeyCode.O))
{
CaffeinOverdose();
}
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 698f1aca2ed9869408e9472586c4b85f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2cfa63e1687912346bd0843031974a0a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 116fc94de7c8f8845b15606ef71b73eb
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f1ba1f0cd41eb754b99fa7584f8fd716
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 25da4039832d81a42a3e7c1f6242ad85
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11,6 +11,12 @@ public class CoffeeMachine : MonoBehaviour
[SerializeField] [SerializeField]
private AudioClip _buttonClick; private AudioClip _buttonClick;
[SerializeField]
private AudioClip _deny;
[SerializeField]
private AudioClip _coffeeMachine;
[SerializeField] [SerializeField]
private AudioSource _audioSource; private AudioSource _audioSource;
@ -37,17 +43,14 @@ public class CoffeeMachine : MonoBehaviour
private IEnumerator CookCoffeeRoutine() private IEnumerator CookCoffeeRoutine()
{ {
// TODO: Start blinking yield return new WaitForSeconds(0.5f);
Debug.Log("Blinky"); _audioSource.PlayOneShot(_coffeeMachine);
yield return new WaitForSeconds(2); yield return new WaitForSeconds(7);
// SPiele kaffeemaschinen sound
Debug.Log("Brrrrr");
yield return new WaitForSeconds(5);
for (int i = 0; i < 2; i++)
{
CoffeePlace coffeePlace = _coffeePlaces.Where(c => c.IsFree()).ToList().GetRandomElement(); CoffeePlace coffeePlace = _coffeePlaces.Where(c => c.IsFree()).ToList().GetRandomElement();
if (coffeePlace == null) if (coffeePlace == null)
@ -59,10 +62,7 @@ public class CoffeeMachine : MonoBehaviour
{ {
Instantiate(_coffeItemPrefabs.GetRandomElement(), coffeePlace.transform.position, Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0)); Instantiate(_coffeItemPrefabs.GetRandomElement(), coffeePlace.transform.position, Quaternion.Euler(0, Random.Range(0.0f, 360.0f), 0));
} }
}
yield return new WaitForSeconds(1);
// todo: Play pling sound
_isCooking = false; _isCooking = false;
} }

View File

@ -12,9 +12,20 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 62867debe01c41d89e01687ef2722fcd, type: 3} m_Script: {fileID: 11500000, guid: 62867debe01c41d89e01687ef2722fcd, type: 3}
m_Name: GottfriedData m_Name: GottfriedData
m_EditorClassIdentifier: m_EditorClassIdentifier:
Say_Impossible: VoiceSayItsImpossible:
- {fileID: 8300000, guid: 9d82386c43ce7944ab7a78305ae045c5, type: 3} - {fileID: 8300000, guid: 9d82386c43ce7944ab7a78305ae045c5, type: 3}
- {fileID: 8300000, guid: e169dd8360db2cd4dadd12d44c50beab, type: 3} - {fileID: 8300000, guid: e169dd8360db2cd4dadd12d44c50beab, type: 3}
- {fileID: 8300000, guid: dcc846c8a9b316547bf051a016e49fa0, type: 3} - {fileID: 8300000, guid: dcc846c8a9b316547bf051a016e49fa0, type: 3}
- {fileID: 8300000, guid: 32384529849285849a7aa370e502046f, type: 3} - {fileID: 8300000, guid: 32384529849285849a7aa370e502046f, type: 3}
- {fileID: 8300000, guid: 1cd31e4d8fd50b6448f51db8abe18403, type: 3} - {fileID: 8300000, guid: 1cd31e4d8fd50b6448f51db8abe18403, type: 3}
DrinkMate: {fileID: 8300000, guid: d647b03d56624144da03357426647bb1, type: 3}
DrinkCoffe: {fileID: 8300000, guid: 73998fb8d43efca4085260ce6a1e7834, type: 3}
EatPizza: {fileID: 8300000, guid: 1a7a3de12f9df6f4c9799fe341d5de28, type: 3}
Hurt: {fileID: 8300000, guid: 91d676f74045c8541ad059fd4a429bfe, type: 3}
StepSounds:
- {fileID: 8300000, guid: 3578243e1d52aa34c8c4484e8d4cce39, type: 3}
- {fileID: 8300000, guid: 4c66e90cc93a3ed48b72a37d56facbd3, type: 3}
- {fileID: 8300000, guid: d21ab49950de24042a34893b19276912, type: 3}
- {fileID: 8300000, guid: a63a5ed37d6e0e2468c46137e9384bfb, type: 3}
- {fileID: 8300000, guid: cf44f4d419fab844a865ed3dbb123450, type: 3}
- {fileID: 8300000, guid: 74711f0ad4013304abdbf5ce17ffc755, type: 3}

View File

@ -28,7 +28,7 @@ public class DeveloperInfoUi : MonoBehaviour
[SerializeField] [SerializeField]
private Gradient _statusGradient; private Gradient _statusGradient;
[SerializeField] private TextMeshProUGUI _fingerText; //[SerializeField] private TextMeshProUGUI _fingerText;
void Start() void Start()
{ {
@ -43,6 +43,6 @@ public class DeveloperInfoUi : MonoBehaviour
_hungerImage.color = _statusGradient.Evaluate((float)_developer.CurrentHunger); _hungerImage.color = _statusGradient.Evaluate((float)_developer.CurrentHunger);
_toiletImage.color = _statusGradient.Evaluate((float)_developer.CurrentUrgeToUrinate); _toiletImage.color = _statusGradient.Evaluate((float)_developer.CurrentUrgeToUrinate);
_fingerText.text = _developer.FingersLeft.ToString(); //_fingerText.text = _developer.FingersLeft.ToString();
} }
} }

View File

@ -30,7 +30,6 @@ RectTransform:
m_Children: m_Children:
- {fileID: 7348932977815531936} - {fileID: 7348932977815531936}
- {fileID: 7237506617705304074} - {fileID: 7237506617705304074}
- {fileID: 3459356244821462305}
m_Father: {fileID: 4482679136646759840} m_Father: {fileID: 4482679136646759840}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@ -334,140 +333,6 @@ RectTransform:
m_AnchoredPosition: {x: 76.6666, y: 40.000015} m_AnchoredPosition: {x: 76.6666, y: 40.000015}
m_SizeDelta: {x: 30, y: 30} m_SizeDelta: {x: 30, y: 30}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!1 &2314064033459549897
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8941386673390654853}
- component: {fileID: 1995026191122220802}
- component: {fileID: 7121868304386565151}
m_Layer: 5
m_Name: FingerCount
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8941386673390654853
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2314064033459549897}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3459356244821462305}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 2.5, y: 0}
m_SizeDelta: {x: 30, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &1995026191122220802
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2314064033459549897}
m_CullTransparentMesh: 1
--- !u!114 &7121868304386565151
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2314064033459549897}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 10
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 26.85
m_fontSizeBase: 20
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &2849365363638711399 --- !u!1 &2849365363638711399
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -622,81 +487,6 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &2995753045284691605
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4347443903973851185}
- component: {fileID: 6377756472018854795}
- component: {fileID: 7433428973329617304}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4347443903973851185
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2995753045284691605}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.88, y: 0.88, z: 0.88}
m_ConstrainProportionsScale: 1
m_Children: []
m_Father: {fileID: 3459356244821462305}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 15, y: 0}
m_SizeDelta: {x: -30, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6377756472018854795
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2995753045284691605}
m_CullTransparentMesh: 1
--- !u!114 &7433428973329617304
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2995753045284691605}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 4a850894428b5974397bae4c296931b0, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4248618897055490281 --- !u!1 &4248618897055490281
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -997,44 +787,6 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &6233693193687452351
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3459356244821462305}
m_Layer: 5
m_Name: FingerDIsplay
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3459356244821462305
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6233693193687452351}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5222451139235444303}
- {fileID: 4347443903973851185}
- {fileID: 8941386673390654853}
m_Father: {fileID: 5539324385314307754}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 75, y: 45}
m_SizeDelta: {x: 60, y: 30}
m_Pivot: {x: 0, y: 1}
--- !u!1 &6360783030994205330 --- !u!1 &6360783030994205330
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1147,81 +899,6 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &6839716292997047274
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5222451139235444303}
- component: {fileID: 3491041736553925409}
- component: {fileID: 999342893168278251}
m_Layer: 5
m_Name: Background
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5222451139235444303
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6839716292997047274}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3459356244821462305}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3491041736553925409
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6839716292997047274}
m_CullTransparentMesh: 1
--- !u!114 &999342893168278251
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6839716292997047274}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: b687c8dd77019954e99988f126963f3d, type: 3}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 10
--- !u!1 &6876908832845842189 --- !u!1 &6876908832845842189
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1473,7 +1150,7 @@ MonoBehaviour:
m_ColorSpace: -1 m_ColorSpace: -1
m_NumColorKeys: 3 m_NumColorKeys: 3
m_NumAlphaKeys: 2 m_NumAlphaKeys: 2
_fingerText: {fileID: 7121868304386565151} _fingerText: {fileID: 0}
--- !u!1 &7516305664795462652 --- !u!1 &7516305664795462652
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -0,0 +1,88 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: PizzaPlastik
m_Shader: {fileID: 47, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _EMISSION
m_InvalidKeywords: []
m_LightmapFlags: 2
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 2800000, guid: fa774bc8c6a879b44962145aad21fef9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: fa774bc8c6a879b44962145aad21fef9, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 1
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e92aa5e8229dfdf419b5c3a0dca39b8f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -20,7 +20,7 @@ MonoBehaviour:
PoseToolPivotMode: PoseToolPivotMode:
valueInternal: 0 valueInternal: 0
PoseToolMode: PoseToolMode:
valueInternal: 0 valueInternal: 1
PoseMirrorMode: PoseMirrorMode:
valueInternal: 0 valueInternal: 0
ConfigMode: ConfigMode:
@ -260,34 +260,34 @@ MonoBehaviour:
valueInternal: 0 valueInternal: 0
LocalPositionChannelList: LocalPositionChannelList:
- CurrentValue: - CurrentValue:
valueInternal: 0 valueInternal: 34.09025
ReferencePoseValue: ReferencePoseValue:
valueInternal: 0 valueInternal: 34.09025
PoseValueList: [] PoseValueList: []
ChannelPerClipList: ChannelPerClipList:
- LayerList: - LayerList:
- CurrentOriginalValue: - CurrentOriginalValue:
valueInternal: 0 valueInternal: 34.09025
newKeyListSerialized: 00000000 newKeyListSerialized: 00000000
- CurrentValue: - CurrentValue:
valueInternal: 1.891 valueInternal: 0.55999947
ReferencePoseValue: ReferencePoseValue:
valueInternal: 1.891 valueInternal: 0.55999947
PoseValueList: [] PoseValueList: []
ChannelPerClipList: ChannelPerClipList:
- LayerList: - LayerList:
- CurrentOriginalValue: - CurrentOriginalValue:
valueInternal: 1.891 valueInternal: 0.55999947
newKeyListSerialized: 00000000 newKeyListSerialized: 00000000
- CurrentValue: - CurrentValue:
valueInternal: 0 valueInternal: -2.452814
ReferencePoseValue: ReferencePoseValue:
valueInternal: 0 valueInternal: -2.452814
PoseValueList: [] PoseValueList: []
ChannelPerClipList: ChannelPerClipList:
- LayerList: - LayerList:
- CurrentOriginalValue: - CurrentOriginalValue:
valueInternal: 0 valueInternal: -2.452814
newKeyListSerialized: 00000000 newKeyListSerialized: 00000000
LocalRotationSelected: LocalRotationSelected:
valueInternal: 0 valueInternal: 0

View File

@ -336,7 +336,7 @@ AnimatorState:
m_MirrorParameterActive: 0 m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0 m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0 m_TimeParameterActive: 0
m_Motion: {fileID: 5987713911036300057, guid: 081930da5e255e348940373200bbeaca, type: 3} m_Motion: {fileID: 7400000, guid: 25da4039832d81a42a3e7c1f6242ad85, type: 2}
m_Tag: m_Tag:
m_SpeedParameter: RunSpeed m_SpeedParameter: RunSpeed
m_MirrorParameter: m_MirrorParameter:

View File

@ -254,7 +254,7 @@ AudioSource:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 0 value: 1
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 0 tangentMode: 0

View File

@ -14219,7 +14219,7 @@ AudioSource:
m_Curve: m_Curve:
- serializedVersion: 3 - serializedVersion: 3
time: 0 time: 0
value: 0 value: 1
inSlope: 0 inSlope: 0
outSlope: 0 outSlope: 0
tangentMode: 0 tangentMode: 0

File diff suppressed because it is too large Load Diff

View File

@ -59,6 +59,8 @@ public class Character : MonoBehaviour
public PickupInteractible CarriedItem => _carriedInteractible; public PickupInteractible CarriedItem => _carriedInteractible;
public GottfriedData Data => _data;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -213,13 +215,16 @@ public class Character : MonoBehaviour
switch (item.ItemType) switch (item.ItemType)
{ {
case ItemType.Coffee: case ItemType.Coffee:
developer.GiveDrink(0.4, WantedConsumable.Drink); developer.GiveDrink(0.45, WantedConsumable.Coffee);
_audioSource.PlayOneShot(_data.DrinkCoffe);
break; break;
case ItemType.Mate: case ItemType.Mate:
developer.GiveDrink(0.4, WantedConsumable.Mate); developer.GiveDrink(0.35, WantedConsumable.Mate);
_audioSource.PlayOneShot(_data.DrinkMate);
break; break;
case ItemType.Pizza: case ItemType.Pizza:
developer.GiveFood(0.25, WantedConsumable.Pizza); developer.GiveFood(0.4, WantedConsumable.Pizza);
_audioSource.PlayOneShot(_data.EatPizza);
break; break;
default: default:
SayItsImpossible(); SayItsImpossible();
@ -240,4 +245,30 @@ public class Character : MonoBehaviour
{ {
_audioSource.PlayOneShot(_data.VoiceSayItsImpossible.GetRandomElement()); _audioSource.PlayOneShot(_data.VoiceSayItsImpossible.GetRandomElement());
} }
[SerializeField]
private bool _canHurt = true;
public void Hurt()
{
if (_canHurt)
StartCoroutine(HurtRoutine());
}
private IEnumerator HurtRoutine()
{
_canHurt = false;
_audioSource.PlayOneShot(_data.Hurt);
PickupItem(null);
yield return new WaitForSeconds(1);
_canHurt = true;
}
public void PlayStepSound()
{
_audioSource.PlayOneShot(_data.StepSounds.GetRandomElement());
}
} }

View File

@ -6,6 +6,11 @@ namespace Data
[CreateAssetMenu(fileName = "GottfriedData", menuName = "DataObjects/GottfriedData", order = 0)] [CreateAssetMenu(fileName = "GottfriedData", menuName = "DataObjects/GottfriedData", order = 0)]
public class GottfriedData : ScriptableObject public class GottfriedData : ScriptableObject
{ {
[FormerlySerializedAs("Say_Impossible")] public AudioClip[] VoiceSayItsImpossible; public AudioClip[] VoiceSayItsImpossible;
public AudioClip DrinkMate;
public AudioClip DrinkCoffe;
public AudioClip EatPizza;
public AudioClip Hurt;
public AudioClip[] StepSounds;
} }
} }

View File

@ -19,12 +19,12 @@ public struct DeveloperStats
public double HungerDrainFactor; public double HungerDrainFactor;
public double UrinationDrainFactor; public double UrinationDrainFactor;
public double HappinessDrainFactor; 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; BaseEfficiency = baseEfficiency;
Fingers = fingers; Fingers = fingers;
@ -32,11 +32,12 @@ public struct DeveloperStats
HungerDrainFactor = hungerDrainFactor; HungerDrainFactor = hungerDrainFactor;
UrinationDrainFactor = urinationDrainFactor; UrinationDrainFactor = urinationDrainFactor;
HappinessDrainFactor = happinessDrainFactor; HappinessDrainFactor = happinessDrainFactor;
CoffeePreference = coffeePreference; UrinationUrgeFromCoffee = urinationUrgeFromCoffee;
MatePreference = matePreference; 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 public class Developer : MonoBehaviour
@ -242,7 +243,10 @@ public class Developer : MonoBehaviour
_happiness += 0.2; _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; _wantedDrink = WantedConsumable.None;
@ -279,7 +283,7 @@ public class Developer : MonoBehaviour
_happiness += 0.2; _happiness += 0.2;
} }
_urgeToUrinateLevel -= foodAmount / 2.0; _urgeToUrinateLevel -= _baseStats.UrinationUrgeFromPizza;
_wantedFood = WantedConsumable.None; _wantedFood = WantedConsumable.None;
} }
@ -479,7 +483,7 @@ public class Developer : MonoBehaviour
return 1.0; return 1.0;
// https://easings.net/#easeOutExpo // 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); //Math.Abs(_urgeToUrinateLevel - 1.0) < 0.0001f ? 1.0 : 1.0 - Math.Pow(2, -10 * _urgeToUrinateLevel);
} }
@ -575,4 +579,9 @@ public class Developer : MonoBehaviour
GetComponent<Text2Speech>().Generate(context, shortnessLevel); GetComponent<Text2Speech>().Generate(context, shortnessLevel);
} }
} }
public void PlayStepSound()
{
_audioSource.PlayOneShot(GameManager.Instance.Player.Data.StepSounds.GetRandomElement());
}
} }

View File

@ -77,11 +77,15 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
/// </summary> /// </summary>
public double ExpectedRemainingGameDuration => _remainingGameDurationSeconds / _currentEfficiency; public double ExpectedRemainingGameDuration => _remainingGameDurationSeconds / _currentEfficiency;
private bool _isStarted;
public bool IsGameRunning => _gameRunning.IsTrue; public bool IsGameRunning => _gameRunning.IsTrue;
public bool IsStarted => _isStarted;
private void Start() private void Start()
{ {
StartGame(); //StartGame();
} }
@ -89,8 +93,10 @@ public partial class GameManager : MonoBehaviourSingleton<GameManager>
/// Startet ein neues Spiel. /// Startet ein neues Spiel.
/// </summary> /// </summary>
[ContextMenu("Start Game")] [ContextMenu("Start Game")]
private void StartGame() public void StartGame()
{ {
_isStarted = true;
TimeManager.Instance.Init(); TimeManager.Instance.Init();
_contextBuffer = new CircularBuffer<string>(_maxContextBufferSize); _contextBuffer = new CircularBuffer<string>(_maxContextBufferSize);

View File

@ -4,9 +4,16 @@ namespace Interaction
{ {
public class Copier : MonoBehaviour public class Copier : MonoBehaviour
{ {
public AudioSource _audioSource;
public AudioClip _deny;
public void Copy() public void Copy()
{ {
Debug.Log("Kopierer erfolgreich benutzt!"); if (!_audioSource.isPlaying)
_audioSource.Play();
else
_audioSource.PlayOneShot(_deny);
} }
} }
} }

View File

@ -14,10 +14,33 @@ public class VendingMachine : MonoBehaviour
[SerializeField] [SerializeField]
private float _shootForce; private float _shootForce;
[SerializeField]
private bool _isReady;
[SerializeField] private AudioSource _audioSource;
[SerializeField] private AudioClip _vendingMachineSound;
[SerializeField] private AudioClip _errorSound;
public void DropPiza() public void DropPiza()
{ {
PickupInteractible pizza = Instantiate(_pizzaPrefab, _pizzaChute.position, _pizzaChute.rotation); if (_isReady)
StartCoroutine(DropPizzaRoutine());
else
_audioSource.PlayOneShot(_errorSound);
}
private IEnumerator DropPizzaRoutine()
{
_isReady = false;
_audioSource.PlayOneShot(_vendingMachineSound);
yield return new WaitForSeconds(2.7f);
PickupInteractible pizza = Instantiate(_pizzaPrefab, _pizzaChute.position, _pizzaChute.rotation);
pizza.GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, _shootForce), ForceMode.Impulse); pizza.GetComponent<Rigidbody>().AddForce(new Vector3(0, 0, _shootForce), ForceMode.Impulse);
_isReady = true;
} }
} }

View File

@ -3,14 +3,17 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using Unity.VisualScripting; using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using Utility; using Utility;
public class MusicManager : MonoBehaviourSingleton<MusicManager> public class MusicManager : MonoBehaviourSingleton<MusicManager>
{ {
[SerializeField] [SerializeField]
private List<AudioClip> _ambientMusic; private List<AudioClip> _ambientMusic;
[FormerlySerializedAs("_showDownMusic")] [SerializeField]
private AudioClip _winningMusic;
[SerializeField] [SerializeField]
private AudioClip _showDownMusic; private AudioClip _losingMusic;
[SerializeField, ShowOnly] [SerializeField, ShowOnly]
private float _musicTimer = 5f; private float _musicTimer = 5f;
@ -18,10 +21,17 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
private AudioSource _audioSource; private AudioSource _audioSource;
private AudioClip _currentlyPlaying; private AudioClip _currentlyPlaying;
private float _defaultVolume; private float _defaultVolume;
private bool _showDownTime = false; private ShowDown _showDown = ShowDown.NotYet;
private bool _doneFading = false; private bool _doneFading = false;
private bool _showDownIsPlaying = false; private bool _showDownIsPlaying = false;
private enum ShowDown
{
NotYet,
AlmostFinished,
TimesRunningOut
}
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
@ -34,7 +44,7 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
{ {
CheckForFinalMusic(); CheckForFinalMusic();
if (!_showDownTime) if (_showDown == ShowDown.NotYet)
{ {
_musicTimer -= Time.deltaTime; _musicTimer -= Time.deltaTime;
@ -47,18 +57,6 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
} }
} }
} }
else
{
if (_doneFading)
{
if (!_showDownIsPlaying)
PlayShowDownMusic();
}
else
{
FadeOutMusic();
}
}
} }
private void FadeOutMusic() private void FadeOutMusic()
@ -70,8 +68,67 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
private void CheckForFinalMusic() private void CheckForFinalMusic()
{ {
float timeLeft = (float)GameManager.Instance.ExpectedRemainingGameDuration; ShowDown oldShowDown = _showDown;
_showDownTime = timeLeft < 0.9 * _showDownMusic.length;
if (TimeManager.Instance.RealLifeSecondsUntilDeadline < 100)
{
_showDown = ShowDown.TimesRunningOut;
}
else if (GameManager.Instance.GameProgress > 0.85)
{
_showDown = ShowDown.AlmostFinished;
}
else
{
_showDown = ShowDown.NotYet;
}
if (!GameManager.Instance.IsStarted)
{
_showDown = ShowDown.NotYet;
}
if (oldShowDown != _showDown)
{
switch (_showDown)
{
case ShowDown.NotYet:
FadeToClip(_ambientMusic.GetRandomElement());
break;
case ShowDown.AlmostFinished:
FadeToClip(_winningMusic);
break;
case ShowDown.TimesRunningOut:
FadeToClip(_losingMusic);
break;
}
}
}
private void FadeToClip(AudioClip audioClip)
{
StartCoroutine(FadeToClipRoutine(audioClip));
}
[SerializeField]
private float _fadeDuration = 1.0f;
private IEnumerator FadeToClipRoutine(AudioClip audioClip)
{
float currentTime = 0;
float start = _audioSource.volume;
while (currentTime < _fadeDuration)
{
currentTime += Time.deltaTime;
_audioSource.volume = Mathf.Lerp(start, 0.0f, currentTime / _fadeDuration);
yield return null;
}
_audioSource.Stop();
_audioSource.volume = _defaultVolume;
_audioSource.clip = audioClip;
_audioSource.loop = true;
_audioSource.Play();
} }
private void PlayNewMusic() private void PlayNewMusic()
@ -90,14 +147,4 @@ public class MusicManager : MonoBehaviourSingleton<MusicManager>
_audioSource.Play(); _audioSource.Play();
} }
} }
private void PlayShowDownMusic()
{
_showDownIsPlaying = true;
_audioSource.Stop();
_audioSource.volume = _defaultVolume;
_audioSource.clip = _showDownMusic;
_audioSource.loop = true;
_audioSource.Play();
}
} }

View File

@ -11,8 +11,6 @@ using OpenAI_API.Models;
using System.Threading.Tasks; using System.Threading.Tasks;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using Google.Cloud.TextToSpeech.V1;
using Palmmedia.ReportGenerator.Core;
[Serializable] [Serializable]
public class TextToSpeechResponse public class TextToSpeechResponse
@ -140,7 +138,7 @@ public class Text2Speech : MonoBehaviour
if (filteredVoices.Count > 0) if (filteredVoices.Count > 0)
{ {
// Auswahl einer zufälligen Stimme aus den gefilterten Ergebnissen // Auswahl einer zuf<EFBFBD>lligen Stimme aus den gefilterten Ergebnissen
var randomVoice = filteredVoices[UnityEngine.Random.Range(0, filteredVoices.Count)]; var randomVoice = filteredVoices[UnityEngine.Random.Range(0, filteredVoices.Count)];
System.Random random = new System.Random(); System.Random random = new System.Random();

View File

@ -35,6 +35,8 @@ public class TimeManager : MonoBehaviourSingleton<TimeManager>
/// </summary> /// </summary>
public DateTime CurrentDate => _startDate.AddDays(_totalTime); public DateTime CurrentDate => _startDate.AddDays(_totalTime);
public double RealLifeSecondsUntilDeadline => (Deadline - CurrentDate).TotalDays * _secondsPerDay;
/// <summary> /// <summary>
/// Die Deadline des Spiels. /// Die Deadline des Spiels.
/// </summary> /// </summary>

View File

@ -41,9 +41,12 @@ public class UiController : MonoBehaviour
public GameObject WinScreen; public GameObject WinScreen;
public GameObject LoseScreen; public GameObject LoseScreen;
public GameObject StartScreen;
void Update() void Update()
{ {
StartScreen.SetActive(!GameManager.Instance.IsStarted);
UpdateActionDisplay(); UpdateActionDisplay();
UpdateProgressBar(); UpdateProgressBar();
UpdateDeadlineDateStuffTexts(); UpdateDeadlineDateStuffTexts();
@ -113,7 +116,7 @@ public class UiController : MonoBehaviour
public void Exit() public void Exit()
{ {
UnityEditor.EditorApplication.isPlaying = false; //UnityEditor.EditorApplication.isPlaying = false;
Application.Quit(); Application.Quit();
} }
} }

View File

@ -39,7 +39,7 @@ namespace Utility
public MediumDifficulty() public MediumDifficulty()
{ {
Difficulty = Difficulty.Medium; Difficulty = Difficulty.Medium;
DaysUntilReleaseFactor = 1.5; DaysUntilReleaseFactor = 1.75;
CaffeineDrainScaling = 1.5; CaffeineDrainScaling = 1.5;
HungerDrainScaling = 1.5; HungerDrainScaling = 1.5;
UrinationDrainScaling = 1.5; UrinationDrainScaling = 1.5;

View File

@ -58,6 +58,17 @@ public class Zeitschaltuhr : MonoBehaviour, ISerializationCallbackReceiver
void UpdateOn() void UpdateOn()
{ {
if (!GameManager.Instance.IsStarted)
{
bool wasOn = IsOn;
IsOn = false;
if (IsOn != wasOn)
{
UpdateChildren();
}
return;
}
if (_turnOnTimeSpan < _turnOffTimeSpan) if (_turnOnTimeSpan < _turnOffTimeSpan)
{ {
// beide Zeiten am selben Tag // beide Zeiten am selben Tag

View File

@ -118,7 +118,7 @@ void Update()
float diff = direction.magnitude; float diff = direction.magnitude;
if (diff <= _attackRange + 0.6f) if (diff <= _attackRange + 0.6f)
{ {
GameManager.Instance.Player.GetComponent<Character>().PickupItem(null); GameManager.Instance.Player.GetComponent<Character>().Hurt();
} }
_isAttacking = false; _isAttacking = false;
} }

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 031f65c7c47ad2d43a955c40683880ad
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 27e183cf8a3d7ec4b9fbb4671441b7aa
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 1a7a3de12f9df6f4c9799fe341d5de28
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: dbf8cf0bf773b7b44ba3d53d05a2b3bc
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 127dfea0247c28040a5242a06821ad96
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 8fdfe5a0863bed240835dda67c736375
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ca64f072f07c0df449514b1b9f93a5dd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 3578243e1d52aa34c8c4484e8d4cce39
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 4c66e90cc93a3ed48b72a37d56facbd3
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: d21ab49950de24042a34893b19276912
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: a63a5ed37d6e0e2468c46137e9384bfb
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: cf44f4d419fab844a865ed3dbb123450
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 74711f0ad4013304abdbf5ce17ffc755
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: e126bd25cd99e1a46881dafc0b19ebcb
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 91d676f74045c8541ad059fd4a429bfe
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: d647b03d56624144da03357426647bb1
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 73998fb8d43efca4085260ce6a1e7834
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,4 +6,6 @@ using Utility;
public class ToiletManager : MonoBehaviourSingleton<ToiletManager> public class ToiletManager : MonoBehaviourSingleton<ToiletManager>
{ {
public bool IsOccupied; public bool IsOccupied;
public Toilette Toilette;
} }

View File

@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Toilette : MonoBehaviour
{
public AudioSource AudioSource;
private bool _canFlush = true;
public void Flush()
{
if (_canFlush)
StartCoroutine(FlushRoutine());
}
private IEnumerator FlushRoutine()
{
_canFlush = false;
AudioSource.Play();
yield return new WaitForSeconds(5);
_canFlush = true;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b2aba106a2b6a544b8cf8c12c021528c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,3 +5,19 @@ Vending Machine by Marcel van Duijn: https://sketchfab.com/3d-models/empty-vendi
Sounds: Sounds:
Button click microswitch by michaelkoehler: https://freesound.org/people/michaelkoehler/sounds/219015/ Button click microswitch by michaelkoehler: https://freesound.org/people/michaelkoehler/sounds/219015/
Klospühlung by tosha73: https://freesound.org/people/tosha73/sounds/545577/
Vending Machine by rjonander6: https://freesound.org/people/rjonander6/sounds/250962/
Coffee Machine by ReyDros: https://freesound.org/people/ReyDros/sounds/327050/
Open Bottle by michaelkoehler: https://freesound.org/people/michaelkoehler/sounds/207191/
Eat Sound by TheDragonsSpark: https://freesound.org/people/TheDragonsSpark/sounds/543386/
Drink Coffee by EverydayEldritch.com: https://freesound.org/people/EverydayEldritch.com/sounds/627922/
Printer by Zabuhailo: https://freesound.org/people/Zabuhailo/sounds/145265/
hurt2.wav by thecheeseman: https://freesound.org/people/thecheeseman/sounds/44429/
https://assetstore.unity.com/packages/3d/environments/barrier-traffic-cone-pack-82549
https://assetstore.unity.com/packages/3d/vehicles/ukraine-free-cars-191822
https://assetstore.unity.com/packages/3d/vehicles/land/low-poly-playable-vehicles-154577
Music by suno.ai

View File

@ -4,5 +4,8 @@
EditorBuildSettings: EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: [] m_Scenes:
- enabled: 1
path: Assets/Scenes/GameJamScene.unity
guid: f1369b80ccf53544f914c438187da217
m_configObjects: {} m_configObjects: {}

View File

@ -12,8 +12,8 @@ PlayerSettings:
targetDevice: 2 targetDevice: 2
useOnDemandResources: 0 useOnDemandResources: 0
accelerometerFrequency: 60 accelerometerFrequency: 60
companyName: DefaultCompany companyName: Nackenbox GmbH
productName: 3d Prototyp productName: Game vs Jam
defaultCursor: {fileID: 0} defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0} cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
@ -139,7 +139,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 0.1 bundleVersion: 1.0
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
@ -161,7 +161,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1 androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1 androidMaxAspectRatio: 2.1
applicationIdentifier: applicationIdentifier:
Standalone: com.DefaultCompany.3d-Prototyp Standalone: com.Nackenbox-GmbH.Game-vs-Jam
buildNumber: buildNumber:
Standalone: 0 Standalone: 0
VisionOS: 0 VisionOS: 0