0.3.2.4 업데이트

This commit is contained in:
NTG_Lenovo 2024-10-24 17:05:32 +09:00
parent 9ca698b56f
commit b54b4a8b43
13 changed files with 170 additions and 160 deletions

View File

@ -2554,13 +2554,13 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 737939132} - {fileID: 1621314686}
m_Father: {fileID: 1049919592} m_Father: {fileID: 1049919592}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} 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} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &186139409 --- !u!114 &186139409
MonoBehaviour: MonoBehaviour:
@ -7651,112 +7651,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5} 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 --- !u!1 &738101929
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -18345,6 +18239,81 @@ MonoBehaviour:
m_DeselectOnBackgroundClick: 1 m_DeselectOnBackgroundClick: 1
m_PointerBehavior: 0 m_PointerBehavior: 0
m_CursorLockBehavior: 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 --- !u!1001 &1627308700
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -33,7 +33,7 @@ namespace BlueWater.Npcs.Customers
public enum CustomerInteractionType public enum CustomerInteractionType
{ {
None = 0, None = 0,
OrderCocktail ServedCocktail
} }
public class Customer : MonoBehaviour, IPlayerInteraction, ICrewInteraction public class Customer : MonoBehaviour, IPlayerInteraction, ICrewInteraction
@ -273,9 +273,16 @@ namespace BlueWater.Npcs.Customers
public void ServedItem(CocktailData cocktailData) public void ServedItem(CocktailData cocktailData)
{ {
CurrentTableSeat.SetFood();
BalloonUi.ReceiveItem(cocktailData); 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() public void Interaction()
@ -284,7 +291,7 @@ namespace BlueWater.Npcs.Customers
{ {
case CustomerInteractionType.None: case CustomerInteractionType.None:
break; break;
case CustomerInteractionType.OrderCocktail: case CustomerInteractionType.ServedCocktail:
var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem(); var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem();
var servedCocktailData = ItemManager.Instance.CocktailDataSo.GetDataByIdx(currentPickupItem.Idx); var servedCocktailData = ItemManager.Instance.CocktailDataSo.GetDataByIdx(currentPickupItem.Idx);
IsOrderedSucceed = currentPickupItem.Idx == OrderedCocktailData.Idx; IsOrderedSucceed = currentPickupItem.Idx == OrderedCocktailData.Idx;
@ -306,7 +313,7 @@ namespace BlueWater.Npcs.Customers
{ {
case CustomerInteractionType.None: case CustomerInteractionType.None:
return false; return false;
case CustomerInteractionType.OrderCocktail: case CustomerInteractionType.ServedCocktail:
var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem(); var currentPickupItem = GameManager.Instance.CurrentTycoonPlayer.TycoonPickupHandler.GetCurrentPickupItem();
return currentPickupItem != null; return currentPickupItem != null;
default: default:
@ -438,7 +445,7 @@ namespace BlueWater.Npcs.Customers
InteractionMessage = "칵테일 전달"; InteractionMessage = "칵테일 전달";
OrderedCocktailData = TycoonManager.Instance.TycoonIngredientController.GetRandomCocktailData(); OrderedCocktailData = TycoonManager.Instance.TycoonIngredientController.GetRandomCocktailData();
BalloonUi.OrderItem(OrderedCocktailData.Idx, CurrentLevelData.WaitTime, CurrentLevelData.HurryTime); BalloonUi.OrderItem(OrderedCocktailData.Idx, CurrentLevelData.WaitTime, CurrentLevelData.HurryTime);
_customerInteractionType = CustomerInteractionType.OrderCocktail; _customerInteractionType = CustomerInteractionType.ServedCocktail;
RegisterPlayerInteraction(); RegisterPlayerInteraction();
EventManager.InvokeOrderedCocktail(this); EventManager.InvokeOrderedCocktail(this);

View File

@ -57,8 +57,12 @@ namespace BlueWater
OnHideInteractionUi?.Invoke(); OnHideInteractionUi?.Invoke();
} }
// 플레이어 상호작용중 이벤트 // 플레이어 홀딩 상호작용중 이벤트
public static Action<float> OnInteracting; public static Action<float> OnHoldInteracting;
public static void InvokeHoldInteracting(float value)
{
OnHoldInteracting?.Invoke(value);
}
#endregion #endregion

View File

@ -37,6 +37,7 @@ namespace BlueWater.Tycoons
protected TycoonPlayer CurrentTycoonPlayer; protected TycoonPlayer CurrentTycoonPlayer;
protected bool IsQuitting; protected bool IsQuitting;
protected bool IsShowing;
protected Material OriginalMaterial; protected Material OriginalMaterial;
private void OnDrawGizmosSelected() private void OnDrawGizmosSelected()
@ -100,6 +101,7 @@ namespace BlueWater.Tycoons
{ {
VisualLook.material = OutlineMaterial; VisualLook.material = OutlineMaterial;
EventManager.InvokeShowInteractionUi(InteractionMessage); EventManager.InvokeShowInteractionUi(InteractionMessage);
IsShowing = true;
} }
public virtual void HideInteractionUi() public virtual void HideInteractionUi()
@ -109,6 +111,7 @@ namespace BlueWater.Tycoons
VisualLook.material = OriginalMaterial; VisualLook.material = OriginalMaterial;
} }
EventManager.InvokeHideInteractionUi(); EventManager.InvokeHideInteractionUi();
IsShowing = false;
} }
protected void RegisterPlayerInteraction() protected void RegisterPlayerInteraction()

View File

@ -68,8 +68,6 @@ namespace BlueWater.Tycoons
if (_isPlayerInteracting) if (_isPlayerInteracting)
{ {
var clamp = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f);
EventManager.OnInteracting?.Invoke(clamp);
if (_playerElapsedTime > _interactionHoldingTime) if (_playerElapsedTime > _interactionHoldingTime)
{ {
CleanTable(); CleanTable();
@ -77,6 +75,24 @@ namespace BlueWater.Tycoons
_playerElapsedTime += Time.deltaTime; _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) if (_isCrewInteracting)
{ {
@ -110,16 +126,12 @@ namespace BlueWater.Tycoons
public override void Interaction() public override void Interaction()
{ {
_playerElapsedTime = 0f;
EventManager.OnInteracting?.Invoke(_playerElapsedTime);
GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = true; GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = true;
_isPlayerInteracting = true; _isPlayerInteracting = true;
} }
public override void CancelInteraction() public override void CancelInteraction()
{ {
_playerElapsedTime = 0f;
EventManager.OnInteracting?.Invoke(_playerElapsedTime);
GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = false; GameManager.Instance.CurrentTycoonPlayer.IsCleaningTable = false;
_isPlayerInteracting = false; _isPlayerInteracting = false;
} }
@ -143,6 +155,7 @@ namespace BlueWater.Tycoons
_isCrewInteracting = false; _isCrewInteracting = false;
InteractionCanvas.BalloonUi.HideUi(); InteractionCanvas.BalloonUi.HideUi();
InteractionCanvas.BalloonUi.ResetUi(); InteractionCanvas.BalloonUi.ResetUi();
_playerElapsedTime = 0f;
} }
public void DirtyTable() public void DirtyTable()

View File

@ -40,8 +40,6 @@ namespace BlueWater.Tycoons
if (_isPlayerInteracting) if (_isPlayerInteracting)
{ {
var clamp = Mathf.Clamp(_playerElapsedTime / _interactionHoldingTime, 0f, 1f);
EventManager.OnInteracting?.Invoke(clamp);
if (_playerElapsedTime > _interactionHoldingTime) if (_playerElapsedTime > _interactionHoldingTime)
{ {
Destroy(); Destroy();
@ -49,6 +47,24 @@ namespace BlueWater.Tycoons
_playerElapsedTime += Time.deltaTime; _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) if (_isCrewInteracting)
{ {
@ -75,16 +91,12 @@ namespace BlueWater.Tycoons
public override void Interaction() public override void Interaction()
{ {
_playerElapsedTime = 0f;
EventManager.OnInteracting?.Invoke(_playerElapsedTime);
GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = true; GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = true;
_isPlayerInteracting = true; _isPlayerInteracting = true;
} }
public override void CancelInteraction() public override void CancelInteraction()
{ {
_playerElapsedTime = 0f;
EventManager.OnInteracting?.Invoke(_playerElapsedTime);
GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = false; GameManager.Instance.CurrentTycoonPlayer.IsCleaningFloor = false;
_isPlayerInteracting = false; _isPlayerInteracting = false;
} }
@ -102,14 +114,12 @@ namespace BlueWater.Tycoons
public void InteractionCrew(Crew crew) public void InteractionCrew(Crew crew)
{ {
_crewElapsedTime = 0f;
_isCrewInteracting = true; _isCrewInteracting = true;
((CleanerCrew)crew).SetIsCleaningFloor(true); ((CleanerCrew)crew).SetIsCleaningFloor(true);
} }
public void CancelInteractionCrew() public void CancelInteractionCrew()
{ {
_crewElapsedTime = 0f;
_isCrewInteracting = false; _isCrewInteracting = false;
} }

View File

@ -130,7 +130,7 @@ MonoBehaviour:
<Value>k__BackingField: <Value>k__BackingField:
<Idx>k__BackingField: ExpGetUp <Idx>k__BackingField: ExpGetUp
<Img>k__BackingField: ExpGetUpImg <Img>k__BackingField: ExpGetUpImg
<ScriptText>k__BackingField: "\uACBD\uD5D8\uCE58 \uD68D\uB4DD 5% \uC99D\uAC00" <ScriptText>k__BackingField: "\uACBD\uD5D8\uCE58 \uD68D\uB4DD 20% \uC99D\uAC00"
<Max>k__BackingField: 10 <Max>k__BackingField: 10
<Ratio>k__BackingField: 5 <Ratio>k__BackingField: 5
<Sprite>k__BackingField: {fileID: 21300000, guid: 400a47b8bcd0a1e4b823160ce9f40232, type: 3} <Sprite>k__BackingField: {fileID: 21300000, guid: 400a47b8bcd0a1e4b823160ce9f40232, type: 3}
@ -138,7 +138,7 @@ MonoBehaviour:
<Value>k__BackingField: <Value>k__BackingField:
<Idx>k__BackingField: GoldGetUp <Idx>k__BackingField: GoldGetUp
<Img>k__BackingField: GoldGetUpImg <Img>k__BackingField: GoldGetUpImg
<ScriptText>k__BackingField: "\uACE8\uB4DC \uD68D\uB4DD 5% \uC99D\uAC00" <ScriptText>k__BackingField: "\uACE8\uB4DC \uD68D\uB4DD 20% \uC99D\uAC00"
<Max>k__BackingField: 10 <Max>k__BackingField: 10
<Ratio>k__BackingField: 5 <Ratio>k__BackingField: 5
<Sprite>k__BackingField: {fileID: 21300000, guid: 121ed7da4e55d2a43ba798a00f95a474, type: 3} <Sprite>k__BackingField: {fileID: 21300000, guid: 121ed7da4e55d2a43ba798a00f95a474, type: 3}

View File

@ -23,14 +23,14 @@ namespace BlueWater.Uis
{ {
EventManager.OnShowInteractionUi += ShowUi; EventManager.OnShowInteractionUi += ShowUi;
EventManager.OnHideInteractionUi += HideUi; EventManager.OnHideInteractionUi += HideUi;
EventManager.OnInteracting += SetFillAmount; EventManager.OnHoldInteracting += SetFillAmount;
} }
private void OnDestroy() private void OnDestroy()
{ {
EventManager.OnShowInteractionUi -= ShowUi; EventManager.OnShowInteractionUi -= ShowUi;
EventManager.OnHideInteractionUi -= HideUi; EventManager.OnHideInteractionUi -= HideUi;
EventManager.OnInteracting -= SetFillAmount; EventManager.OnHoldInteracting -= SetFillAmount;
} }
public void ShowUi(string message) public void ShowUi(string message)

View File

@ -108,7 +108,7 @@ namespace BlueWater
var rotationAngle = Mathf.Lerp(8f, 40f, distance / _maxDistance); var rotationAngle = Mathf.Lerp(8f, 40f, distance / _maxDistance);
var punchStrength = Mathf.Lerp(1f, 5f, 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.Append(_rect.DOLocalMoveX(CurrentBillInfo.Position.x, moveTime));
moveSequence.Join(_rect.DOLocalRotate(new Vector3(0, 0, rotationAngle), moveTime / 5f)); 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) moveSequence.Join(_rect.DOPunchRotation(new Vector3(0f, 0f, punchStrength), moveTime * 4f / 5f, 3, 0.2f)
@ -174,14 +174,14 @@ namespace BlueWater
public void BartenderMakingCocktail() public void BartenderMakingCocktail()
{ {
_makingCocktailPivotObject.gameObject.SetActive(true); _makingCocktailPivotObject?.gameObject.SetActive(true);
} }
public void BartenderCompleteMakingCocktail() public void BartenderCompleteMakingCocktail()
{ {
_makingCocktailPivotObject.gameObject.SetActive(false); _makingCocktailPivotObject?.gameObject.SetActive(false);
_checkImageObject.gameObject.SetActive(true); _checkImageObject?.gameObject.SetActive(true);
_animationController.SetAnimationParameter("isBartenderChecked", true); _animationController?.SetAnimationParameter("isBartenderChecked", true);
} }
} }
} }

View File

@ -36,7 +36,7 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH
private float _maxRotationAngle; private float _maxRotationAngle;
private float _returnSpeed; private float _returnSpeed;
private TycoonCard _parent; //부모 private TycoonCard _tycoonCard; //부모
private float _returnSpeedTime = 0.0f; // 복원속도를 더할 메서드 private float _returnSpeedTime = 0.0f; // 복원속도를 더할 메서드
private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적 private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적
private Coroutine _startRotationCoroutine; private Coroutine _startRotationCoroutine;
@ -49,12 +49,12 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH
private void Awake() private void Awake()
{ {
_parent = transform.parent.GetComponent<TycoonCard>(); _tycoonCard = transform.parent.GetComponent<TycoonCard>();
_rectTransform = this.GetComponent<RectTransform>(); _rectTransform = this.GetComponent<RectTransform>();
_cardComTransform = transform.parent.Find("CardCom").GetComponent<Transform>(); _cardComTransform = transform.parent.Find("CardCom").GetComponent<Transform>();
_image = _cardComTransform.Find("Image").GetComponent<Image>(); _image = _cardComTransform.Find("Image").GetComponent<Image>();
_maxRotationAngle = _parent.maxRotationAngle; _maxRotationAngle = _tycoonCard.maxRotationAngle;
_returnSpeed = _parent.returnSpeed; _returnSpeed = _tycoonCard.returnSpeed;
} }
void Start() void Start()
@ -120,7 +120,7 @@ public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitH
{ {
if (_enable) if (_enable)
{ {
_parent.transform.parent.GetComponent<TycoonSelectCard>().SelectedCard(_parent); _tycoonCard.transform.parent.parent.GetComponent<TycoonSelectCard>().SelectedCard(_tycoonCard);
//해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로... //해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로...
this.SetEnable(false); this.SetEnable(false);

View File

@ -1,10 +1,5 @@
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using System.Linq;
using BlueWater.Players.Tycoons;
using BlueWater.Tycoons; using BlueWater.Tycoons;
using Mono.Cecil.Cil;
using Sirenix.OdinInspector; using Sirenix.OdinInspector;
using UnityEngine; using UnityEngine;
using Random = UnityEngine.Random; using Random = UnityEngine.Random;
@ -13,7 +8,7 @@ namespace BlueWater.Uis
{ {
public class TycoonSelectCard : MonoBehaviour public class TycoonSelectCard : MonoBehaviour
{ {
private GameObject _panel;
private Camera uiCamera; private Camera uiCamera;
[field: SerializeField, CLabel("카드 1")] [field: SerializeField, CLabel("카드 1")]
@ -36,6 +31,9 @@ namespace BlueWater.Uis
private void Awake() private void Awake()
{ {
EventManager.OnLevelUp += Test; EventManager.OnLevelUp += Test;
_panel = transform.Find("Panel").gameObject;
HideUi();
} }
void Start() void Start()
@ -70,13 +68,13 @@ namespace BlueWater.Uis
Destroy(_currentCard03); Destroy(_currentCard03);
} }
_currentCard01 = Instantiate(card01, this.transform); _currentCard01 = Instantiate(card01, _panel.transform);
_currentCard01.name = "Card01"; _currentCard01.name = "Card01";
_currentCard02 = Instantiate(card02, this.transform); _currentCard02 = Instantiate(card02, _panel.transform);
_currentCard02.name = "Card02"; _currentCard02.name = "Card02";
_currentCard03 = Instantiate(card03, this.transform); _currentCard03 = Instantiate(card03, _panel.transform);
_currentCard03.name = "Card03"; _currentCard03.name = "Card03";
_currentCard01.transform.localPosition = new Vector3(-550, 0, 0); _currentCard01.transform.localPosition = new Vector3(-550, 0, 0);
@ -87,6 +85,7 @@ namespace BlueWater.Uis
_tycoonCard02Componet = _currentCard02.GetComponent<TycoonCard>(); _tycoonCard02Componet = _currentCard02.GetComponent<TycoonCard>();
_tycoonCard03Componet = _currentCard03.GetComponent<TycoonCard>(); _tycoonCard03Componet = _currentCard03.GetComponent<TycoonCard>();
ShowUi();
//----카드 값 지정 및 초기화---- //----카드 값 지정 및 초기화----
@ -181,9 +180,9 @@ namespace BlueWater.Uis
case "SpeedUp": case "SpeedUp":
TycoonManager.Instance.TycoonStatus.PlayerMoveSpeedMultiplier += 0.05f; break; TycoonManager.Instance.TycoonStatus.PlayerMoveSpeedMultiplier += 0.05f; break;
case "ExpGetUp": case "ExpGetUp":
TycoonManager.Instance.TycoonStatus.ExpMultiplier += 0.05f; break; TycoonManager.Instance.TycoonStatus.ExpMultiplier += 0.2f; break;
case "GoldGetUp": case "GoldGetUp":
TycoonManager.Instance.TycoonStatus.GoldMultiplier += 0.05f; break; TycoonManager.Instance.TycoonStatus.GoldMultiplier += 0.2f; break;
// case "CleanUp": return; break; // case "CleanUp": return; break;
// case "GaugeReset": return; break; // case "GaugeReset": return; break;
default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return; break; default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return; break;
@ -290,7 +289,12 @@ namespace BlueWater.Uis
Destroy(_currentCard03); Destroy(_currentCard03);
} }
HideUi();
VisualFeedbackManager.Instance.ResetTimeScale(); VisualFeedbackManager.Instance.ResetTimeScale();
} }
public void ShowUi() => _panel.SetActive(true);
public void HideUi() => _panel.SetActive(false);
} }
} }

View File

@ -100,14 +100,14 @@
{ {
"Idx": "ExpGetUp", "Idx": "ExpGetUp",
"Img": "ExpGetUpImg", "Img": "ExpGetUpImg",
"ScriptText": "경험치 획득 5% 증가", "ScriptText": "경험치 획득 20% 증가",
"Max": 10, "Max": 10,
"Ratio": 5 "Ratio": 5
}, },
{ {
"Idx": "GoldGetUp", "Idx": "GoldGetUp",
"Img": "GoldGetUpImg", "Img": "GoldGetUpImg",
"ScriptText": "골드 획득 5% 증가", "ScriptText": "골드 획득 20% 증가",
"Max": 10, "Max": 10,
"Ratio": 5 "Ratio": 5
}, },