Merge branch 'feature/CustomerPatienceUi' into develop
This commit is contained in:
commit
4613b35b71
@ -33,8 +33,8 @@ RectTransform:
|
|||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0.25}
|
m_AnchorMin: {x: 0, y: 0.25}
|
||||||
m_AnchorMax: {x: 1, y: 0.75}
|
m_AnchorMax: {x: 1, y: 0.75}
|
||||||
m_AnchoredPosition: {x: -5, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: -20, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!1 &6108830054777696831
|
--- !u!1 &6108830054777696831
|
||||||
GameObject:
|
GameObject:
|
||||||
@ -71,7 +71,7 @@ RectTransform:
|
|||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 10, y: 0}
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &5096550498312619918
|
--- !u!222 &5096550498312619918
|
||||||
CanvasRenderer:
|
CanvasRenderer:
|
||||||
|
@ -268,7 +268,6 @@ public TaskStatus TimeoutStatus
|
|||||||
|
|
||||||
public override void OnStart()
|
public override void OnStart()
|
||||||
{
|
{
|
||||||
base.OnStart();
|
|
||||||
_startTime = Time.time;
|
_startTime = Time.time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ public override void OnStart()
|
|||||||
Debug.LogError($"[{GetType().Name}] 블랙보드를 찾을 수 없습니다. 게임오브젝트 해시코드: {gameObject.GetHashCode()}");
|
Debug.LogError($"[{GetType().Name}] 블랙보드를 찾을 수 없습니다. 게임오브젝트 해시코드: {gameObject.GetHashCode()}");
|
||||||
}
|
}
|
||||||
_blackboard.SetBlackboardValue(_maxTimeblackboardKey, TimeLimit.Value);
|
_blackboard.SetBlackboardValue(_maxTimeblackboardKey, TimeLimit.Value);
|
||||||
|
_blackboard.SetBlackboardValue(_remainTimeblackboardKey, TimeLimit.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override TaskStatus OnUpdate()
|
public override TaskStatus OnUpdate()
|
||||||
|
@ -57,7 +57,7 @@ private void Start()
|
|||||||
_currentOrderType = _subsystem.GetInteractionSubsystemType();
|
_currentOrderType = _subsystem.GetInteractionSubsystemType();
|
||||||
|
|
||||||
_initialized = true;
|
_initialized = true;
|
||||||
_patienceSlider.enabled = false;
|
_patienceSlider.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
@ -66,7 +66,7 @@ private void Update()
|
|||||||
_currentOrderType = _subsystem.GetInteractionSubsystemType();
|
_currentOrderType = _subsystem.GetInteractionSubsystemType();
|
||||||
if (!_targetOrderType.Contains(_currentOrderType))
|
if (!_targetOrderType.Contains(_currentOrderType))
|
||||||
{
|
{
|
||||||
_patienceSlider.enabled = false;
|
_patienceSlider.gameObject.SetActive(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,12 +74,12 @@ private void Update()
|
|||||||
{
|
{
|
||||||
SetPatience();
|
SetPatience();
|
||||||
}
|
}
|
||||||
|
_patienceSlider.maxValue = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.MaxPatienceTime);
|
||||||
_patienceSlider.value = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.RemainingPatienceTime);
|
_patienceSlider.value = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.RemainingPatienceTime);
|
||||||
|
|
||||||
if (_patienceSlider.value <= 0)
|
if (_patienceSlider.value <= 0)
|
||||||
{
|
{
|
||||||
_patienceSlider.enabled = false;
|
_patienceSlider.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ private void SetPatience()
|
|||||||
_prevOrderType = _currentOrderType;
|
_prevOrderType = _currentOrderType;
|
||||||
_patienceSlider.maxValue = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.MaxPatienceTime);
|
_patienceSlider.maxValue = _blackboard.GetBlackboardValue<float>(RestaurantCustomerBlackboardKey.MaxPatienceTime);
|
||||||
_patienceSlider.value = _patienceSlider.maxValue;
|
_patienceSlider.value = _patienceSlider.maxValue;
|
||||||
_patienceSlider.enabled = true;
|
_patienceSlider.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user