Commit 12b5f095 authored by Sebastian's avatar Sebastian
Browse files

Merge remote-tracking branch 'origin/master'

parents 8f1f632d 6161bacd
......@@ -258,6 +258,8 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: d817687276c133644b5b2e6dccb9d9b0, type: 3}
m_Type: 0
m_PreserveAspect: 0
......@@ -345,7 +347,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
......@@ -412,7 +414,6 @@ MonoBehaviour:
menuButtonController: {fileID: 1365752306}
thisIndex: 0
animatorFunction: {fileID: 1500225921}
pauseCanvas: {fileID: 0}
--- !u!95 &1365752312
Animator:
serializedVersion: 3
......@@ -671,8 +672,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -122}
m_SizeDelta: {x: 160, y: 30}
m_AnchoredPosition: {x: 0, y: -156.5}
m_SizeDelta: {x: 260.9, y: 121.4}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!95 &1500225916
Animator:
......@@ -747,6 +748,8 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1500225919
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -760,13 +763,15 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.094970934, g: 0.7169812, b: 0.0033819948, a: 1}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 7fefd86a052f00c49a9fdca78ac4b88e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
......@@ -854,6 +859,8 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
......@@ -916,7 +923,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1772072418}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
......@@ -927,6 +934,8 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 22
......
......@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using Scripts.Brewing;
using Scripts.Customer;
using UnityAtoms;
using UnityEditor;
using UnityEngine;
......@@ -19,6 +20,7 @@ public class CustomerBehaviour : MonoBehaviour
private NavMeshAgent _agent;
private Order _customerOrder;
private CustomerBar _customerBar;
private CustomerSounds _customerSounds;
private PlayerActor _playerActor;
......@@ -57,8 +59,8 @@ public class CustomerBehaviour : MonoBehaviour
_orderPopUp = Instantiate(_customerOrder.OrderPopup, transform);
_orderPopUp.gameObject.SetActive(false);
_playerActor = GetComponentInChildren<PlayerActor>();
_playerActor.CollisionEnterEvent += OnCollisionEnterEvent;
_customerSounds = GetComponent<CustomerSounds>();
}
// Update is called once per frame
......@@ -92,6 +94,7 @@ public class CustomerBehaviour : MonoBehaviour
// TODO: Clean Debug
print("I waited too long!!!11!elf");
_playerActor.AudioSource.PlayOneShot(_customerSounds.GetAngryClip(), 0.2f);
_agent.SetDestination(transform.parent.position);
_customerBar.gameObject.SetActive(false);
_state = CustomerState.Leaving;
......@@ -151,22 +154,23 @@ public class CustomerBehaviour : MonoBehaviour
{
// Correct Beer
float percentage = 100 - _customerBar.CustomerSlider.value;
if (percentage > 50)
if (percentage > 10)
{
// 3 Likes
score.Value += 3;
// 1 Like
score.Value += 1;
}
else if (percentage > 30)
if (percentage > 30)
{
// 2 Likes
score.Value += 2;
score.Value += 1;
}
else if (percentage > 10)
{
// 1 Like
// 3 Likes
score.Value += 1;
}
_playerActor.AudioSource.PlayOneShot(_customerSounds.GetBurpClip(), 0.2f);
_gotServed = true;
_agent.SetDestination(transform.parent.position);
_customerBar.gameObject.SetActive(false);
......@@ -176,7 +180,8 @@ public class CustomerBehaviour : MonoBehaviour
else
{
// Wrong Beer
_customerBar.addPercentageOfSlider(0.3f);
_playerActor.AudioSource.PlayOneShot(_customerSounds.GetHappyClip(), 0.2f);
_customerBar.addPercentageOfSlider(-0.3f);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment