diff --git a/Assets/01.Scenes/01.Tycoon.unity b/Assets/01.Scenes/01.Tycoon.unity index 3a8bd1736..aa2248500 100644 --- a/Assets/01.Scenes/01.Tycoon.unity +++ b/Assets/01.Scenes/01.Tycoon.unity @@ -2554,13 +2554,13 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: - - {fileID: 737939132} + - {fileID: 1621314686} m_Father: {fileID: 1049919592} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &186139409 MonoBehaviour: @@ -7651,112 +7651,6 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} ---- !u!1001 &737939131 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - serializedVersion: 3 - m_TransformParent: {fileID: 186139408} - m_Modifications: - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchorMax.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchorMax.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchorMin.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchorMin.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_SizeDelta.x - value: 100 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_SizeDelta.y - value: 100 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 5785355462301107295, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_Name - value: Card - objectReference: {fileID: 0} - - target: {fileID: 5785355462301107295, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - propertyPath: m_IsActive - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_RemovedGameObjects: [] - m_AddedGameObjects: [] - m_AddedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 2116ffd228314c745b8615652b11d19e, type: 3} ---- !u!224 &737939132 stripped -RectTransform: - m_CorrespondingSourceObject: {fileID: 725714798138964366, guid: 2116ffd228314c745b8615652b11d19e, type: 3} - m_PrefabInstance: {fileID: 737939131} - m_PrefabAsset: {fileID: 0} --- !u!1 &738101929 GameObject: m_ObjectHideFlags: 0 @@ -18345,6 +18239,81 @@ MonoBehaviour: m_DeselectOnBackgroundClick: 1 m_PointerBehavior: 0 m_CursorLockBehavior: 0 +--- !u!1 &1621314685 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1621314686} + - component: {fileID: 1621314688} + - component: {fileID: 1621314687} + m_Layer: 5 + m_Name: Panel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!224 &1621314686 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621314685} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 186139408} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1621314687 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621314685} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 0.78431374} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &1621314688 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1621314685} + m_CullTransparentMesh: 1 --- !u!1001 &1627308700 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Assets/02.Scripts/Character/Npc/Customer/Customer.cs b/Assets/02.Scripts/Character/Npc/Customer/Customer.cs index 0a16ec50c..460e78556 100644 --- a/Assets/02.Scripts/Character/Npc/Customer/Customer.cs +++ b/Assets/02.Scripts/Character/Npc/Customer/Customer.cs @@ -33,7 +33,7 @@ namespace BlueWater.Npcs.Customers public enum CustomerInteractionType { None = 0, - OrderCocktail + ServedCocktail } public class Customer : MonoBehaviour, IPlayerInteraction, ICrewInteraction @@ -273,9 +273,16 @@ namespace BlueWater.Npcs.Customers public void ServedItem(CocktailData cocktailData) { - CurrentTableSeat.SetFood(); BalloonUi.ReceiveItem(cocktailData); - StateMachineController.TransitionToState(IsOrderedSucceed ? HappyState : UpsetState, this); + if (IsOrderedSucceed) + { + CurrentTableSeat.SetFood(); + StateMachineController.TransitionToState(HappyState, this); + } + else + { + StateMachineController.TransitionToState(UpsetState, this); + } } public void Interaction() @@ -284,7 +291,7 @@ namespace BlueWater.Npcs.Customers { case CustomerInteractionType.None: break; - case CustomerInteractionType.OrderCocktail: + case CustomerInteractionType.ServedCocktail: var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem(); var servedCocktailData = ItemManager.Instance.CocktailDataSo.GetDataByIdx(currentPickupItem.Idx); IsOrderedSucceed = currentPickupItem.Idx == OrderedCocktailData.Idx; @@ -306,7 +313,7 @@ namespace BlueWater.Npcs.Customers { case CustomerInteractionType.None: return false; - case CustomerInteractionType.OrderCocktail: + case CustomerInteractionType.ServedCocktail: var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem(); return currentPickupItem != null; default: @@ -438,7 +445,7 @@ namespace BlueWater.Npcs.Customers InteractionMessage = "칵테일 전달"; OrderedCocktailData = TycoonManager.Instance.TycoonIngredientController.GetRandomCocktailData(); BalloonUi.OrderItem(OrderedCocktailData.Idx, CurrentLevelData.WaitTime, CurrentLevelData.HurryTime); - _customerInteractionType = CustomerInteractionType.OrderCocktail; + _customerInteractionType = CustomerInteractionType.ServedCocktail; RegisterPlayerInteraction(); EventManager.InvokeOrderedCocktail(this); diff --git a/Assets/02.Scripts/EventManager.cs b/Assets/02.Scripts/EventManager.cs index 7c1c06b20..1f9079496 100644 --- a/Assets/02.Scripts/EventManager.cs +++ b/Assets/02.Scripts/EventManager.cs @@ -57,8 +57,12 @@ namespace BlueWater OnHideInteractionUi?.Invoke(); } - // 플레이어 상호작용중 이벤트 - public static Action OnInteracting; + // 플레이어 홀딩 상호작용중 이벤트 + public static Action OnHoldInteracting; + public static void InvokeHoldInteracting(float value) + { + OnHoldInteracting?.Invoke(value); + } #endregion diff --git a/Assets/02.Scripts/Prop/Tycoon/InteractionFuniture.cs b/Assets/02.Scripts/Prop/Tycoon/InteractionFuniture.cs index 181e2e581..2dec64a81 100644 --- a/Assets/02.Scripts/Prop/Tycoon/InteractionFuniture.cs +++ b/Assets/02.Scripts/Prop/Tycoon/InteractionFuniture.cs @@ -37,6 +37,7 @@ namespace BlueWater.Tycoons protected TycoonPlayer CurrentTycoonPlayer; protected bool IsQuitting; + protected bool IsShowing; protected Material OriginalMaterial; private void OnDrawGizmosSelected() @@ -100,6 +101,7 @@ namespace BlueWater.Tycoons { VisualLook.material = OutlineMaterial; EventManager.InvokeShowInteractionUi(InteractionMessage); + IsShowing = true; } public virtual void HideInteractionUi() @@ -109,6 +111,7 @@ namespace BlueWater.Tycoons VisualLook.material = OriginalMaterial; } EventManager.InvokeHideInteractionUi(); + IsShowing = false; } protected void RegisterPlayerInteraction() diff --git a/Assets/02.Scripts/Prop/Tycoon/TableSeat.cs b/Assets/02.Scripts/Prop/Tycoon/TableSeat.cs index cfbffda69..b265aa671 100644 --- a/Assets/02.Scripts/Prop/Tycoon/TableSeat.cs +++ b/Assets/02.Scripts/Prop/Tycoon/TableSeat.cs @@ -68,8 +68,6 @@ namespace BlueWater.Tycoons if (_isPlayerInteracting) { - var clamp = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f); - EventManager.OnInteracting?.Invoke(clamp); if (_playerElapsedTime > _interactionHoldingTime) { CleanTable(); @@ -77,6 +75,24 @@ namespace BlueWater.Tycoons _playerElapsedTime += Time.deltaTime; } + else + { + if (_playerElapsedTime > 0f) + { + _playerElapsedTime -= Time.deltaTime; + } + } + + var holdingGauge = 0f; + if (_playerElapsedTime > 0f) + { + holdingGauge = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f); + } + + if (IsShowing) + { + EventManager.InvokeHoldInteracting(holdingGauge); + } if (_isCrewInteracting) { @@ -110,16 +126,12 @@ namespace BlueWater.Tycoons public override void Interaction() { - _playerElapsedTime = 0f; - EventManager.OnInteracting?.Invoke(_playerElapsedTime); GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = true; _isPlayerInteracting = true; } public override void CancelInteraction() { - _playerElapsedTime = 0f; - EventManager.OnInteracting?.Invoke(_playerElapsedTime); GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = false; _isPlayerInteracting = false; } @@ -143,6 +155,7 @@ namespace BlueWater.Tycoons _isCrewInteracting = false; InteractionCanvas.BalloonUi.HideUi(); InteractionCanvas.BalloonUi.ResetUi(); + _playerElapsedTime = 0f; } public void DirtyTable() diff --git a/Assets/02.Scripts/Prop/Tycoon/Vomiting.cs b/Assets/02.Scripts/Prop/Tycoon/Vomiting.cs index 5ff1f9c2f..d9f42fa34 100644 --- a/Assets/02.Scripts/Prop/Tycoon/Vomiting.cs +++ b/Assets/02.Scripts/Prop/Tycoon/Vomiting.cs @@ -40,8 +40,6 @@ namespace BlueWater.Tycoons if (_isPlayerInteracting) { - var clamp = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f); - EventManager.OnInteracting?.Invoke(clamp); if (_playerElapsedTime > _interactionHoldingTime) { Destroy(); @@ -49,6 +47,24 @@ namespace BlueWater.Tycoons _playerElapsedTime += Time.deltaTime; } + else + { + if (_playerElapsedTime > 0f) + { + _playerElapsedTime -= Time.deltaTime; + } + } + + var holdingGauge = 0f; + if (_playerElapsedTime > 0f) + { + holdingGauge = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f); + } + + if (IsShowing) + { + EventManager.InvokeHoldInteracting(holdingGauge); + } if (_isCrewInteracting) { @@ -75,16 +91,12 @@ namespace BlueWater.Tycoons public override void Interaction() { - _playerElapsedTime = 0f; - EventManager.OnInteracting?.Invoke(_playerElapsedTime); GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = true; _isPlayerInteracting = true; } public override void CancelInteraction() { - _playerElapsedTime = 0f; - EventManager.OnInteracting?.Invoke(_playerElapsedTime); GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = false; _isPlayerInteracting = false; } @@ -102,14 +114,12 @@ namespace BlueWater.Tycoons public void InteractionCrew(Crew crew) { - _crewElapsedTime = 0f; _isCrewInteracting = true; ((CleanerCrew)crew).SetIsCleaningFloor(true); } public void CancelInteractionCrew() { - _crewElapsedTime = 0f; _isCrewInteracting = false; } diff --git a/Assets/02.Scripts/ScriptableObject/CardDataTable.asset b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset index b90d7cd6d..cc6a9106e 100644 --- a/Assets/02.Scripts/ScriptableObject/CardDataTable.asset +++ b/Assets/02.Scripts/ScriptableObject/CardDataTable.asset @@ -130,7 +130,7 @@ MonoBehaviour: k__BackingField: k__BackingField: ExpGetUp k__BackingField: ExpGetUpImg - k__BackingField: "\uACBD\uD5D8\uCE58 \uD68D\uB4DD 5% \uC99D\uAC00" + k__BackingField: "\uACBD\uD5D8\uCE58 \uD68D\uB4DD 20% \uC99D\uAC00" k__BackingField: 10 k__BackingField: 5 k__BackingField: {fileID: 21300000, guid: 400a47b8bcd0a1e4b823160ce9f40232, type: 3} @@ -138,7 +138,7 @@ MonoBehaviour: k__BackingField: k__BackingField: GoldGetUp k__BackingField: GoldGetUpImg - k__BackingField: "\uACE8\uB4DC \uD68D\uB4DD 5% \uC99D\uAC00" + k__BackingField: "\uACE8\uB4DC \uD68D\uB4DD 20% \uC99D\uAC00" k__BackingField: 10 k__BackingField: 5 k__BackingField: {fileID: 21300000, guid: 121ed7da4e55d2a43ba798a00f95a474, type: 3} diff --git a/Assets/02.Scripts/Ui/InteractionUi.cs b/Assets/02.Scripts/Ui/InteractionUi.cs index 94912fc20..143e393d6 100644 --- a/Assets/02.Scripts/Ui/InteractionUi.cs +++ b/Assets/02.Scripts/Ui/InteractionUi.cs @@ -23,14 +23,14 @@ namespace BlueWater.Uis { EventManager.OnShowInteractionUi += ShowUi; EventManager.OnHideInteractionUi += HideUi; - EventManager.OnInteracting += SetFillAmount; + EventManager.OnHoldInteracting += SetFillAmount; } private void OnDestroy() { EventManager.OnShowInteractionUi -= ShowUi; EventManager.OnHideInteractionUi -= HideUi; - EventManager.OnInteracting -= SetFillAmount; + EventManager.OnHoldInteracting -= SetFillAmount; } public void ShowUi(string message) diff --git a/Assets/02.Scripts/Ui/Tycoon/Bill.cs b/Assets/02.Scripts/Ui/Tycoon/Bill.cs index 0dae25614..2d4595784 100644 --- a/Assets/02.Scripts/Ui/Tycoon/Bill.cs +++ b/Assets/02.Scripts/Ui/Tycoon/Bill.cs @@ -108,7 +108,7 @@ namespace BlueWater var rotationAngle = Mathf.Lerp(8f, 40f, distance / _maxDistance); var punchStrength = Mathf.Lerp(1f, 5f, distance / _maxDistance); - var moveSequence = DOTween.Sequence(); + var moveSequence = DOTween.Sequence().SetAutoKill(true); moveSequence.Append(_rect.DOLocalMoveX(CurrentBillInfo.Position.x, moveTime)); moveSequence.Join(_rect.DOLocalRotate(new Vector3(0, 0, rotationAngle), moveTime / 5f)); moveSequence.Join(_rect.DOPunchRotation(new Vector3(0f, 0f, punchStrength), moveTime * 4f / 5f, 3, 0.2f) @@ -174,14 +174,14 @@ namespace BlueWater public void BartenderMakingCocktail() { - _makingCocktailPivotObject.gameObject.SetActive(true); + _makingCocktailPivotObject?.gameObject.SetActive(true); } public void BartenderCompleteMakingCocktail() { - _makingCocktailPivotObject.gameObject.SetActive(false); - _checkImageObject.gameObject.SetActive(true); - _animationController.SetAnimationParameter("isBartenderChecked", true); + _makingCocktailPivotObject?.gameObject.SetActive(false); + _checkImageObject?.gameObject.SetActive(true); + _animationController?.SetAnimationParameter("isBartenderChecked", true); } } } \ No newline at end of file diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonCardArea.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonCardArea.cs index 34b8a6829..a0436728f 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonCardArea.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonCardArea.cs @@ -36,7 +36,7 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH private float _maxRotationAngle; private float _returnSpeed; - private TycoonCard _parent; //부모 + private TycoonCard _tycoonCard; //부모 private float _returnSpeedTime = 0.0f; // 복원속도를 더할 메서드 private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적 private Coroutine _startRotationCoroutine; @@ -49,12 +49,12 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH private void Awake() { - _parent = transform.parent.GetComponent(); + _tycoonCard = transform.parent.GetComponent(); _rectTransform = this.GetComponent(); _cardComTransform = transform.parent.Find("CardCom").GetComponent(); _image = _cardComTransform.Find("Image").GetComponent(); - _maxRotationAngle = _parent.maxRotationAngle; - _returnSpeed = _parent.returnSpeed; + _maxRotationAngle = _tycoonCard.maxRotationAngle; + _returnSpeed = _tycoonCard.returnSpeed; } void Start() @@ -120,7 +120,7 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH { if (_enable) { - _parent.transform.parent.GetComponent().SelectedCard(_parent); + _tycoonCard.transform.parent.parent.GetComponent().SelectedCard(_tycoonCard); //해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로... this.SetEnable(false); diff --git a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs index 08e6a7f08..b5d08cb0a 100644 --- a/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs +++ b/Assets/02.Scripts/Ui/Tycoon/TycoonSelectCard.cs @@ -1,10 +1,5 @@ -using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; -using BlueWater.Players.Tycoons; using BlueWater.Tycoons; -using Mono.Cecil.Cil; using Sirenix.OdinInspector; using UnityEngine; using Random = UnityEngine.Random; @@ -13,7 +8,7 @@ namespace BlueWater.Uis { public class TycoonSelectCard : MonoBehaviour { - + private GameObject _panel; private Camera uiCamera; [field: SerializeField, CLabel("카드 1")] @@ -36,6 +31,9 @@ namespace BlueWater.Uis private void Awake() { EventManager.OnLevelUp += Test; + + _panel = transform.Find("Panel").gameObject; + HideUi(); } void Start() @@ -70,13 +68,13 @@ namespace BlueWater.Uis Destroy(_currentCard03); } - _currentCard01 = Instantiate(card01, this.transform); + _currentCard01 = Instantiate(card01, _panel.transform); _currentCard01.name = "Card01"; - _currentCard02 = Instantiate(card02, this.transform); + _currentCard02 = Instantiate(card02, _panel.transform); _currentCard02.name = "Card02"; - _currentCard03 = Instantiate(card03, this.transform); + _currentCard03 = Instantiate(card03, _panel.transform); _currentCard03.name = "Card03"; _currentCard01.transform.localPosition = new Vector3(-550, 0, 0); @@ -86,7 +84,8 @@ namespace BlueWater.Uis _tycoonCard01Componet = _currentCard01.GetComponent(); _tycoonCard02Componet = _currentCard02.GetComponent(); _tycoonCard03Componet = _currentCard03.GetComponent(); - + + ShowUi(); //----카드 값 지정 및 초기화---- @@ -181,9 +180,9 @@ namespace BlueWater.Uis case "SpeedUp": TycoonManager.Instance.TycoonStatus.PlayerMoveSpeedMultiplier += 0.05f; break; case "ExpGetUp": - TycoonManager.Instance.TycoonStatus.ExpMultiplier += 0.05f; break; + TycoonManager.Instance.TycoonStatus.ExpMultiplier += 0.2f; break; case "GoldGetUp": - TycoonManager.Instance.TycoonStatus.GoldMultiplier += 0.05f; break; + TycoonManager.Instance.TycoonStatus.GoldMultiplier += 0.2f; break; // case "CleanUp": return; break; // case "GaugeReset": return; break; default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return; break; @@ -290,7 +289,12 @@ namespace BlueWater.Uis Destroy(_currentCard03); } + HideUi(); + VisualFeedbackManager.Instance.ResetTimeScale(); } + + public void ShowUi() => _panel.SetActive(true); + public void HideUi() => _panel.SetActive(false); } } diff --git a/Assets/Resources/Excel/CardDataTable.xlsx b/Assets/Resources/Excel/CardDataTable.xlsx index ff314a0c0..ee43ce23c 100644 Binary files a/Assets/Resources/Excel/CardDataTable.xlsx and b/Assets/Resources/Excel/CardDataTable.xlsx differ diff --git a/Assets/Resources/JSON/CardDataTable.json b/Assets/Resources/JSON/CardDataTable.json index dfe1eba30..0493e324a 100644 --- a/Assets/Resources/JSON/CardDataTable.json +++ b/Assets/Resources/JSON/CardDataTable.json @@ -100,14 +100,14 @@ { "Idx": "ExpGetUp", "Img": "ExpGetUpImg", - "ScriptText": "경험치 획득 5% 증가", + "ScriptText": "경험치 획득 20% 증가", "Max": 10, "Ratio": 5 }, { "Idx": "GoldGetUp", "Img": "GoldGetUpImg", - "ScriptText": "골드 획득 5% 증가", + "ScriptText": "골드 획득 20% 증가", "Max": 10, "Ratio": 5 },