0.3.2.10 업데이트2 (병합)
This commit is contained in:
parent
30423a4755
commit
3db4870837
File diff suppressed because it is too large
Load Diff
@ -283,6 +283,8 @@ namespace BlueWater.Tycoons
|
|||||||
// TODO : 레벨업 연출 추가 및 업그레이드 연출
|
// TODO : 레벨업 연출 추가 및 업그레이드 연출
|
||||||
var tycoonManager = TycoonManager.Instance;
|
var tycoonManager = TycoonManager.Instance;
|
||||||
var currentLevelData = tycoonManager.GetCurrentLevelData();
|
var currentLevelData = tycoonManager.GetCurrentLevelData();
|
||||||
|
EventManager.InvokeLevelUp(currentLevelData);
|
||||||
|
|
||||||
switch (currentLevelData.OpenUpgrade)
|
switch (currentLevelData.OpenUpgrade)
|
||||||
{
|
{
|
||||||
case "Upgrade0":
|
case "Upgrade0":
|
||||||
@ -314,8 +316,6 @@ namespace BlueWater.Tycoons
|
|||||||
tycoonManager.TycoonIngredientController.GarnishBarrel2.Activate();
|
tycoonManager.TycoonIngredientController.GarnishBarrel2.Activate();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventManager.InvokeLevelUp(currentLevelData);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -35,7 +35,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
EventManager.OnLevelUp += Test;
|
EventManager.OnLevelUp += CreateCardEvent;
|
||||||
|
|
||||||
_panel = transform.Find("Panel").gameObject;
|
_panel = transform.Find("Panel").gameObject;
|
||||||
HideUi();
|
HideUi();
|
||||||
@ -48,7 +48,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
private void OnDestroy()
|
private void OnDestroy()
|
||||||
{
|
{
|
||||||
EventManager.OnLevelUp -= Test;
|
EventManager.OnLevelUp -= CreateCardEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button("카드 생성하기(레벨업)")]
|
[Button("카드 생성하기(레벨업)")]
|
||||||
@ -147,7 +147,7 @@ namespace BlueWater.Uis
|
|||||||
_tycoonCard03Componet.Rotation_Start();
|
_tycoonCard03Componet.Rotation_Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Test(LevelData levelData)
|
private void CreateCardEvent(LevelData levelData)
|
||||||
{
|
{
|
||||||
_lvData = levelData;
|
_lvData = levelData;
|
||||||
if (_lvData.Idx == "1") return;
|
if (_lvData.Idx == "1") return;
|
||||||
@ -303,7 +303,7 @@ namespace BlueWater.Uis
|
|||||||
|
|
||||||
if (int.Parse(_lvData.Idx) % 5 == 0)
|
if (int.Parse(_lvData.Idx) % 5 == 0)
|
||||||
{
|
{
|
||||||
_upgradePopup.SetActive(true);
|
EventManager.InvokeUpgradeUi(_lvData);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,9 @@ using UnityEngine.UI;
|
|||||||
|
|
||||||
public class Upgrade_Popup : MonoBehaviour
|
public class Upgrade_Popup : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField]
|
||||||
|
private GameObject _panel;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private AnimationController _animationController;
|
private AnimationController _animationController;
|
||||||
private bool isReversing = false; // 애니메이션 상태를 체크할 변수
|
private bool isReversing = false; // 애니메이션 상태를 체크할 변수
|
||||||
@ -12,18 +15,25 @@ public class Upgrade_Popup : MonoBehaviour
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private Image information; //정보를 알려주는 이미지
|
private Image information; //정보를 알려주는 이미지
|
||||||
|
|
||||||
|
private void Start()
|
||||||
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
||||||
void OnEnable()
|
|
||||||
{
|
{
|
||||||
StartCoroutine(StartUpgradePopup());
|
EventManager.OnUpgradeUi += StartUpgradePopup;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
EventManager.OnUpgradeUi -= StartUpgradePopup;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void StartUpgradePopup(LevelData currentLevelData)
|
||||||
|
{
|
||||||
|
StartCoroutine(StartUpgradePopupCoroutine(currentLevelData));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable Unity.PerformanceAnalysis
|
// ReSharper disable Unity.PerformanceAnalysis
|
||||||
private IEnumerator StartUpgradePopup()
|
private IEnumerator StartUpgradePopupCoroutine(LevelData currentLevelData)
|
||||||
{
|
{
|
||||||
|
ShowUi();
|
||||||
|
|
||||||
float timer = 0f;
|
float timer = 0f;
|
||||||
|
|
||||||
while (timer < 1.0f)
|
while (timer < 1.0f)
|
||||||
@ -78,7 +88,9 @@ public class Upgrade_Popup : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||||
gameObject.SetActive(false);
|
HideUi();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowUi() => _panel.SetActive(true);
|
||||||
|
public void HideUi() => _panel.SetActive(false);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user