From 0f8f398c99c0cf80c5c445b17390a4365dfd5c52 Mon Sep 17 00:00:00 2001 From: SweetJJuya Date: Tue, 8 Oct 2024 15:45:46 +0900 Subject: [PATCH] 0.3.0.10 --- Assets/02.Scripts/Tycoon/TycoonStatus.cs | 2 +- .../02.Scripts/Ui/Tycoon/TycoonSelectCard.cs | 39 ++++++++++++------- Assets/02.Scripts/VisualFeedbackManager.cs | 8 ++++ 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/Assets/02.Scripts/Tycoon/TycoonStatus.cs b/Assets/02.Scripts/Tycoon/TycoonStatus.cs index 1aa89afe7..d838b0334 100644 --- a/Assets/02.Scripts/Tycoon/TycoonStatus.cs +++ b/Assets/02.Scripts/Tycoon/TycoonStatus.cs @@ -319,7 +319,7 @@ namespace BlueWater.Tycoons tycoonManager.TycoonIngredientController.GarnishBarrel2.Activate(); break; } - + EventManager.OnLevelUp?.Invoke(currentLevelData); } } diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs index 697057f29..78b441288 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs @@ -1,3 +1,4 @@ +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -6,6 +7,7 @@ using BlueWater.Tycoons; using Mono.Cecil.Cil; using Sirenix.OdinInspector; using UnityEngine; +using Random = UnityEngine.Random; namespace BlueWater.Uis { @@ -29,19 +31,28 @@ namespace BlueWater.Uis private TycoonCard _tycoonCard02Componet; private TycoonCard _tycoonCard03Componet; - + private void Awake() + { + EventManager.OnLevelUp += Test; + } void Start() { uiCamera = TycoonCameraManager.Instance.UiCamera; } + private void OnDestroy() + { + EventManager.OnLevelUp -= Test; + } + [Button("카드 생성하기(레벨업)")] private void CreateCard() { if (!Application.isPlaying) return; - VisualFeedbackManager.Instance.SetBaseTimeScale(0f); + VisualFeedbackManager.Instance.SetBaseTimeScale(0f); + // 기존 카드가 있으면 삭제 if (_currentCard01 != null) @@ -114,11 +125,15 @@ namespace BlueWater.Uis _tycoonCard03Componet.Rotation_Start(); } + private void Test(LevelData levelData) + { + if (levelData.Idx == "1") return; + + CreateCard(); + } + public void SelectedCard(TycoonCard currTycoonCard) { - - VisualFeedbackManager.Instance.ResetTimeScale(); - switch (currTycoonCard.CardDataForIdx.Idx) //탐색 후 행동... { case "HeartPlus": @@ -147,8 +162,10 @@ namespace BlueWater.Uis // case "ChefNpc": return; break; case "SpeedUp": TycoonManager.Instance.TycoonStatus.PlayerMoveSpeedMultiplier += 0.05f; break; - //case "ExpGetUp": return; break; - // case "GoldGetUp": return; break; + case "ExpGetUp": + TycoonManager.Instance.TycoonStatus.ExpMultiplier += 0.05f; break; + case "GoldGetUp": + TycoonManager.Instance.TycoonStatus.GoldMultiplier += 0.05f; break; // case "CleanUp": return; break; // case "GaugeReset": return; break; default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return; break; @@ -256,13 +273,7 @@ namespace BlueWater.Uis Destroy(_currentCard03); } + VisualFeedbackManager.Instance.ResetTimeScale(); } - - private void Awake() - { - - } - - } } diff --git a/Assets/02.Scripts/VisualFeedbackManager.cs b/Assets/02.Scripts/VisualFeedbackManager.cs index 3a6cd4914..14e861ae1 100644 --- a/Assets/02.Scripts/VisualFeedbackManager.cs +++ b/Assets/02.Scripts/VisualFeedbackManager.cs @@ -10,8 +10,16 @@ namespace BlueWater private float _baseTimeScale = 1f; private float _currentHitStopCoefficient = 1f; + protected override void OnAwake() + { + base.OnAwake(); + + ResetTimeScale(); + } + public void SetBaseTimeScale(float value) { + print("테스트"); _baseTimeScale = value; UpdateTimeScale(); }