0.3.1.2 업데이트
This commit is contained in:
parent
dd3a023793
commit
b34dfa2ddb
@ -15121,7 +15121,6 @@ GameObject:
|
||||
- component: {fileID: 1400792461}
|
||||
- component: {fileID: 1400792460}
|
||||
- component: {fileID: 1400792459}
|
||||
- component: {fileID: 1400792462}
|
||||
- component: {fileID: 1400792463}
|
||||
m_Layer: 8
|
||||
m_Name: LiquidInteractionRegion
|
||||
@ -15129,7 +15128,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1400792458
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -15219,18 +15218,6 @@ MeshFilter:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1400792457}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!114 &1400792462
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1400792457}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f0f3dc568d0721b48ad5f24339d24951, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1400792463
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -280,10 +280,10 @@ namespace BlueWater.Npcs.Customers
|
||||
var servedCocktailData = ItemManager.Instance.CocktailDataSo.GetDataByIdx(currentPickupItem.Idx);
|
||||
ServedItem(servedCocktailData);
|
||||
BalloonUi.ReceiveItem(servedCocktailData);
|
||||
EventManager.OnCocktailServedToCustomer?.Invoke(servedCocktailData);
|
||||
EventManager.InvokeCocktailServedToCustomer(servedCocktailData);
|
||||
IsOrderedSucceed = currentPickupItem.Idx == OrderedCocktailData.Idx;
|
||||
IsReceivedItem = true;
|
||||
EventManager.OnOrderResult?.Invoke(this, IsOrderedSucceed);
|
||||
EventManager.InvokeOrderResult(this, IsOrderedSucceed);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
@ -309,13 +309,13 @@ namespace BlueWater.Npcs.Customers
|
||||
public virtual void ShowInteractionUi()
|
||||
{
|
||||
SpineController.EnableCustomMaterial();
|
||||
EventManager.OnShowInteractionUi?.Invoke(InteractionMessage);
|
||||
EventManager.InvokeShowInteractionUi(InteractionMessage);
|
||||
}
|
||||
|
||||
public virtual void HideInteractionUi()
|
||||
{
|
||||
SpineController.DisableCustomMaterial();
|
||||
EventManager.OnHideInteractionUi?.Invoke();
|
||||
EventManager.InvokeHideInteractionUi();
|
||||
}
|
||||
|
||||
public void RegisterPlayerInteraction()
|
||||
@ -352,7 +352,7 @@ namespace BlueWater.Npcs.Customers
|
||||
var isWaitTimeOver = BalloonUi.IsWaitTimeOver();
|
||||
if (isWaitTimeOver)
|
||||
{
|
||||
EventManager.OnOrderResult?.Invoke(this, false);
|
||||
EventManager.InvokeOrderResult(this, false);
|
||||
}
|
||||
|
||||
return isWaitTimeOver;
|
||||
@ -417,7 +417,7 @@ namespace BlueWater.Npcs.Customers
|
||||
_customerInteractionType = CustomerInteractionType.OrderCocktail;
|
||||
RegisterPlayerInteraction();
|
||||
|
||||
EventManager.OnOrderedCocktail?.Invoke(this);
|
||||
EventManager.InvokeOrderedCocktail(this);
|
||||
}
|
||||
|
||||
public void MoveSpawnPosition()
|
||||
|
@ -65,14 +65,14 @@ namespace BlueWater.Players
|
||||
var previousMaxHealthPoint = MaxHealthPoint;
|
||||
var newChangedHealthPoint = Mathf.Clamp(changedHealthPoint, 0, 10);
|
||||
MaxHealthPoint = newChangedHealthPoint;
|
||||
EventManager.OnMaxHealthChanged?.Invoke(previousMaxHealthPoint, newChangedHealthPoint);
|
||||
EventManager.InvokeMaxHealthChanged(previousMaxHealthPoint, newChangedHealthPoint);
|
||||
}
|
||||
|
||||
public void SetCurrentHealthPoint(int changedHealthPoint)
|
||||
{
|
||||
var newChangedHealthPoint = Mathf.Clamp(changedHealthPoint, 0, MaxHealthPoint);
|
||||
CurrentHealthPoint = newChangedHealthPoint;
|
||||
EventManager.OnHealthChanged?.Invoke(newChangedHealthPoint);
|
||||
EventManager.InvokeHealthChanged(newChangedHealthPoint);
|
||||
|
||||
if (CurrentHealthPoint <= 2)
|
||||
{
|
||||
@ -124,7 +124,7 @@ namespace BlueWater.Players
|
||||
|
||||
public void Die()
|
||||
{
|
||||
EventManager.OnDead?.Invoke();
|
||||
EventManager.InvokeDead();
|
||||
}
|
||||
|
||||
private IEnumerator FlashWhiteCoroutine()
|
||||
|
@ -11,52 +11,156 @@ namespace BlueWater
|
||||
#region Global events
|
||||
|
||||
// Ui
|
||||
public static Action<float, float, Color?, float> FadeInOut;
|
||||
public static Action<float, float, Color?, float> OnFadeInOut;
|
||||
public static void InvokeFadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
||||
{
|
||||
OnFadeInOut?.Invoke(fadeInTime, fadeOutTime, fadeColor, delayAfterFadeIn);
|
||||
}
|
||||
|
||||
// Player
|
||||
// 플레이어 최대체력 변경 이벤트
|
||||
public static Action<int, int> OnMaxHealthChanged;
|
||||
public static void InvokeMaxHealthChanged(int previousMaxHealthPoint, int changedMaxHealthPoint)
|
||||
{
|
||||
OnMaxHealthChanged?.Invoke(previousMaxHealthPoint, changedMaxHealthPoint);
|
||||
}
|
||||
|
||||
// 플레이어 현재체력 변경 이벤트
|
||||
public static Action<int> OnHealthChanged;
|
||||
public static void InvokeHealthChanged(int changedHealthPoint)
|
||||
{
|
||||
OnHealthChanged?.Invoke(changedHealthPoint);
|
||||
}
|
||||
|
||||
// 플레이어 죽을 때 이벤트
|
||||
public static Action OnDead;
|
||||
public static void InvokeDead()
|
||||
{
|
||||
OnDead?.Invoke();
|
||||
}
|
||||
|
||||
// 상호작용
|
||||
// 상호작용 Ui 활성화
|
||||
public static Action<string> OnShowInteractionUi;
|
||||
public static void InvokeShowInteractionUi(string interactionMessage)
|
||||
{
|
||||
OnShowInteractionUi?.Invoke(interactionMessage);
|
||||
}
|
||||
|
||||
// 상호작용 Ui 비활성화
|
||||
public static Action OnHideInteractionUi;
|
||||
public static void InvokeHideInteractionUi()
|
||||
{
|
||||
OnHideInteractionUi?.Invoke();
|
||||
}
|
||||
|
||||
// 플레이어 상호작용중 이벤트
|
||||
public static Action<float> OnInteracting;
|
||||
|
||||
#endregion
|
||||
|
||||
// Tycoon events
|
||||
#region Tycoon events
|
||||
|
||||
// 타이쿤 시작 이벤트
|
||||
public static Action OnTycoonGameStarted;
|
||||
public static void InvokeTycoonGameStarted()
|
||||
{
|
||||
OnTycoonGameStarted?.Invoke();
|
||||
}
|
||||
|
||||
// 타이쿤 종료 이벤트 (OnDead 이벤트로 대체중)
|
||||
public static Action OnTycoonGameOvered;
|
||||
public static void InvokeTycoonGameOvered()
|
||||
{
|
||||
OnTycoonGameOvered?.Invoke();
|
||||
}
|
||||
|
||||
// 플레이어
|
||||
// 레벨업 이벤트
|
||||
public static Action<LevelData> OnLevelUp;
|
||||
public static Action<int> OnChangeGold;
|
||||
public static void InvokeLevelUp(LevelData levelData)
|
||||
{
|
||||
OnLevelUp?.Invoke(levelData);
|
||||
}
|
||||
|
||||
// 경험치 변경 이벤트
|
||||
public static Action<ExpData> OnChangeExp;
|
||||
public static void InvokeChangeExp(ExpData expData)
|
||||
{
|
||||
OnChangeExp?.Invoke(expData);
|
||||
}
|
||||
|
||||
// 골드 변경 이벤트
|
||||
public static Action<int> OnChangeGold;
|
||||
public static void InvokeChangeGold(int newGold)
|
||||
{
|
||||
OnChangeGold?.Invoke(newGold);
|
||||
}
|
||||
|
||||
// 플레이어 칵테일 제조 시작 이벤트
|
||||
public static Action OnCocktailStarted;
|
||||
public static void InvokeCocktailStarted()
|
||||
{
|
||||
OnCocktailStarted?.Invoke();
|
||||
}
|
||||
|
||||
// 플레이어 칵테일 제조 완성 이벤트
|
||||
public static Action<CocktailData> OnCocktailCompleted;
|
||||
public static void InvokeCocktailCompleted(CocktailData completedCocktail)
|
||||
{
|
||||
OnCocktailCompleted?.Invoke(completedCocktail);
|
||||
}
|
||||
|
||||
// 플레이어가 들고있는 칵테일 버리기 이벤트
|
||||
public static Action OnCocktailDiscarded;
|
||||
public static void InvokeCocktailDiscarded()
|
||||
{
|
||||
OnCocktailDiscarded?.Invoke();
|
||||
}
|
||||
|
||||
// 플레이어가 들고있는 칵테일을 서빙테이블에 올려두는 이벤트
|
||||
public static Action OnPlaceOnServingTable;
|
||||
public static void InvokePlaceOnServingTable()
|
||||
{
|
||||
OnPlaceOnServingTable?.Invoke();
|
||||
}
|
||||
|
||||
// 플레이어가 서빙테이블에 있는 칵테일을 가져오는 이벤트
|
||||
public static Action OnTakeFromServingTable;
|
||||
public static void InvokeTakeFromServingTable()
|
||||
{
|
||||
OnTakeFromServingTable?.Invoke();
|
||||
}
|
||||
|
||||
// Npc
|
||||
// 손님 생성 이벤트
|
||||
public static Action OnCreateCustomer;
|
||||
public static Action<Customer> OnOrderedCocktail;
|
||||
public static Action<Customer, bool> OnOrderResult;
|
||||
|
||||
// 음료
|
||||
// public static Action<string> OnDrinkRecipeAcquired;
|
||||
// public static Action<LiquidData> OnDrinkRecipeSelected;
|
||||
public static void InvokeCreateCustomer()
|
||||
{
|
||||
OnCreateCustomer?.Invoke();
|
||||
}
|
||||
|
||||
public static Action OnTycoonGameStarted;
|
||||
public static Action OnTycoonGameOvered;
|
||||
|
||||
public static Action OnCocktailStarted;
|
||||
public static Action<CocktailData> OnCocktailCompleted;
|
||||
public static Action OnCocktailDiscarded;
|
||||
|
||||
public static Action OnPlaceOnServingTable;
|
||||
public static Action OnTakeFromServingTable;
|
||||
|
||||
// 손님이 칵테일 주문 이벤트
|
||||
public static Action<Customer> OnOrderedCocktail;
|
||||
public static void InvokeOrderedCocktail(Customer orderedCustomer)
|
||||
{
|
||||
OnOrderedCocktail?.Invoke(orderedCustomer);
|
||||
}
|
||||
|
||||
// 손님이 칵테일을 받을때 이벤트
|
||||
public static Action<CocktailData> OnCocktailServedToCustomer;
|
||||
|
||||
public static Action<float> OnInteracting;
|
||||
|
||||
// 요리
|
||||
//public static Action<string> OnFoodRecipeAcquired;
|
||||
public static void InvokeCocktailServedToCustomer(CocktailData servedCocktailData)
|
||||
{
|
||||
OnCocktailServedToCustomer?.Invoke(servedCocktailData);
|
||||
}
|
||||
|
||||
// 손님이 칵테일을 받을때 결과 이벤트
|
||||
public static Action<Customer, bool> OnOrderResult;
|
||||
public static void InvokeOrderResult(Customer orderedCustomer, bool orderedSucceed)
|
||||
{
|
||||
OnOrderResult?.Invoke(orderedCustomer, orderedSucceed);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@ -211,12 +211,12 @@ namespace BlueWater.Items
|
||||
public void ShowInteractionUi()
|
||||
{
|
||||
InteractionMessage = $"{ItemData.Name} 줍기";
|
||||
EventManager.OnShowInteractionUi?.Invoke(InteractionMessage);
|
||||
EventManager.InvokeShowInteractionUi(InteractionMessage);
|
||||
}
|
||||
|
||||
public void HideInteractionUi()
|
||||
{
|
||||
EventManager.OnHideInteractionUi?.Invoke();
|
||||
EventManager.InvokeHideInteractionUi();
|
||||
}
|
||||
|
||||
private void DestroySelf() => Destroy(gameObject);
|
||||
|
@ -45,7 +45,7 @@ namespace BlueWater.Maps
|
||||
private IEnumerator PortalCoroutine(Collider other)
|
||||
{
|
||||
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
||||
EventManager.FadeInOut?.Invoke(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
||||
EventManager.InvokeFadeInOut(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
||||
//CombatUiManager.Instance.FadeInOut(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
||||
yield return new WaitForSeconds(_fadeInOutTime.x);
|
||||
|
||||
|
@ -99,7 +99,7 @@ namespace BlueWater.Tycoons
|
||||
public virtual void ShowInteractionUi()
|
||||
{
|
||||
VisualLook.material = OutlineMaterial;
|
||||
EventManager.OnShowInteractionUi?.Invoke(InteractionMessage);
|
||||
EventManager.InvokeShowInteractionUi(InteractionMessage);
|
||||
}
|
||||
|
||||
public virtual void HideInteractionUi()
|
||||
@ -108,7 +108,7 @@ namespace BlueWater.Tycoons
|
||||
{
|
||||
VisualLook.material = OriginalMaterial;
|
||||
}
|
||||
EventManager.OnHideInteractionUi?.Invoke();
|
||||
EventManager.InvokeHideInteractionUi();
|
||||
}
|
||||
|
||||
protected void RegisterPlayerInteraction()
|
||||
|
@ -11,7 +11,7 @@ namespace BlueWater.Tycoons
|
||||
|
||||
public override void Interaction()
|
||||
{
|
||||
EventManager.OnTycoonGameStarted?.Invoke();
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
public override bool CanInteraction()
|
||||
|
@ -24,7 +24,7 @@ namespace BlueWater.Tycoons
|
||||
// 테이블의 칵테일을 가져가는 경우
|
||||
if (_currentPickupItem != null)
|
||||
{
|
||||
EventManager.OnTakeFromServingTable?.Invoke();
|
||||
EventManager.InvokeTakeFromServingTable();
|
||||
CurrentTycoonPlayer.TycoonPickupHandler.PickupItem(_currentPickupItem);
|
||||
CurrentTycoonPlayer.InteractionCanvas.BalloonUi.SetItemImage(_currentPickupItem);
|
||||
_cocktailGlassImage.enabled = false;
|
||||
@ -34,7 +34,7 @@ namespace BlueWater.Tycoons
|
||||
// 테이블에 칵테일을 놓는 경우
|
||||
else
|
||||
{
|
||||
EventManager.OnPlaceOnServingTable?.Invoke();
|
||||
EventManager.InvokePlaceOnServingTable();
|
||||
_currentPickupItem = CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem();
|
||||
CurrentTycoonPlayer.TycoonPickupHandler.GiveItem(_currentPickupItem);
|
||||
CurrentTycoonPlayer.InteractionCanvas.BalloonUi.DiscardItem();
|
||||
|
@ -4,8 +4,7 @@ namespace BlueWater.Tycoons
|
||||
{
|
||||
public override void Interaction()
|
||||
{
|
||||
EventManager.OnCocktailDiscarded?.Invoke();
|
||||
//CurrentTycoonPlayer.DiscardItem();
|
||||
EventManager.InvokeCocktailDiscarded();
|
||||
}
|
||||
|
||||
public override bool CanInteraction()
|
||||
|
@ -356,7 +356,7 @@ namespace BlueWater
|
||||
_isCompleted = false;
|
||||
_currentMixedColor = barrel.GetLiquidData().Color;
|
||||
_instanceMaterial.SetColor(LiquidColorHash, _currentMixedColor * _colorIntensity);
|
||||
EventManager.OnCocktailStarted?.Invoke();
|
||||
EventManager.InvokeCocktailStarted();
|
||||
}
|
||||
|
||||
_startTime = Time.time;
|
||||
@ -489,7 +489,7 @@ namespace BlueWater
|
||||
yield return new WaitForSeconds(1f);
|
||||
|
||||
HidePanel();
|
||||
EventManager.OnCocktailCompleted?.Invoke(matchingCocktail);
|
||||
EventManager.InvokeCocktailCompleted(matchingCocktail);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -39,7 +39,7 @@ namespace BlueWater.Tycoons
|
||||
_dailyCustomerVisitInfos.Clear();
|
||||
Utils.StartUniqueCoroutine(this, ref _startStageCoroutineInstance, StartStageCoroutine());
|
||||
|
||||
EventManager.OnTycoonGameStarted?.Invoke();
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
private IEnumerator StartStageCoroutine()
|
||||
@ -49,7 +49,7 @@ namespace BlueWater.Tycoons
|
||||
while (true)
|
||||
{
|
||||
var currentLevelData = _tycoonManager.GetCurrentLevelData();
|
||||
EventManager.OnCreateCustomer?.Invoke();
|
||||
EventManager.InvokeCreateCustomer();
|
||||
|
||||
yield return new WaitForSeconds(currentLevelData.CustomerRespawn);
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ namespace BlueWater.Tycoons
|
||||
var previousExp = _currentExp;
|
||||
var addedExp = value - previousExp;
|
||||
_currentExp = value;
|
||||
EventManager.OnChangeExp?.Invoke(new ExpData(_currentLevel, previousExp, addedExp));
|
||||
EventManager.InvokeChangeExp(new ExpData(_currentLevel, previousExp, addedExp));
|
||||
}
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ namespace BlueWater.Tycoons
|
||||
set
|
||||
{
|
||||
_currentGold = value;
|
||||
EventManager.OnChangeGold?.Invoke(_currentGold);
|
||||
EventManager.InvokeChangeGold(_currentGold);
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +318,7 @@ namespace BlueWater.Tycoons
|
||||
break;
|
||||
}
|
||||
|
||||
EventManager.OnLevelUp?.Invoke(currentLevelData);
|
||||
EventManager.InvokeLevelUp(currentLevelData);
|
||||
}
|
||||
}
|
||||
}
|
@ -62,7 +62,7 @@ namespace BlueWater.Uis
|
||||
{
|
||||
PopupUi.OnPopupUiOpenEvent += RegisterPopup;
|
||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
||||
EventManager.FadeInOut += FadeInOut;
|
||||
EventManager.OnFadeInOut += FadeInOut;
|
||||
|
||||
Invoke(nameof(StartTutorial), 0.1f);
|
||||
}
|
||||
@ -78,7 +78,7 @@ namespace BlueWater.Uis
|
||||
|
||||
PopupUi.OnPopupUiOpenEvent -= RegisterPopup;
|
||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
||||
EventManager.FadeInOut -= FadeInOut;
|
||||
EventManager.OnFadeInOut -= FadeInOut;
|
||||
}
|
||||
|
||||
[Button("셋팅 초기화")]
|
||||
|
@ -23,14 +23,14 @@ namespace BlueWater.Uis
|
||||
{
|
||||
EventManager.OnShowInteractionUi += ShowUi;
|
||||
EventManager.OnHideInteractionUi += HideUi;
|
||||
EventManager.OnInteracting += A;
|
||||
EventManager.OnInteracting += SetFillAmount;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnShowInteractionUi -= ShowUi;
|
||||
EventManager.OnHideInteractionUi -= HideUi;
|
||||
EventManager.OnInteracting -= A;
|
||||
EventManager.OnInteracting -= SetFillAmount;
|
||||
}
|
||||
|
||||
public void ShowUi(string message)
|
||||
@ -44,7 +44,7 @@ namespace BlueWater.Uis
|
||||
_panel.SetActive(false);
|
||||
}
|
||||
|
||||
private void A(float fillAmount)
|
||||
private void SetFillAmount(float fillAmount)
|
||||
{
|
||||
_fillImage.fillAmount = fillAmount;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ namespace BlueWater.Uis
|
||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
||||
EventManager.OnTycoonGameStarted += TycoonOpenEvent;
|
||||
EventManager.OnTycoonGameOvered += TycoonClosedEvent;
|
||||
EventManager.FadeInOut += FadeInOut;
|
||||
EventManager.OnFadeInOut += FadeInOut;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
@ -64,7 +64,7 @@ namespace BlueWater.Uis
|
||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
||||
EventManager.OnTycoonGameStarted -= TycoonOpenEvent;
|
||||
EventManager.OnTycoonGameOvered -= TycoonClosedEvent;
|
||||
EventManager.FadeInOut -= FadeInOut;
|
||||
EventManager.OnFadeInOut -= FadeInOut;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user