Merge branch 'develop' of http://gitlab.capers.co.kr/capersunity/newbluewater into lmg
This commit is contained in:
commit
9ae0556534
@ -21,14 +21,14 @@ namespace BlueWater.Players.Tycoons
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnCocktailCompleted += PickupItem;
|
EventManager.OnCocktailCompleted += PickupItem;
|
||||||
TycoonEvents.OnCocktailDiscarded += DiscardItem;
|
EventManager.OnCocktailDiscarded += DiscardItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnCocktailCompleted -= PickupItem;
|
EventManager.OnCocktailCompleted -= PickupItem;
|
||||||
TycoonEvents.OnCocktailDiscarded -= DiscardItem;
|
EventManager.OnCocktailDiscarded -= DiscardItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button("컴포넌트 초기화")]
|
[Button("컴포넌트 초기화")]
|
||||||
|
@ -1,10 +1,21 @@
|
|||||||
using System;
|
using System;
|
||||||
using BlueWater.Items;
|
using BlueWater.Items;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace BlueWater
|
namespace BlueWater
|
||||||
{
|
{
|
||||||
public static class TycoonEvents
|
public static class EventManager
|
||||||
{
|
{
|
||||||
|
// Global events
|
||||||
|
#region Global events
|
||||||
|
|
||||||
|
public static Action<float, float, Color?, float> FadeInOut;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
// Tycoon events
|
||||||
|
#region Tycoon events
|
||||||
|
|
||||||
// 음료
|
// 음료
|
||||||
// public static Action<string> OnDrinkRecipeAcquired;
|
// public static Action<string> OnDrinkRecipeAcquired;
|
||||||
// public static Action<LiquidData> OnDrinkRecipeSelected;
|
// public static Action<LiquidData> OnDrinkRecipeSelected;
|
||||||
@ -18,5 +29,7 @@ namespace BlueWater
|
|||||||
|
|
||||||
// 요리
|
// 요리
|
||||||
//public static Action<string> OnFoodRecipeAcquired;
|
//public static Action<string> OnFoodRecipeAcquired;
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +0,0 @@
|
|||||||
using System;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace BlueWater
|
|
||||||
{
|
|
||||||
public static class GlobalEvents
|
|
||||||
{
|
|
||||||
public static Action<float, float, Color?, float> FadeInOut;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
fileFormatVersion: 2
|
|
||||||
guid: 2e838e8a31b7c6347bd379a901be2f75
|
|
@ -122,8 +122,8 @@ namespace BlueWater
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnLiquidRegionEntered += ShowPanel;
|
EventManager.OnLiquidRegionEntered += ShowPanel;
|
||||||
TycoonEvents.OnLiquidRegionExited += HidePanel;
|
EventManager.OnLiquidRegionExited += HidePanel;
|
||||||
|
|
||||||
_instanceMaterial = Instantiate(_liquidRenderer.material);
|
_instanceMaterial = Instantiate(_liquidRenderer.material);
|
||||||
_liquidRenderer.material = _instanceMaterial;
|
_liquidRenderer.material = _instanceMaterial;
|
||||||
@ -179,8 +179,8 @@ namespace BlueWater
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnLiquidRegionEntered -= ShowPanel;
|
EventManager.OnLiquidRegionEntered -= ShowPanel;
|
||||||
TycoonEvents.OnLiquidRegionExited -= HidePanel;
|
EventManager.OnLiquidRegionExited -= HidePanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@ -378,7 +378,7 @@ namespace BlueWater
|
|||||||
_completeText.enabled = true;
|
_completeText.enabled = true;
|
||||||
|
|
||||||
// 1. 플레이어 음료 들기
|
// 1. 플레이어 음료 들기
|
||||||
TycoonEvents.OnCocktailCompleted?.Invoke(matchingCocktail);
|
EventManager.OnCocktailCompleted?.Invoke(matchingCocktail);
|
||||||
|
|
||||||
yield return new WaitForSeconds(1f);
|
yield return new WaitForSeconds(1f);
|
||||||
|
|
||||||
|
@ -8,12 +8,12 @@ namespace BlueWater
|
|||||||
{
|
{
|
||||||
if (GameManager.Instance.CurrentTycoonPlayer.IsCarriedItem()) return;
|
if (GameManager.Instance.CurrentTycoonPlayer.IsCarriedItem()) return;
|
||||||
|
|
||||||
TycoonEvents.OnLiquidRegionEntered?.Invoke();
|
EventManager.OnLiquidRegionEntered?.Invoke();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
private void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
TycoonEvents.OnLiquidRegionExited?.Invoke();
|
EventManager.OnLiquidRegionExited?.Invoke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using BlueWater.Uis;
|
|
||||||
using BlueWater.Utility;
|
using BlueWater.Utility;
|
||||||
using Sirenix.OdinInspector;
|
using Sirenix.OdinInspector;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
@ -46,7 +45,7 @@ namespace BlueWater.Maps
|
|||||||
private IEnumerator PortalCoroutine(Collider other)
|
private IEnumerator PortalCoroutine(Collider other)
|
||||||
{
|
{
|
||||||
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
PlayerInputKeyManager.Instance.DisableCurrentPlayerInput();
|
||||||
GlobalEvents.FadeInOut?.Invoke(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
EventManager.FadeInOut?.Invoke(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
||||||
//CombatUiManager.Instance.FadeInOut(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
//CombatUiManager.Instance.FadeInOut(_fadeInOutTime.x, _fadeInOutTime.y, _fadeColor, _delayAfterFadeIn);
|
||||||
yield return new WaitForSeconds(_fadeInOutTime.x);
|
yield return new WaitForSeconds(_fadeInOutTime.x);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ namespace BlueWater.Tycoons
|
|||||||
{
|
{
|
||||||
public override void Interaction()
|
public override void Interaction()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnCocktailDiscarded?.Invoke();
|
EventManager.OnCocktailDiscarded?.Invoke();
|
||||||
//CurrentTycoonPlayer.DiscardItem();
|
//CurrentTycoonPlayer.DiscardItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace BlueWater.Uis
|
|||||||
{
|
{
|
||||||
PopupUi.OnPopupUiOpenEvent += RegisterPopup;
|
PopupUi.OnPopupUiOpenEvent += RegisterPopup;
|
||||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
||||||
GlobalEvents.FadeInOut += FadeInOut;
|
EventManager.FadeInOut += FadeInOut;
|
||||||
|
|
||||||
Invoke(nameof(StartTutorial), 0.1f);
|
Invoke(nameof(StartTutorial), 0.1f);
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
PopupUi.OnPopupUiOpenEvent -= RegisterPopup;
|
PopupUi.OnPopupUiOpenEvent -= RegisterPopup;
|
||||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
||||||
GlobalEvents.FadeInOut -= FadeInOut;
|
EventManager.FadeInOut -= FadeInOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button("셋팅 초기화")]
|
[Button("셋팅 초기화")]
|
||||||
|
@ -41,14 +41,14 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnCocktailCompleted += SetItemImage;
|
EventManager.OnCocktailCompleted += SetItemImage;
|
||||||
TycoonEvents.OnCocktailDiscarded += DiscardItem;
|
EventManager.OnCocktailDiscarded += DiscardItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
TycoonEvents.OnCocktailCompleted -= SetItemImage;
|
EventManager.OnCocktailCompleted -= SetItemImage;
|
||||||
TycoonEvents.OnCocktailDiscarded -= DiscardItem;
|
EventManager.OnCocktailDiscarded -= DiscardItem;
|
||||||
_tween.Kill();
|
_tween.Kill();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ namespace BlueWater.Uis
|
|||||||
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
PopupUi.OnPopupUiCloseEvent += UnregisterPopup;
|
||||||
TycoonManager.Instance.OnTycoonOpenedEvent += TycoonOpenEvent;
|
TycoonManager.Instance.OnTycoonOpenedEvent += TycoonOpenEvent;
|
||||||
TycoonManager.Instance.OnTycoonClosedEvent += TycoonClosedEvent;
|
TycoonManager.Instance.OnTycoonClosedEvent += TycoonClosedEvent;
|
||||||
GlobalEvents.FadeInOut += FadeInOut;
|
EventManager.FadeInOut += FadeInOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
@ -64,7 +64,7 @@ namespace BlueWater.Uis
|
|||||||
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
PopupUi.OnPopupUiCloseEvent -= UnregisterPopup;
|
||||||
TycoonManager.Instance.OnTycoonOpenedEvent -= TycoonOpenEvent;
|
TycoonManager.Instance.OnTycoonOpenedEvent -= TycoonOpenEvent;
|
||||||
TycoonManager.Instance.OnTycoonClosedEvent -= TycoonClosedEvent;
|
TycoonManager.Instance.OnTycoonClosedEvent -= TycoonClosedEvent;
|
||||||
GlobalEvents.FadeInOut -= FadeInOut;
|
EventManager.FadeInOut -= FadeInOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user