0.3.2.19 업데이트

This commit is contained in:
NTG_Lenovo 2024-10-31 14:41:13 +09:00
parent 72281e727c
commit b6182e8d0a
15 changed files with 89 additions and 29 deletions

View File

@ -3774,7 +3774,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1 m_Maskable: 1
m_OnCullStateChanged: m_OnCullStateChanged:

View File

@ -15,7 +15,12 @@ namespace BlueWater.BehaviorTrees.Actions
public override TaskStatus OnUpdate() public override TaskStatus OnUpdate()
{ {
return _crew.IsCompletedMission() ? TaskStatus.Success : TaskStatus.Running; if (_crew.CrewInteraction != null)
{
return _crew.CrewInteraction.CanInteractionCrew() ? TaskStatus.Running : TaskStatus.Failure;
}
return _crew.IsCompletedMission() ? TaskStatus.Success : TaskStatus.Failure;
} }
} }
} }

View File

@ -16,9 +16,9 @@ namespace BlueWater.BehaviorTrees.Actions
public override void OnStart() public override void OnStart()
{ {
if (_serverCrew.OrderedCustomer && _serverCrew.OrderedCustomer.CanInteractionCrew()) if (_serverCrew.OrderedCustomer)
{ {
_serverCrew.OrderedCustomer.IsMatchedServer = true; _serverCrew.OrderedCustomer.TryMatchedServer();
} }
if (_serverCrew.CrewInteraction != null) if (_serverCrew.CrewInteraction != null)

View File

@ -43,7 +43,7 @@ namespace BlueWater.Npcs.Crews.Cleaner
public override bool IsCompletedMission() public override bool IsCompletedMission()
{ {
return CrewInteraction == null && !IsCleaningFloor && !IsCleaningTable; return !IsCleaningFloor && !IsCleaningTable;
} }
public void SetIsCleaningFloor(bool value) => IsCleaningFloor = value; public void SetIsCleaningFloor(bool value) => IsCleaningFloor = value;

View File

@ -63,7 +63,7 @@ namespace BlueWater.Npcs.Crews.Server
public override bool IsCompletedMission() public override bool IsCompletedMission()
{ {
return CrewInteraction == null && !OrderedCustomer && CurrentPickupItem == null && !IsServing; return !OrderedCustomer && CurrentPickupItem == null && !IsServing;
} }
public void OnMission(ICrewInteraction crewInteraction, Customer orderedCustomer, ActionType actionType) public void OnMission(ICrewInteraction crewInteraction, Customer orderedCustomer, ActionType actionType)

View File

@ -90,7 +90,7 @@ namespace BlueWater.Npcs.Customers
public float InteractionRadius { get; private set; } = 2f; public float InteractionRadius { get; private set; } = 2f;
[field: SerializeField] [field: SerializeField]
public string InteractionMessage { get; set; } public string InteractionMessage { get; private set; }
[SerializeField] [SerializeField]
private Vomiting _vomiting; private Vomiting _vomiting;
@ -106,22 +106,22 @@ namespace BlueWater.Npcs.Customers
public CocktailData OrderedCocktailData { get; private set; } public CocktailData OrderedCocktailData { get; private set; }
[field: SerializeField] [field: SerializeField]
public Bill CurrentBill { get; set; } public Bill CurrentBill { get; private set; }
[field: SerializeField] [field: SerializeField]
public bool IsMatchedServer { get; set; } public bool IsMatchedServer { get; private set; }
[field: SerializeField] [field: SerializeField]
public bool IsReceivedItem { get; set; } public bool IsReceivedItem { get; private set; }
[field: SerializeField] [field: SerializeField]
public bool IsOrderedSucceed { get; set; } public bool IsOrderedSucceed { get; private set; }
[SerializeField] [SerializeField]
private CustomerInteractionType _customerInteractionType; private CustomerInteractionType _customerInteractionType;
public bool IsMoving { get; private set; } public bool IsMoving { get; private set; }
public bool IsVomited { get; set; } public bool IsVomited { get; private set; }
private Vector3 _currentDirection = Vector3.right; private Vector3 _currentDirection = Vector3.right;
@ -475,6 +475,15 @@ namespace BlueWater.Npcs.Customers
return CurrentTableSeat && !IsReceivedItem; return CurrentTableSeat && !IsReceivedItem;
} }
public void TryMatchedServer()
{
if (!CanInteractionCrew()) return;
IsMatchedServer = true;
}
public void SetCurrentBill(Bill bill) => CurrentBill = bill;
#endregion #endregion
} }
} }

View File

@ -107,5 +107,33 @@ namespace BlueWater
action.Enable(); action.Enable();
} }
} }
public void EnableAction(string actionName)
{
if (IsNullCurrentPlayerInput()) return;
var action = _currentPlayerInput.currentActionMap.FindAction(actionName);
if (action == null)
{
Debug.Log($"현재 Action Map인 {_currentPlayerInput.currentActionMap}에는 {actionName} Action이 존재하지 않습니다");
return;
}
action.Enable();
}
public void DisableAction(string actionName)
{
if (IsNullCurrentPlayerInput()) return;
var action = _currentPlayerInput.currentActionMap.FindAction(actionName);
if (action == null)
{
Debug.Log($"현재 Action Map인 {_currentPlayerInput.currentActionMap}에는 {actionName} Action이 존재하지 않습니다");
return;
}
action.Disable();
}
} }
} }

View File

@ -27,6 +27,13 @@ namespace BlueWater.Tycoons
Initialize(); Initialize();
} }
protected override void Start()
{
base.Start();
EventManager.OnCleaningAll += Destroy;
}
private void Update() private void Update()
{ {
if (InteractionCanvas.BalloonUi.IsWaitTimeOver()) if (InteractionCanvas.BalloonUi.IsWaitTimeOver())
@ -70,6 +77,11 @@ namespace BlueWater.Tycoons
} }
} }
private void OnDestroy()
{
EventManager.OnCleaningAll -= Destroy;
}
public void Initialize() public void Initialize()
{ {
InteractionMessage = "치우기"; InteractionMessage = "치우기";

View File

@ -77,6 +77,7 @@ public class TycoonGameOver : MonoBehaviour
IEnumerator MoveObject() IEnumerator MoveObject()
{ {
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
PlayerInputKeyManager.Instance.DisableAction("Manual");
_panel.SetActive(true); _panel.SetActive(true);
// 2.0초 동안은 흔들리기만 함 // 2.0초 동안은 흔들리기만 함
float timer = 0f; float timer = 0f;

View File

@ -148,7 +148,7 @@ namespace BlueWater.Uis
{ {
if (_tween == null) if (_tween == null)
{ {
Debug.LogError("게이지 리셋 오류"); Debug.LogError("BalloonUi 게이지 리셋 오류");
return; return;
} }

View File

@ -192,7 +192,7 @@ namespace BlueWater
{ {
if (_sliderTween == null) if (_sliderTween == null)
{ {
Debug.LogError("게이지 리셋 오류"); Debug.LogError("Bill 게이지 리셋 오류");
return; return;
} }

View File

@ -54,7 +54,7 @@ namespace BlueWater.Uis
{ {
var instance = Instantiate(_billPrefab, _spawnLocation); var instance = Instantiate(_billPrefab, _spawnLocation);
instance.Initialize(customer, _spawnPosition, _billInfos[0].Position); instance.Initialize(customer, _spawnPosition, _billInfos[0].Position);
customer.CurrentBill = instance; customer.SetCurrentBill(instance);
var newKeyValuePair = new KeyValuePair<Customer, Bill>(customer, instance); var newKeyValuePair = new KeyValuePair<Customer, Bill>(customer, instance);
_customerBills.Add(newKeyValuePair); _customerBills.Add(newKeyValuePair);
} }

View File

@ -6,7 +6,6 @@ using BlueWater.Tycoons;
using BlueWater.Uis; using BlueWater.Uis;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.Serialization;
using UnityEngine.UI; using UnityEngine.UI;
public class ManualBook : SwitchActionPopupUi public class ManualBook : SwitchActionPopupUi
@ -79,19 +78,21 @@ public class ManualBook : SwitchActionPopupUi
} }
public override void Open() public override void Open()
{ {
base.Open();
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
PopupUiController.RegisterPopup(this);
ShowUi();
IsOpened = true;
} }
public override void Close() public override void Close()
{ {
gameObject.SetActive(false); HideUi();
PopupUiController.UnregisterPopup(this); PopupUiController.UnregisterPopup(this);
IsOpened = false;
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed); PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
IsOpened = false;
if (!PopupUiController.IsPopupListEmpty()) return; if (!PopupUiController.IsPopupListEmpty()) return;
@ -202,9 +203,11 @@ public class ManualBook : SwitchActionPopupUi
} }
} }
private void UpdateManualBook(LevelData levelData) private void UpdateManualBook(LevelData levelData)
{ {
Update_Cocktails(); Update_Cocktails();
} }
public void ShowUi() => gameObject.SetActive(true);
public void HideUi() => gameObject.SetActive(false);
} }

View File

@ -53,16 +53,17 @@ namespace BlueWater.Uis
public override void Open() public override void Open()
{ {
transform.SetAsLastSibling();
ShowUi();
PopupUiController.RegisterPopup(this);
IsOpened = true;
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
PlayerInputKeyManager.Instance.DisableAction("Manual");
PopupUiController.RegisterPopup(this);
ShowUi();
IsOpened = true;
} }
public override void Close() public override void Close()
{ {
HideUi(); HideUi();
PlayerInputKeyManager.Instance.EnableAction("Manual");
PopupUiController.UnregisterPopup(this); PopupUiController.UnregisterPopup(this);
IsOpened = false; IsOpened = false;

View File

@ -28,16 +28,17 @@ public class Upgrade_Popup : PopupUi
public override void Open() public override void Open()
{ {
transform.SetAsLastSibling();
ShowUi();
PopupUiController.RegisterPopup(this);
IsOpened = true;
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f); VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
PlayerInputKeyManager.Instance.DisableAction("Manual");
PopupUiController.RegisterPopup(this);
ShowUi();
IsOpened = true;
} }
public override void Close() public override void Close()
{ {
HideUi(); HideUi();
PlayerInputKeyManager.Instance.EnableAction("Manual");
PopupUiController.UnregisterPopup(this); PopupUiController.UnregisterPopup(this);
IsOpened = false; IsOpened = false;