0.3.2.19 업데이트
This commit is contained in:
parent
72281e727c
commit
b6182e8d0a
@ -3774,7 +3774,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
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_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
|
@ -15,7 +15,12 @@ namespace BlueWater.BehaviorTrees.Actions
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
@ -16,9 +16,9 @@ namespace BlueWater.BehaviorTrees.Actions
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
if (_serverCrew.OrderedCustomer && _serverCrew.OrderedCustomer.CanInteractionCrew())
|
||||
if (_serverCrew.OrderedCustomer)
|
||||
{
|
||||
_serverCrew.OrderedCustomer.IsMatchedServer = true;
|
||||
_serverCrew.OrderedCustomer.TryMatchedServer();
|
||||
}
|
||||
|
||||
if (_serverCrew.CrewInteraction != null)
|
||||
|
@ -43,7 +43,7 @@ namespace BlueWater.Npcs.Crews.Cleaner
|
||||
|
||||
public override bool IsCompletedMission()
|
||||
{
|
||||
return CrewInteraction == null && !IsCleaningFloor && !IsCleaningTable;
|
||||
return !IsCleaningFloor && !IsCleaningTable;
|
||||
}
|
||||
|
||||
public void SetIsCleaningFloor(bool value) => IsCleaningFloor = value;
|
||||
|
@ -63,7 +63,7 @@ namespace BlueWater.Npcs.Crews.Server
|
||||
|
||||
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)
|
||||
|
@ -90,7 +90,7 @@ namespace BlueWater.Npcs.Customers
|
||||
public float InteractionRadius { get; private set; } = 2f;
|
||||
|
||||
[field: SerializeField]
|
||||
public string InteractionMessage { get; set; }
|
||||
public string InteractionMessage { get; private set; }
|
||||
|
||||
[SerializeField]
|
||||
private Vomiting _vomiting;
|
||||
@ -106,22 +106,22 @@ namespace BlueWater.Npcs.Customers
|
||||
public CocktailData OrderedCocktailData { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public Bill CurrentBill { get; set; }
|
||||
public Bill CurrentBill { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public bool IsMatchedServer { get; set; }
|
||||
public bool IsMatchedServer { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public bool IsReceivedItem { get; set; }
|
||||
public bool IsReceivedItem { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public bool IsOrderedSucceed { get; set; }
|
||||
public bool IsOrderedSucceed { get; private set; }
|
||||
|
||||
[SerializeField]
|
||||
private CustomerInteractionType _customerInteractionType;
|
||||
|
||||
public bool IsMoving { get; private set; }
|
||||
public bool IsVomited { get; set; }
|
||||
public bool IsVomited { get; private set; }
|
||||
|
||||
private Vector3 _currentDirection = Vector3.right;
|
||||
|
||||
@ -475,6 +475,15 @@ namespace BlueWater.Npcs.Customers
|
||||
return CurrentTableSeat && !IsReceivedItem;
|
||||
}
|
||||
|
||||
public void TryMatchedServer()
|
||||
{
|
||||
if (!CanInteractionCrew()) return;
|
||||
|
||||
IsMatchedServer = true;
|
||||
}
|
||||
|
||||
public void SetCurrentBill(Bill bill) => CurrentBill = bill;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -107,5 +107,33 @@ namespace BlueWater
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
@ -27,6 +27,13 @@ namespace BlueWater.Tycoons
|
||||
Initialize();
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
EventManager.OnCleaningAll += Destroy;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (InteractionCanvas.BalloonUi.IsWaitTimeOver())
|
||||
@ -70,6 +77,11 @@ namespace BlueWater.Tycoons
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnCleaningAll -= Destroy;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
InteractionMessage = "치우기";
|
||||
|
@ -77,6 +77,7 @@ public class TycoonGameOver : MonoBehaviour
|
||||
IEnumerator MoveObject()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
_panel.SetActive(true);
|
||||
// 2.0초 동안은 흔들리기만 함
|
||||
float timer = 0f;
|
||||
|
@ -148,7 +148,7 @@ namespace BlueWater.Uis
|
||||
{
|
||||
if (_tween == null)
|
||||
{
|
||||
Debug.LogError("게이지 리셋 오류");
|
||||
Debug.LogError("BalloonUi 게이지 리셋 오류");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ namespace BlueWater
|
||||
{
|
||||
if (_sliderTween == null)
|
||||
{
|
||||
Debug.LogError("게이지 리셋 오류");
|
||||
Debug.LogError("Bill 게이지 리셋 오류");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ namespace BlueWater.Uis
|
||||
{
|
||||
var instance = Instantiate(_billPrefab, _spawnLocation);
|
||||
instance.Initialize(customer, _spawnPosition, _billInfos[0].Position);
|
||||
customer.CurrentBill = instance;
|
||||
customer.SetCurrentBill(instance);
|
||||
var newKeyValuePair = new KeyValuePair<Customer, Bill>(customer, instance);
|
||||
_customerBills.Add(newKeyValuePair);
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ using BlueWater.Tycoons;
|
||||
using BlueWater.Uis;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ManualBook : SwitchActionPopupUi
|
||||
@ -79,19 +78,21 @@ public class ManualBook : SwitchActionPopupUi
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
base.Open();
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
HideUi();
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
@ -202,9 +203,11 @@ public class ManualBook : SwitchActionPopupUi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void UpdateManualBook(LevelData levelData)
|
||||
{
|
||||
Update_Cocktails();
|
||||
}
|
||||
|
||||
public void ShowUi() => gameObject.SetActive(true);
|
||||
public void HideUi() => gameObject.SetActive(false);
|
||||
}
|
||||
|
@ -53,16 +53,17 @@ namespace BlueWater.Uis
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
transform.SetAsLastSibling();
|
||||
ShowUi();
|
||||
PopupUiController.RegisterPopup(this);
|
||||
IsOpened = true;
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
|
||||
|
@ -28,16 +28,17 @@ public class Upgrade_Popup : PopupUi
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
transform.SetAsLastSibling();
|
||||
ShowUi();
|
||||
PopupUiController.RegisterPopup(this);
|
||||
IsOpened = true;
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user