0.3.4.1 업데이트
This commit is contained in:
parent
6298020485
commit
d9110b34df
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2b07a151b44ee849a1d12d9dc5bc87a
|
||||
guid: 3ea738b777ba3f44d933ba8ef7ef1b00
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
43675
Assets/01.Scenes/Old/01.Tycoon.unity
Normal file
43675
Assets/01.Scenes/Old/01.Tycoon.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/01.Scenes/Old/01.Tycoon.unity.meta
Normal file
7
Assets/01.Scenes/Old/01.Tycoon.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2b07a151b44ee849a1d12d9dc5bc87a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,35 +0,0 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class CleaningFloorState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.CleaningFloor, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.IsCleaningFloor) return;
|
||||
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9065ba3166960104ea1715dba2ec1747
|
@ -1,35 +0,0 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class CleaningTableState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.CleaningTable, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.IsCleaningTable) return;
|
||||
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36ffcbf803ac0c4488a1ebd0bc1bf893
|
@ -16,27 +16,15 @@ namespace BlueWater.Players.Tycoons
|
||||
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
character.StateMachineController.TransitionToState(character.WalkingState, character);
|
||||
}
|
||||
else if (character.IsMakingCocktail)
|
||||
else if (character.IsMakingCocktail || character.IsCleaningFloor || character.IsCleaningTable || character.IsPumping)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.MakingCocktailState, character);
|
||||
}
|
||||
else if (character.IsCleaningFloor)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningFloorState, character);
|
||||
}
|
||||
else if (character.IsCleaningTable)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningTableState, character);
|
||||
character.StateMachineController.TransitionToState(character.InteractionState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
character.StateMachineController.TransitionToState(character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,37 +4,27 @@ namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class IdleState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
private bool _previousIsPickedUpAnything;
|
||||
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.Idle, true);
|
||||
_previousIsPickedUpAnything = character.TycoonPickupHandler.IsPickedUpAnything();
|
||||
character.SpineController.PlayAnimation(_previousIsPickedUpAnything ? TycoonPlayerSpineAnimation.ServingIdle : TycoonPlayerSpineAnimation.Idle, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
character.StateMachineController.TransitionToState(character.WalkingState, character);
|
||||
}
|
||||
else if (character.IsMakingCocktail)
|
||||
else if (character.IsMakingCocktail || character.IsCleaningFloor || character.IsCleaningTable || character.IsPumping)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.MakingCocktailState, character);
|
||||
character.StateMachineController.TransitionToState(character.InteractionState, character);
|
||||
}
|
||||
else if (character.IsCleaningFloor)
|
||||
else if (character.TycoonPickupHandler.IsPickedUpAnything() != _previousIsPickedUpAnything)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningFloorState, character);
|
||||
}
|
||||
else if (character.IsCleaningTable)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningTableState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
if (character.TycoonPickupHandler.IsPickedUpAnything())
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.ServingIdleState, character);
|
||||
}
|
||||
EnterState(character);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,65 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class InteractionState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
private string _previousAnimationName;
|
||||
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
string newAnimationName = GetAnimationName(character);
|
||||
|
||||
if (newAnimationName != _previousAnimationName)
|
||||
{
|
||||
_previousAnimationName = newAnimationName;
|
||||
character.SpineController.PlayAnimation(_previousAnimationName, true);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.IsMakingCocktail || character.IsCleaningFloor || character.IsCleaningTable || character.IsPumping)
|
||||
{
|
||||
EnterState(character);
|
||||
}
|
||||
else if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.WalkingState, character);
|
||||
_previousAnimationName = null;
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.IdleState, character);
|
||||
_previousAnimationName = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private string GetAnimationName(TycoonPlayer character)
|
||||
{
|
||||
if (character.IsMakingCocktail)
|
||||
{
|
||||
return TycoonPlayerSpineAnimation.MakingCocktail;
|
||||
}
|
||||
if (character.IsCleaningFloor)
|
||||
{
|
||||
return TycoonPlayerSpineAnimation.CleaningFloor;
|
||||
}
|
||||
if (character.IsCleaningTable)
|
||||
{
|
||||
return TycoonPlayerSpineAnimation.CleaningTable;
|
||||
}
|
||||
if (character.IsPumping)
|
||||
{
|
||||
return TycoonPlayerSpineAnimation.Pumping;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a5064c0888f02845bf70b76a3ad433c
|
@ -1,35 +0,0 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class MakingCocktailState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.MakingCocktail, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.IsMakingCocktail) return;
|
||||
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac7339b414b7c484daf1222ae15414d6
|
@ -1,46 +0,0 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class ServingIdleState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.ServingIdle, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingState
|
||||
: character.WalkingState, character);
|
||||
}
|
||||
else if (character.IsMakingCocktail)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.MakingCocktailState, character);
|
||||
}
|
||||
else if (character.IsCleaningFloor)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningFloorState, character);
|
||||
}
|
||||
else if (character.IsCleaningTable)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningTableState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
if (!character.TycoonPickupHandler.IsPickedUpAnything())
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.IdleState, character);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1fc2d984ba7abe4b8c03f3185042c8a
|
@ -1,46 +0,0 @@
|
||||
using BlueWater.Interfaces;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class ServingState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.Serving, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
{
|
||||
if (!character.TycoonPickupHandler.IsPickedUpAnything())
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.WalkingState, character);
|
||||
}
|
||||
}
|
||||
else if (character.IsMakingCocktail)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.MakingCocktailState, character);
|
||||
}
|
||||
else if (character.IsCleaningFloor)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningFloorState, character);
|
||||
}
|
||||
else if (character.IsCleaningTable)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningTableState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
public void ExitState(TycoonPlayer character)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8095077d57ce80644b938bc37f010bcc
|
@ -4,37 +4,27 @@ namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
public class WalkingState : IStateMachine<TycoonPlayer>
|
||||
{
|
||||
private bool _previousIsPickedUpAnything;
|
||||
|
||||
public void EnterState(TycoonPlayer character)
|
||||
{
|
||||
character.SpineController.PlayAnimation(TycoonPlayerSpineAnimation.Walking, true);
|
||||
_previousIsPickedUpAnything = character.TycoonPickupHandler.IsPickedUpAnything();
|
||||
character.SpineController.PlayAnimation(_previousIsPickedUpAnything ? TycoonPlayerSpineAnimation.Serving : TycoonPlayerSpineAnimation.Walking, true);
|
||||
}
|
||||
|
||||
public void UpdateState(TycoonPlayer character)
|
||||
{
|
||||
if (character.TycoonMovement.IsMoving)
|
||||
if (character.TycoonPickupHandler.IsPickedUpAnything() != _previousIsPickedUpAnything)
|
||||
{
|
||||
if (character.TycoonPickupHandler.IsPickedUpAnything())
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.ServingState, character);
|
||||
}
|
||||
EnterState(character);
|
||||
}
|
||||
else if (character.IsMakingCocktail)
|
||||
else if (character.IsMakingCocktail || character.IsCleaningFloor || character.IsCleaningTable || character.IsPumping)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.MakingCocktailState, character);
|
||||
}
|
||||
else if (character.IsCleaningFloor)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningFloorState, character);
|
||||
}
|
||||
else if (character.IsCleaningTable)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.CleaningTableState, character);
|
||||
character.StateMachineController.TransitionToState(character.InteractionState, character);
|
||||
}
|
||||
else if (!character.TycoonMovement.IsMoving)
|
||||
{
|
||||
character.StateMachineController.TransitionToState(character.TycoonPickupHandler.IsPickedUpAnything()
|
||||
? character.ServingIdleState
|
||||
: character.IdleState, character);
|
||||
character.StateMachineController.TransitionToState(character.IdleState, character);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Interfaces;
|
||||
using BlueWater.Tycoons;
|
||||
using BlueWater.Uis;
|
||||
using BlueWater.Utility;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
@ -16,30 +11,24 @@ namespace BlueWater.Players.Tycoons
|
||||
// variables
|
||||
#region variables
|
||||
|
||||
// Components
|
||||
[SerializeField]
|
||||
private PlayerInput _playerInput;
|
||||
|
||||
private List<IPlayerInteraction> _playerInteractions = new();
|
||||
private IPlayerInteraction _closestInteraction;
|
||||
private IPlayerInteraction _previousInteraction;
|
||||
|
||||
// Events
|
||||
public event Action<Vector2> OnMoveInputReceived;
|
||||
public event Action OnDashInputReceived;
|
||||
private InputAction _interactionAction;
|
||||
private InputAction _developKey01Action;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Unity events
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartCoroutine(nameof(Initialize));
|
||||
_interactionAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "Interaction");
|
||||
_developKey01Action = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "DevelopKey01");
|
||||
|
||||
_interactionAction.performed += OnInteraction;
|
||||
_interactionAction.canceled += OnInteraction;
|
||||
_developKey01Action.performed += OnDevelopKey01;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
@ -62,47 +51,19 @@ namespace BlueWater.Players.Tycoons
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
private void OnDestroy()
|
||||
{
|
||||
_interactionAction.performed -= OnInteraction;
|
||||
_interactionAction.canceled -= OnInteraction;
|
||||
_developKey01Action.performed -= OnDevelopKey01;
|
||||
}
|
||||
|
||||
// Initialize methods
|
||||
#region Initialize methods
|
||||
|
||||
[Button("컴포넌트 초기화")]
|
||||
private void InitializeComponents()
|
||||
{
|
||||
_playerInput = GetComponent<PlayerInput>();
|
||||
}
|
||||
|
||||
private IEnumerator Initialize()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.SetCurrentPlayerInput(_playerInput);
|
||||
yield return new WaitUntil(() => _playerInput.IsInitialized());
|
||||
|
||||
PlayerInputKeyManager.Instance.DisableAllActionMaps();
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
EventManager.InvokeInitializedPlayerInput();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Player input methods
|
||||
#region Player input methods
|
||||
|
||||
// Tycoon
|
||||
public void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
var movementInput = context.ReadValue<Vector2>();
|
||||
OnMoveInputReceived?.Invoke(movementInput);
|
||||
}
|
||||
|
||||
public void OnDash(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
OnDashInputReceived?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnInteraction(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
@ -117,51 +78,11 @@ namespace BlueWater.Players.Tycoons
|
||||
|
||||
public void OnDevelopKey01(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
}
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
}
|
||||
|
||||
public void OnManual(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
TycoonUiManager.Instance.ManualBook.Open();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnZoomOut(InputAction.CallbackContext context)
|
||||
{
|
||||
var value = context.ReadValue<float>();
|
||||
EventManager.InvokeCameraZoomOut(value);
|
||||
}
|
||||
|
||||
public void OnZoomIn(InputAction.CallbackContext context)
|
||||
{
|
||||
var value = context.ReadValue<float>();
|
||||
EventManager.InvokeCameraZoomIn(value);
|
||||
}
|
||||
|
||||
// TycoonUi
|
||||
public void OnCancel(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
PopupUiController.CloseLastPopup();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCancelManual(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
TycoonUiManager.Instance.ManualBook.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
@ -5,6 +5,7 @@ using BlueWater.Tycoons;
|
||||
using BlueWater.Utility;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
@ -65,9 +66,13 @@ namespace BlueWater.Players.Tycoons
|
||||
public float PushPower { get; private set; }
|
||||
public float PushPowerReduction { get; private set; }
|
||||
|
||||
private InputAction _moveAction;
|
||||
private InputAction _dashAction;
|
||||
private Coroutine _dashInstance;
|
||||
private float _finalSpeed;
|
||||
|
||||
public Action OnSucceedDash;
|
||||
|
||||
#endregion
|
||||
|
||||
// Unity events
|
||||
@ -78,6 +83,16 @@ namespace BlueWater.Players.Tycoons
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_moveAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "Move");
|
||||
_dashAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "Dash");
|
||||
|
||||
_moveAction.performed += OnMove;
|
||||
_moveAction.canceled += OnMove;
|
||||
_dashAction.performed += OnDash;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
FlipVisualLook();
|
||||
@ -89,7 +104,14 @@ namespace BlueWater.Players.Tycoons
|
||||
|
||||
Move();
|
||||
}
|
||||
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_moveAction.performed -= OnMove;
|
||||
_moveAction.canceled -= OnMove;
|
||||
_dashAction.performed -= OnDash;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Initialize Methods
|
||||
@ -107,11 +129,6 @@ namespace BlueWater.Players.Tycoons
|
||||
#region Methods
|
||||
|
||||
// Event methods
|
||||
public void HandleInputMovement(Vector2 movementInput)
|
||||
{
|
||||
_inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
||||
}
|
||||
|
||||
public void SetMoveSpeedMultiplier(float value) => MoveSpeedMultiplier = value;
|
||||
public void ResetMoveSpeedMultiplier() => MoveSpeedMultiplier = 1f;
|
||||
public void EnableMove() => IsMoveEnabled = true;
|
||||
@ -146,6 +163,12 @@ namespace BlueWater.Players.Tycoons
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void OnMove(InputAction.CallbackContext context)
|
||||
{
|
||||
var movementInput = _moveAction.ReadValue<Vector2>();
|
||||
_inputDirection = new Vector3(movementInput.x, 0, movementInput.y).normalized;
|
||||
}
|
||||
|
||||
public void Move()
|
||||
{
|
||||
@ -169,6 +192,14 @@ namespace BlueWater.Players.Tycoons
|
||||
return true;
|
||||
}
|
||||
|
||||
public void OnDash(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!CanDash()) return;
|
||||
|
||||
OnSucceedDash?.Invoke();
|
||||
Dash();
|
||||
}
|
||||
|
||||
public void Dash()
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _dashInstance, DashCoroutine());
|
||||
|
@ -19,6 +19,9 @@ namespace BlueWater.Players.Tycoons
|
||||
public const string CleaningFloor = "CleaningFloor";
|
||||
public const string CleaningTable = "CleaningTable";
|
||||
public const string MakingCocktail = "BeerMaker";
|
||||
public const string Pumping = "AttackWhip";
|
||||
public const string AttackSlime = "AttackSlime";
|
||||
public const string AttackBat = "AttackBat";
|
||||
}
|
||||
|
||||
[DefaultExecutionOrder(-1)]
|
||||
@ -70,17 +73,14 @@ namespace BlueWater.Players.Tycoons
|
||||
public bool IsCleaningFloor { get; set; }
|
||||
public bool IsCleaningTable { get; set; }
|
||||
public bool IsMakingCocktail { get; set; }
|
||||
public bool IsPumping { get; set; }
|
||||
|
||||
// State
|
||||
public StateMachineController<TycoonPlayer> StateMachineController { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> IdleState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> WalkingState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> DashState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> ServingIdleState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> ServingState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> CleaningFloorState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> CleaningTableState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> MakingCocktailState { get; private set; }
|
||||
public IStateMachine<TycoonPlayer> InteractionState { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
@ -99,23 +99,18 @@ namespace BlueWater.Players.Tycoons
|
||||
|
||||
private void Start()
|
||||
{
|
||||
TycoonInput.OnMoveInputReceived += TycoonMovement.HandleInputMovement;
|
||||
TycoonInput.OnDashInputReceived += Dash;
|
||||
|
||||
EventManager.OnDead += Die;
|
||||
EventManager.OnMakeCocktailCompleted += MakeCocktailCompleted;
|
||||
EventManager.OnCocktailDiscarded += DiscardCocktail;
|
||||
EventManager.OnCocktailServedToCustomer += ServedCocktail;
|
||||
EventManager.OnChangedRandomCocktail += ChangeCocktail;
|
||||
|
||||
TycoonMovement.OnSucceedDash += DashSucceed;
|
||||
|
||||
IdleState = new IdleState();
|
||||
WalkingState = new WalkingState();
|
||||
DashState = new DashState();
|
||||
ServingIdleState = new ServingIdleState();
|
||||
ServingState = new ServingState();
|
||||
CleaningFloorState = new CleaningFloorState();
|
||||
CleaningTableState = new CleaningTableState();
|
||||
MakingCocktailState = new MakingCocktailState();
|
||||
InteractionState = new InteractionState();
|
||||
|
||||
StateMachineController = new StateMachineController<TycoonPlayer>(this, IdleState);
|
||||
}
|
||||
@ -127,14 +122,13 @@ namespace BlueWater.Players.Tycoons
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
TycoonInput.OnMoveInputReceived -= TycoonMovement.HandleInputMovement;
|
||||
TycoonInput.OnDashInputReceived -= Dash;
|
||||
|
||||
EventManager.OnDead -= Die;
|
||||
EventManager.OnMakeCocktailCompleted -= MakeCocktailCompleted;
|
||||
EventManager.OnCocktailDiscarded -= DiscardCocktail;
|
||||
EventManager.OnCocktailServedToCustomer -= ServedCocktail;
|
||||
EventManager.OnChangedRandomCocktail -= ChangeCocktail;
|
||||
|
||||
TycoonMovement.OnSucceedDash -= DashSucceed;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -213,12 +207,9 @@ namespace BlueWater.Players.Tycoons
|
||||
TycoonPickupHandler.ChangeItem(cocktailData);
|
||||
}
|
||||
|
||||
private void Dash()
|
||||
private void DashSucceed()
|
||||
{
|
||||
if (!TycoonMovement.CanDash()) return;
|
||||
|
||||
StateMachineController.TransitionToState(DashState, this);
|
||||
TycoonMovement.Dash();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -558,7 +558,7 @@
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Manual",
|
||||
"name": "OpenManualBook",
|
||||
"type": "Button",
|
||||
"id": "ef02b0fe-8d61-4bdb-bd1e-543575b67aa0",
|
||||
"expectedControlType": "",
|
||||
@ -681,7 +681,7 @@
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "Manual",
|
||||
"action": "OpenManualBook",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
@ -723,13 +723,31 @@
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "CancelManual",
|
||||
"name": "PressQ",
|
||||
"type": "Button",
|
||||
"id": "c30fb3f3-d280-4b30-af6c-15f7483fd658",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "PressAnyKey",
|
||||
"type": "Button",
|
||||
"id": "a7d0f4bf-c445-4686-8b27-dda59428f9c4",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "InteractionE",
|
||||
"type": "Button",
|
||||
"id": "e9ccc5b4-e1be-4a60-a855-3e58bc3ab264",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@ -751,7 +769,62 @@
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Keyboard&Mouse",
|
||||
"action": "CancelManual",
|
||||
"action": "PressQ",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "8675fb37-7ac9-4de2-8c4b-27e552c1df04",
|
||||
"path": "{Button}/*",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PressAnyKey",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3c329fee-75ce-472f-9d95-6059db19cb06",
|
||||
"path": "Keyboard/*",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PressAnyKey",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "32296719-cadf-417d-87b0-cca55f81dcbe",
|
||||
"path": "Mouse/*",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PressAnyKey",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "2e6edbe7-0f56-4538-b462-0c66a6881f10",
|
||||
"path": "Gamepad/*",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "PressAnyKey",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "02f7a8a2-016d-4698-a893-4a2cbfcee1c7",
|
||||
"path": "<Keyboard>/e",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "",
|
||||
"action": "InteractionE",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace BlueWater
|
||||
{
|
||||
@ -13,7 +15,6 @@ namespace BlueWater
|
||||
CombatTitle,
|
||||
Combat,
|
||||
CombatUi,
|
||||
Bar
|
||||
}
|
||||
|
||||
public class PlayerInputKeyManager : Singleton<PlayerInputKeyManager>
|
||||
@ -21,22 +22,26 @@ namespace BlueWater
|
||||
[SerializeField]
|
||||
private PlayerInput _currentPlayerInput;
|
||||
|
||||
[SerializeField]
|
||||
private InputActionMaps _initializedActionMap;
|
||||
|
||||
private Vector3 _lastMousePosition; //마우스 이동 감지용
|
||||
private bool _isKey = false; //키보드 입력상태 == true / 마우스 입력상태 == false (중복 방직용)
|
||||
private readonly List<Action> _onActionKeyboard = new List<Action>();
|
||||
private readonly List<Action> _onActionMouse = new List<Action>();
|
||||
|
||||
public void AddOnActionKeyboard(Action action)
|
||||
protected override void OnAwake()
|
||||
{
|
||||
_onActionKeyboard.Add(action);
|
||||
base.OnAwake();
|
||||
|
||||
_currentPlayerInput = GetComponent<PlayerInput>();
|
||||
}
|
||||
|
||||
public void AddOnActionMouse(Action action)
|
||||
|
||||
private async void Start()
|
||||
{
|
||||
_onActionMouse.Add(action);
|
||||
await Initialize();
|
||||
}
|
||||
|
||||
|
||||
public void Update()
|
||||
{
|
||||
bool CheckMouse(){return Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)||Input.GetMouseButtonDown(2);}
|
||||
@ -60,6 +65,39 @@ namespace BlueWater
|
||||
_isKey = false;
|
||||
}
|
||||
}
|
||||
|
||||
private async Task Initialize()
|
||||
{
|
||||
await Task.Delay(1000);
|
||||
|
||||
DisableAllActionMaps();
|
||||
SwitchCurrentActionMap(_initializedActionMap);
|
||||
|
||||
if (SceneManager.GetActiveScene().name == "01.Tycoon")
|
||||
{
|
||||
EventManager.InvokeInitializedPlayerInput();
|
||||
}
|
||||
}
|
||||
|
||||
public void AddOnActionKeyboard(Action action)
|
||||
{
|
||||
_onActionKeyboard.Add(action);
|
||||
}
|
||||
|
||||
public void AddOnActionMouse(Action action)
|
||||
{
|
||||
_onActionMouse.Add(action);
|
||||
}
|
||||
|
||||
public void RemoveOnActionKeyboard(Action action)
|
||||
{
|
||||
_onActionKeyboard.Remove(action);
|
||||
}
|
||||
|
||||
public void RemoveOnActionMouse(Action action)
|
||||
{
|
||||
_onActionMouse.Remove(action);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재 실행되고 있는 PlayerInput을 관리할 수 있게
|
||||
@ -75,6 +113,32 @@ namespace BlueWater
|
||||
Debug.Log("CurrentPlayerInput가 할당되지 않았습니다.");
|
||||
return true;
|
||||
}
|
||||
|
||||
public InputAction GetAction(InputActionMaps actionMapName, string actionName)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return null;
|
||||
|
||||
var actionMap = _currentPlayerInput.actions.FindActionMap(actionMapName.ToString(), true);
|
||||
if (actionMap == null)
|
||||
{
|
||||
Debug.LogError($"Action Map '{actionMapName}' not found!");
|
||||
return null;
|
||||
}
|
||||
|
||||
var action = actionMap.FindAction(actionName, true);
|
||||
if (action == null)
|
||||
{
|
||||
Debug.LogError($"Action '{actionName}' not found in Action Map '{actionMapName}'!");
|
||||
}
|
||||
return action;
|
||||
}
|
||||
|
||||
public bool IsCurrentActionMap(InputActionMaps inputActionMaps)
|
||||
{
|
||||
if (IsNullCurrentPlayerInput()) return false;
|
||||
|
||||
return _currentPlayerInput.currentActionMap.ToString() == inputActionMaps.ToString();
|
||||
}
|
||||
|
||||
public void SwitchCurrentActionMap(string inputActionMaps)
|
||||
{
|
||||
|
@ -1,18 +0,0 @@
|
||||
using BlueWater.Uis;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class Board : InteractionFurniture
|
||||
{
|
||||
public override void Interaction()
|
||||
{
|
||||
var tycoonUiManager = TycoonUiManager.Instance;
|
||||
tycoonUiManager.TycoonManagementUi.Open();
|
||||
}
|
||||
|
||||
public override bool CanInteraction()
|
||||
{
|
||||
return !IsOpened;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e6b14b9791033cf4a89ec8b4d3cdab16
|
@ -1,14 +0,0 @@
|
||||
using BlueWater.Uis;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class Grill : Cookware
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
CurrentDailyFoodUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.InitializeGrill(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8de9894c1150b994abf051eb0cc1ef16
|
@ -1,14 +0,0 @@
|
||||
using BlueWater.Uis;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class Pot : Cookware
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
CurrentDailyFoodUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.InitializePot(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c3098a23461d2842baf234cd02f42e6
|
@ -1,34 +0,0 @@
|
||||
using BlueWater.Uis;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class PowerSwitch : InteractionFurniture
|
||||
{
|
||||
[SerializeField, Required]
|
||||
private Transform _visualLook;
|
||||
|
||||
public override void Interaction()
|
||||
{
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
public override bool CanInteraction()
|
||||
{
|
||||
return !IsOpened && TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.CanOpen();
|
||||
}
|
||||
|
||||
protected override void OpenTycoonSwitch()
|
||||
{
|
||||
base.OpenTycoonSwitch();
|
||||
_visualLook.localScale = new Vector3(-1f, 1f, 1f);
|
||||
}
|
||||
|
||||
protected override void ClosedTycoonSwitch()
|
||||
{
|
||||
base.ClosedTycoonSwitch();
|
||||
_visualLook.localScale = new Vector3(1f, 1f, 1f);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 35e0a60e9e863fb43aa5f858c7377088
|
@ -72,12 +72,14 @@ namespace BlueWater.Tycoons
|
||||
|
||||
public override void Interaction()
|
||||
{
|
||||
GameManager.Instance.CurrentTycoonPlayer.IsPumping = true;
|
||||
_isPlayerInteracting = true;
|
||||
_spineController.PlayAnimation("Run", true);
|
||||
}
|
||||
|
||||
public override void CancelInteraction()
|
||||
{
|
||||
GameManager.Instance.CurrentTycoonPlayer.IsPumping = false;
|
||||
_isPlayerInteracting = false;
|
||||
_spineController.PlayAnimation("Idle", true);
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
using BlueWater.Uis;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class Skewer : Cookware
|
||||
{
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
|
||||
CurrentDailyFoodUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.InitializeSkewer(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70d84dd0b692dde40854818cb59d7963
|
@ -1,10 +1,26 @@
|
||||
using BlueWater.Items;
|
||||
using BlueWater.Players;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public static class TrashCanSpineAnimation
|
||||
{
|
||||
public const string ChangeRandomBox = "ChangeRandomBox";
|
||||
public const string RandomBoxHolding = "RandomBoxHold";
|
||||
public const string RandomBoxIdle = "RandomBoxIdle";
|
||||
public const string RandomBoxSpit = "RandomBoxSpit";
|
||||
public const string Open = "TrachcanOpen";
|
||||
public const string Close = "TrashcanClose";
|
||||
public const string Stop = "TrashcanCloseStop";
|
||||
}
|
||||
|
||||
public class TrashCan : InteractionFurniture
|
||||
{
|
||||
[SerializeField]
|
||||
private SpineController _spineController;
|
||||
|
||||
[SerializeField]
|
||||
private float _playerHoldingTime = 1f;
|
||||
|
||||
@ -12,7 +28,7 @@ namespace BlueWater.Tycoons
|
||||
private bool _canRandomChange;
|
||||
|
||||
[SerializeField]
|
||||
private Sprite _randomBoxSprite;
|
||||
private bool _isChanged;
|
||||
|
||||
private bool _isPlayerInteracting;
|
||||
private bool _canInteraction = true;
|
||||
@ -21,12 +37,21 @@ namespace BlueWater.Tycoons
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
_spineController = GetComponent<SpineController>();
|
||||
|
||||
EventManager.OnChangedRandomBox += ChangeRandomBox;
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
base.Start();
|
||||
|
||||
_spineController.PlayAnimation(TrashCanSpineAnimation.Stop, false);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (TycoonManager.Instance.TycoonStatus.CurrentPassiveCard == PassiveCard.RandomChange)
|
||||
if (_isChanged)
|
||||
{
|
||||
if (InteractionCanvas.BalloonUi.IsWaitTimeOver())
|
||||
{
|
||||
@ -41,7 +66,7 @@ namespace BlueWater.Tycoons
|
||||
|
||||
if (HoldingElapsedTime >= 1f)
|
||||
{
|
||||
if (TycoonManager.Instance.TycoonStatus.CurrentPassiveCard == PassiveCard.RandomChange)
|
||||
if (_isChanged)
|
||||
{
|
||||
ChangeRandomCocktail();
|
||||
}
|
||||
@ -71,19 +96,35 @@ namespace BlueWater.Tycoons
|
||||
|
||||
public void ChangeRandomBox()
|
||||
{
|
||||
if (_canRandomChange) return;
|
||||
|
||||
VisualLook.sprite = _randomBoxSprite;
|
||||
if (!_canRandomChange) return;
|
||||
|
||||
_spineController.PlayAnimation(TrashCanSpineAnimation.ChangeRandomBox, false);
|
||||
_spineController.AddAnimation(TrashCanSpineAnimation.RandomBoxIdle, true);
|
||||
_isChanged = true;
|
||||
}
|
||||
|
||||
public override void Interaction()
|
||||
{
|
||||
_isPlayerInteracting = true;
|
||||
|
||||
if (_isChanged)
|
||||
{
|
||||
_spineController.PlayAnimation(TrashCanSpineAnimation.RandomBoxHolding, true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void CancelInteraction()
|
||||
{
|
||||
_isPlayerInteracting = false;
|
||||
|
||||
if (_isChanged)
|
||||
{
|
||||
_spineController.AddAnimation(TrashCanSpineAnimation.RandomBoxIdle, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
_spineController.AddAnimation(TrashCanSpineAnimation.Stop, false);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool CanInteraction()
|
||||
@ -104,7 +145,16 @@ namespace BlueWater.Tycoons
|
||||
UpdateLocalizedString("InteractionTrashCanDiscard");
|
||||
}
|
||||
|
||||
base.ShowInteractionUi();
|
||||
_spineController.EnableCustomMaterial();
|
||||
EventManager.InvokeShowInteractionUi(InteractionMessage);
|
||||
IsShowing = true;
|
||||
}
|
||||
|
||||
public override void HideInteractionUi()
|
||||
{
|
||||
_spineController.DisableCustomMaterial();
|
||||
EventManager.InvokeHideInteractionUi();
|
||||
IsShowing = false;
|
||||
}
|
||||
|
||||
private void DiscardItem()
|
||||
@ -120,6 +170,11 @@ namespace BlueWater.Tycoons
|
||||
|
||||
HoldingElapsedTime = 0f;
|
||||
_isPlayerInteracting = false;
|
||||
|
||||
print("실행 전");
|
||||
_spineController.PlayAnimation(TrashCanSpineAnimation.Open, false);
|
||||
_spineController.AddAnimation(TrashCanSpineAnimation.Close, false);
|
||||
print("실행 후");
|
||||
}
|
||||
|
||||
private void ChangeRandomCocktail()
|
||||
@ -132,6 +187,9 @@ namespace BlueWater.Tycoons
|
||||
HoldingElapsedTime = 0f;
|
||||
_canInteraction = false;
|
||||
_isPlayerInteracting = false;
|
||||
|
||||
_spineController.PlayAnimation(TrashCanSpineAnimation.RandomBoxSpit, false);
|
||||
_spineController.AddAnimation(TrashCanSpineAnimation.RandomBoxIdle, true);
|
||||
}
|
||||
}
|
||||
}
|
@ -18,8 +18,8 @@ namespace BlueWater
|
||||
protected override void OnAwake()
|
||||
{
|
||||
_fadeImage = transform.Find("Canvas/FadeImage").GetComponent<Image>();
|
||||
_fadeIn = _fadeImage.DOFade(1f, 2f).From(0f).Pause().SetAutoKill(false).OnComplete(MoveCombatScene);
|
||||
_fadeOut = _fadeImage.DOFade(0f, 2f).From(1f).Pause().SetAutoKill(false).SetDelay(1f);
|
||||
_fadeIn = _fadeImage.DOFade(1f, 2f).From(0f).SetUpdate(true).SetAutoKill(false).Pause().OnComplete(MoveCombatScene);
|
||||
_fadeOut = _fadeImage.DOFade(0f, 2f).From(1f).SetUpdate(true).SetAutoKill(false).Pause().SetDelay(3f).OnComplete(EventManager.InvokeInitializedPlayerInput);
|
||||
_fadeImage.color = new Color(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
161
Assets/02.Scripts/Tycoon/TycoonCardController.cs
Normal file
161
Assets/02.Scripts/Tycoon/TycoonCardController.cs
Normal file
@ -0,0 +1,161 @@
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Uis;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Tycoons
|
||||
{
|
||||
public class TycoonCardController: MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private TycoonCard _tycoonCardPrefab;
|
||||
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonStatus _tycoonStatus;
|
||||
private bool _isSelectedPassiveCard;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonStatus = _tycoonManager.TycoonStatus;
|
||||
}
|
||||
|
||||
public TycoonCard CreateTycoonCard(Transform instantiateLocation = null)
|
||||
{
|
||||
return Instantiate(_tycoonCardPrefab, instantiateLocation);
|
||||
}
|
||||
|
||||
public void DestroyCardList(List<TycoonCard> tycoonCards)
|
||||
{
|
||||
foreach (var element in tycoonCards)
|
||||
{
|
||||
if (!element || !element.gameObject) continue;
|
||||
|
||||
Destroy(element.gameObject);
|
||||
}
|
||||
|
||||
tycoonCards.Clear();
|
||||
}
|
||||
|
||||
public bool IsSelectedPassiveCard(CardData card)
|
||||
{
|
||||
return _isSelectedPassiveCard && card.Type == CardType.Passive;
|
||||
}
|
||||
|
||||
public void SelectedCard(TycoonCard currentTycoonCard)
|
||||
{
|
||||
switch (currentTycoonCard.CardDataForIdx.Idx) //탐색 후 행동...
|
||||
{
|
||||
case "HeartSlotPlus":
|
||||
_tycoonStatus.MaxPlayerHealth += 2;
|
||||
break;
|
||||
case "HeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth += 2;
|
||||
break;
|
||||
case "FullHeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth = _tycoonStatus.MaxPlayerHealth;
|
||||
break;
|
||||
case "AddLiquidB":
|
||||
_tycoonStatus.CurrentLiquidAmountB += 4000;
|
||||
break;
|
||||
case "AddLiquidC":
|
||||
_tycoonStatus.CurrentLiquidAmountC += 4000;
|
||||
break;
|
||||
case "AddLiquidD":
|
||||
_tycoonStatus.CurrentLiquidAmountD += 4000;
|
||||
break;
|
||||
case "AddLiquidE":
|
||||
_tycoonStatus.CurrentLiquidAmountE += 4000;
|
||||
break;
|
||||
case "AddGarnish1":
|
||||
_tycoonStatus.CurrentGarnishAmount1 += 4000;
|
||||
break;
|
||||
case "AddGarnish2":
|
||||
_tycoonStatus.CurrentGarnishAmount2 += 4000;
|
||||
break;
|
||||
case "AllLiquidAdd":
|
||||
EventManager.InvokeAddBarrels(1000);
|
||||
break;
|
||||
case "ServerNpcAdd":
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
break;
|
||||
case "CleanerNpcAdd":
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
break;
|
||||
case "BartenderNpcAdd":
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
break;
|
||||
case "SpeedBoost":
|
||||
_tycoonStatus.PlayerMoveSpeedMultiplier += 0.1f;
|
||||
break;
|
||||
case "ExpBoost":
|
||||
_tycoonStatus.ExpMultiplier += 0.2f;
|
||||
break;
|
||||
case "GoldBoost":
|
||||
_tycoonStatus.GoldMultiplier += 0.2f;
|
||||
break;
|
||||
case "AllCleanUp":
|
||||
EventManager.InvokeCleaningAll();
|
||||
break;
|
||||
case "GaugeReset":
|
||||
EventManager.InvokeGaugeResetCustomers();
|
||||
break;
|
||||
case "DashCooldownReduction":
|
||||
_tycoonStatus.PlayerDashCooldownReduction += 1;
|
||||
break;
|
||||
case "TipBoost":
|
||||
_tycoonStatus.TipMultiplier += 0.2f;
|
||||
break;
|
||||
case "EndGoldBoost":
|
||||
_tycoonStatus.EndGoldMultiplier += 0.1f;
|
||||
break;
|
||||
case "AllCustomerPurification":
|
||||
EventManager.InvokePurifiedCustomerAll();
|
||||
break;
|
||||
case "GaugeTimeUp":
|
||||
_tycoonStatus.CustomerHurryTimeIncrease += 3;
|
||||
break;
|
||||
case "BarrelAutoSupply":
|
||||
if (_tycoonManager.CardDataSo.CardFirstCheck("BarrelAutoSupply"))
|
||||
{
|
||||
EventManager.InvokeAutoSupplyBarrels();
|
||||
}
|
||||
_tycoonStatus.BarrelAutoIncrease += 2;
|
||||
break;
|
||||
case "ServerNpcUpgrade":
|
||||
_tycoonStatus.ServerTipMultiplier += 0.1f;
|
||||
break;
|
||||
case "CleanerNpcUpgrade":
|
||||
_tycoonStatus.CleanerCleaningReduction += 1;
|
||||
break;
|
||||
case "BartenderNpcUpgrade":
|
||||
_tycoonStatus.BartenderMakingReduction += 1;
|
||||
break;
|
||||
case "PassiveDoubleServing":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.DoubleServing;
|
||||
break;
|
||||
case "PassiveRandomChange":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.RandomChange;
|
||||
EventManager.InvokeChangedRandomBox();
|
||||
break;
|
||||
case "PassiveGoldAutoGain":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.GoldAutoGain;
|
||||
EventManager.InvokeGainAutoMoneyCounter(_tycoonManager.TycoonStageController.StageDataSo.AutoGainWaitTime);
|
||||
break;
|
||||
case "PassiveMakingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.MakingBonus;
|
||||
break;
|
||||
case "PassiveServingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.ServingBonus;
|
||||
break;
|
||||
case "PassiveCleaningBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.CleaningBonus;
|
||||
break;
|
||||
default: Debug.Log("Not Found Card : IDX" + currentTycoonCard.CardDataForIdx.Idx); return;
|
||||
}
|
||||
|
||||
if (currentTycoonCard.CardDataForIdx.Type == CardType.Passive) _isSelectedPassiveCard = true;
|
||||
|
||||
TycoonManager.Instance.CardDataSo.AddToSelectedCard(currentTycoonCard.CardDataForIdx);
|
||||
}
|
||||
}
|
||||
}
|
2
Assets/02.Scripts/Tycoon/TycoonCardController.cs.meta
Normal file
2
Assets/02.Scripts/Tycoon/TycoonCardController.cs.meta
Normal file
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b861fc14a492d143aa66bd14424c65a
|
@ -25,6 +25,9 @@ namespace BlueWater.Tycoons
|
||||
|
||||
[field: SerializeField]
|
||||
public ServingTableController ServingTableController { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TycoonCardController TycoonCardController { get; private set; }
|
||||
|
||||
[SerializeField]
|
||||
private string _dailyBgm;
|
||||
@ -70,6 +73,7 @@ namespace BlueWater.Tycoons
|
||||
CrewController = GetComponent<CrewController>();
|
||||
CustomerController = GetComponent<CustomerController>();
|
||||
ServingTableController = GetComponent<ServingTableController>();
|
||||
TycoonCardController = GetComponent<TycoonCardController>();
|
||||
}
|
||||
|
||||
public LevelData GetCurrentLevelData()
|
||||
|
@ -36,7 +36,7 @@ namespace BlueWater.Tycoons
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnInitializedPlayerInput += StartStage;
|
||||
EventManager.OnTycoonGameStarted += StartStage;
|
||||
EventManager.OnMakeCocktailCompleted += AddInstanceCocktail;
|
||||
EventManager.OnCocktailServedToCustomer += RemoveInstanceCocktail;
|
||||
EventManager.OnCocktailDiscarded += RemoveInstanceCocktail;
|
||||
@ -55,7 +55,7 @@ namespace BlueWater.Tycoons
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnInitializedPlayerInput -= StartStage;
|
||||
EventManager.OnTycoonGameStarted -= StartStage;
|
||||
EventManager.OnMakeCocktailCompleted -= AddInstanceCocktail;
|
||||
EventManager.OnCocktailServedToCustomer -= RemoveInstanceCocktail;
|
||||
EventManager.OnCocktailDiscarded -= RemoveInstanceCocktail;
|
||||
@ -66,8 +66,6 @@ namespace BlueWater.Tycoons
|
||||
private void StartStage()
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _startStageCoroutineInstance, StartStageCoroutine());
|
||||
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
private IEnumerator StartStageCoroutine()
|
||||
|
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using Sirenix.OdinInspector;
|
||||
using Unity.Cinemachine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace BlueWater
|
||||
@ -63,7 +64,9 @@ namespace BlueWater
|
||||
private CinemachineBrain _cinemachineBrain;
|
||||
private CinemachinePositionComposer _baseCameraComposer;
|
||||
private List<CinemachineCamera> _cinemachineCameras = new();
|
||||
|
||||
|
||||
private InputAction _zoomInAction;
|
||||
private InputAction _zoomOutAction;
|
||||
private float _targetCameraDistance;
|
||||
|
||||
#endregion
|
||||
@ -83,14 +86,15 @@ namespace BlueWater
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_zoomInAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "ZoomIn");
|
||||
_zoomOutAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "ZoomOut");
|
||||
|
||||
_zoomInAction.performed += OnZoomChanged;
|
||||
_zoomOutAction.performed += OnZoomChanged;
|
||||
_zoomInAction.canceled += OnZoomChanged;
|
||||
_zoomOutAction.canceled += OnZoomChanged;
|
||||
|
||||
_targetCameraDistance = _baseCameraComposer.CameraDistance;
|
||||
|
||||
EventManager.OnCameraZoomOut += ZoomOut;
|
||||
EventManager.OnCameraZoomIn += ZoomIn;
|
||||
|
||||
if (!GameManager.Instance) return;
|
||||
|
||||
GameManager.Instance.OnInstantiatePlayer += SetFollow;
|
||||
}
|
||||
|
||||
private void LateUpdate()
|
||||
@ -112,12 +116,10 @@ namespace BlueWater
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnCameraZoomOut -= ZoomOut;
|
||||
EventManager.OnCameraZoomIn -= ZoomIn;
|
||||
|
||||
if (!GameManager.Instance) return;
|
||||
|
||||
GameManager.Instance.OnInstantiatePlayer -= SetFollow;
|
||||
_zoomInAction.performed -= OnZoomChanged;
|
||||
_zoomOutAction.performed -= OnZoomChanged;
|
||||
_zoomInAction.canceled -= OnZoomChanged;
|
||||
_zoomOutAction.canceled -= OnZoomChanged;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -181,22 +183,16 @@ namespace BlueWater
|
||||
camera.transparencySortAxis = _transparencySortAxis;
|
||||
}
|
||||
|
||||
public void ZoomOut(float value)
|
||||
private void OnZoomChanged(InputAction.CallbackContext context)
|
||||
{
|
||||
_targetCameraDistance = Mathf.Min(
|
||||
_targetCameraDistance + value * _zoomPower,
|
||||
var zoomDirection = _zoomOutAction.ReadValue<float>() - _zoomInAction.ReadValue<float>();
|
||||
_targetCameraDistance = Mathf.Clamp(
|
||||
_targetCameraDistance + zoomDirection * _zoomPower,
|
||||
_cameraDistance.x,
|
||||
_cameraDistance.y
|
||||
);
|
||||
}
|
||||
|
||||
public void ZoomIn(float value)
|
||||
{
|
||||
_targetCameraDistance = Mathf.Max(
|
||||
_targetCameraDistance - value * _zoomPower,
|
||||
_cameraDistance.x
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -9,7 +9,7 @@ namespace BlueWater.Uis
|
||||
public virtual void Open()
|
||||
{
|
||||
// 화면의 가장 앞으로 가져오기
|
||||
transform.SetAsLastSibling();
|
||||
// transform.SetAsLastSibling();
|
||||
gameObject.SetActive(true);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
IsOpened = true;
|
||||
@ -21,5 +21,15 @@ namespace BlueWater.Uis
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
}
|
||||
|
||||
public virtual void EnableInput()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void DisableInput()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -12,7 +12,13 @@ namespace BlueWater
|
||||
{
|
||||
if (!PopupUis.Contains(popup))
|
||||
{
|
||||
foreach (var element in PopupUis)
|
||||
{
|
||||
element.DisableInput();
|
||||
}
|
||||
|
||||
PopupUis.Add(popup);
|
||||
popup.EnableInput();
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,6 +28,11 @@ namespace BlueWater
|
||||
if (PopupUis.Contains(popup))
|
||||
{
|
||||
PopupUis.Remove(popup);
|
||||
|
||||
if (PopupUis.Count > 0)
|
||||
{
|
||||
PopupUis[^1].EnableInput();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,14 @@ using BlueWater;
|
||||
using BlueWater.Audios;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TitleSetting : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
[SerializeField]
|
||||
private Slider _masterVolume;
|
||||
|
||||
@ -20,18 +24,19 @@ public class TitleSetting : MonoBehaviour
|
||||
private TMP_Dropdown _languageDropdown;
|
||||
|
||||
private AudioManager _audioManager;
|
||||
private InputAction _cancelAction;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_audioManager = AudioManager.Instance;
|
||||
|
||||
var masterVolume = ES3.Load("MasterVolume", 0f);
|
||||
var masterVolume = ES3.Load("MasterVolume", 1f);
|
||||
SetMasterVolume(masterVolume);
|
||||
|
||||
var bgmVolume = ES3.Load("BgmVolume", 0f);
|
||||
var bgmVolume = ES3.Load("BgmVolume", 1f);
|
||||
SetBgmVolume(bgmVolume);
|
||||
|
||||
var sfxVolume = ES3.Load("SfxVolume", 0f);
|
||||
var sfxVolume = ES3.Load("SfxVolume", 1f);
|
||||
SetSfxVolume(sfxVolume);
|
||||
|
||||
StartCoroutine(nameof(InitializeLanguage));
|
||||
@ -71,4 +76,14 @@ public class TitleSetting : MonoBehaviour
|
||||
_languageDropdown.value = localeType;
|
||||
LocalizationManager.Instance.ChangeLocale((LocaleType)localeType);
|
||||
}
|
||||
|
||||
public void ShowUi()
|
||||
{
|
||||
_panel.SetActive(true);
|
||||
}
|
||||
|
||||
public void HideUi()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
using System.Collections;
|
||||
using BlueWater.Audios;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
@ -12,9 +11,6 @@ namespace BlueWater.Titles
|
||||
{
|
||||
public class TycoonTitle : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private PlayerInput _playerInput;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _titleMenuUiPanel;
|
||||
|
||||
@ -37,11 +33,10 @@ namespace BlueWater.Titles
|
||||
|
||||
[SerializeField]
|
||||
private string _dailyBgm = "DailyBgm1";
|
||||
|
||||
private bool _isQuitting;
|
||||
|
||||
[SerializeField]
|
||||
private PlayerInputKeyManager _keyManager;
|
||||
private InputAction _interactionEAction;
|
||||
private InputAction _settingCancelAction;
|
||||
private bool _isQuitting;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@ -50,7 +45,8 @@ namespace BlueWater.Titles
|
||||
|
||||
private void Start()
|
||||
{
|
||||
StartCoroutine(nameof(Initialize));
|
||||
_interactionEAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "InteractionE");
|
||||
_settingCancelAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "Cancel");
|
||||
|
||||
AudioManager.Instance.PlayBgm(_dailyBgm);
|
||||
_startGameButton.onClick.AddListener(SceneController.Instance.FadeIn);
|
||||
@ -59,12 +55,14 @@ namespace BlueWater.Titles
|
||||
_settingButton.onClick.AddListener(() => { _onButtonClicked = true; });
|
||||
_exitButton.onClick.AddListener(() => { _onButtonClicked = true; });
|
||||
|
||||
_keyManager.AddOnActionKeyboard(OnKeyboard);
|
||||
_keyManager.AddOnActionMouse(OnMouse);
|
||||
PlayerInputKeyManager.Instance.AddOnActionKeyboard(OnKeyboard);
|
||||
PlayerInputKeyManager.Instance.AddOnActionMouse(OnMouse);
|
||||
|
||||
_interactionEAction.performed += OnInteractionE;
|
||||
}
|
||||
|
||||
private void OnKeyboard()
|
||||
{
|
||||
{
|
||||
EventSystem.current.SetSelectedGameObject(_startGameButton.gameObject);
|
||||
}
|
||||
|
||||
@ -76,22 +74,20 @@ namespace BlueWater.Titles
|
||||
}
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_isQuitting) return;
|
||||
|
||||
_startGameButton.onClick.RemoveListener(SceneController.Instance.FadeIn);
|
||||
|
||||
PlayerInputKeyManager.Instance.RemoveOnActionKeyboard(OnKeyboard);
|
||||
PlayerInputKeyManager.Instance.RemoveOnActionMouse(OnMouse);
|
||||
|
||||
_interactionEAction.performed -= OnInteractionE;
|
||||
_settingCancelAction.performed -= OnSettingCancel;
|
||||
}
|
||||
|
||||
[Button("컴포넌트 초기화")]
|
||||
private void InitializeComponents()
|
||||
{
|
||||
_playerInput = GetComponent<PlayerInput>();
|
||||
_titleMenuUiPanel = transform.Find("TitleMenuUi/Panel").gameObject;
|
||||
_startGameButton = transform.Find("TitleMenuUi/Panel/ButtonPanel/StartGameButton").GetComponent<Button>();
|
||||
_titleSetting = transform.Find("TitleSetting").GetComponent<TitleSetting>();
|
||||
@ -99,16 +95,6 @@ namespace BlueWater.Titles
|
||||
_versionText.text = GetVersion();
|
||||
}
|
||||
|
||||
private IEnumerator Initialize()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.SetCurrentPlayerInput(_playerInput);
|
||||
yield return new WaitUntil(() => _playerInput.IsInitialized());
|
||||
|
||||
PlayerInputKeyManager.Instance.DisableAllActionMaps();
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.CombatTitle);
|
||||
EventManager.InvokeInitializedPlayerInput();
|
||||
}
|
||||
|
||||
private string GetVersion()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
@ -118,16 +104,13 @@ namespace BlueWater.Titles
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OnMenuInteraction(InputAction.CallbackContext context)
|
||||
public void OnInteractionE(InputAction.CallbackContext context)
|
||||
{
|
||||
if (context.performed)
|
||||
{
|
||||
var current = EventSystem.current.currentSelectedGameObject;
|
||||
if (!current) return;
|
||||
var current = EventSystem.current.currentSelectedGameObject;
|
||||
if (!current) return;
|
||||
|
||||
var currenButton = current.GetComponent<Button>();
|
||||
currenButton.onClick.Invoke();
|
||||
}
|
||||
var currenButton = current.GetComponent<Button>();
|
||||
currenButton.onClick.Invoke();
|
||||
}
|
||||
|
||||
public void QuitGame()
|
||||
@ -138,5 +121,24 @@ namespace BlueWater.Titles
|
||||
Application.Quit();
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OnSettingCancel(InputAction.CallbackContext context)
|
||||
{
|
||||
HideSettingUi();
|
||||
}
|
||||
|
||||
public void ShowSettingUi()
|
||||
{
|
||||
_titleMenuUiPanel.SetActive(false);
|
||||
_titleSetting.ShowUi();
|
||||
_settingCancelAction.performed += OnSettingCancel;
|
||||
}
|
||||
|
||||
public void HideSettingUi()
|
||||
{
|
||||
_settingCancelAction.performed -= OnSettingCancel;
|
||||
_titleSetting.HideUi();
|
||||
_titleMenuUiPanel.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,21 +1,21 @@
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class CookMenuUi : MonoBehaviour
|
||||
{
|
||||
[field: Title("컴포넌트")]
|
||||
[field: SerializeField, Required]
|
||||
public InventoryUi InventoryUi { get; private set; }
|
||||
|
||||
[field: SerializeField, Required]
|
||||
public CookUi CookUi { get; private set; }
|
||||
|
||||
[field: SerializeField, Required]
|
||||
public DailyFoodMenuUi DailyFoodMenuUi { get; private set; }
|
||||
|
||||
public void ShowUi() => gameObject.SetActive(true);
|
||||
public void HideUi() => gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
// using Sirenix.OdinInspector;
|
||||
// using UnityEngine;
|
||||
//
|
||||
// namespace BlueWater.Uis
|
||||
// {
|
||||
// public class CookMenuUi : MonoBehaviour
|
||||
// {
|
||||
// [field: Title("컴포넌트")]
|
||||
// [field: SerializeField, Required]
|
||||
// public InventoryUi InventoryUi { get; private set; }
|
||||
//
|
||||
// [field: SerializeField, Required]
|
||||
// public CookUi CookUi { get; private set; }
|
||||
//
|
||||
// [field: SerializeField, Required]
|
||||
// public DailyFoodMenuUi DailyFoodMenuUi { get; private set; }
|
||||
//
|
||||
// public void ShowUi() => gameObject.SetActive(true);
|
||||
// public void HideUi() => gameObject.SetActive(false);
|
||||
// }
|
||||
// }
|
@ -1,306 +1,306 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Items;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class CookUi : MonoBehaviour
|
||||
{
|
||||
[Title("컴포넌트")]
|
||||
[SerializeField, Required]
|
||||
private Image _selectedFoodImage;
|
||||
|
||||
[SerializeField, Required]
|
||||
private TMP_Text _selectedFoodName;
|
||||
|
||||
[SerializeField, Required]
|
||||
private TMP_Text _selectedFoodTasteText;
|
||||
|
||||
[SerializeField, Required]
|
||||
private TMP_Dropdown _finishedFoodSortDropdown;
|
||||
|
||||
[SerializeField, Required]
|
||||
private Button _cookButton;
|
||||
|
||||
[SerializeField, Required]
|
||||
private TMP_Text _cookText;
|
||||
|
||||
[Title("프리팹 생성 위치")]
|
||||
[SerializeField, Required]
|
||||
private Transform _finishedFoodSlotLocation;
|
||||
|
||||
[SerializeField, Required]
|
||||
private Transform _ingredientFoodSlotLocation;
|
||||
|
||||
[Title("프리팹")]
|
||||
[SerializeField, Required]
|
||||
private TycoonItemSlotUi _finishedFoodSlotUi;
|
||||
|
||||
[SerializeField, Required]
|
||||
private IngredientItemSlotUi _ingredientItemSlotUi;
|
||||
|
||||
private List<TycoonItemSlotUi> _finishedFoodSlotUis;
|
||||
private List<IngredientItemSlotUi> _highIngredientSlotUis;
|
||||
private List<IngredientItemSlotUi> _normalIngredientSlotUis;
|
||||
|
||||
private DataManager _dataManager;
|
||||
private ItemManager _itemManager;
|
||||
private DailyFoodMenuUi _dailyFoodMenuUi;
|
||||
private FoodData _selectedFoodData;
|
||||
private bool _isEnoughIngredient;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Initialize();
|
||||
InventorySynchronization();
|
||||
SelectFinishedFood(null);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
//TycoonEvents.OnFoodRecipeAcquired += AddFoodRecipe;
|
||||
_dataManager.Inventory.OnChangeItemSlot += OnInventoryChange;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
//TycoonEvents.OnFoodRecipeAcquired -= AddFoodRecipe;
|
||||
_dataManager.Inventory.OnChangeItemSlot -= OnInventoryChange;
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
_dataManager = DataManager.Instance;
|
||||
_itemManager = ItemManager.Instance;
|
||||
_dailyFoodMenuUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi;
|
||||
|
||||
_finishedFoodSlotUis = new List<TycoonItemSlotUi>();
|
||||
foreach (Transform element in _finishedFoodSlotLocation)
|
||||
{
|
||||
Destroy(element.gameObject);
|
||||
}
|
||||
|
||||
_highIngredientSlotUis = new List<IngredientItemSlotUi>(5);
|
||||
_normalIngredientSlotUis = new List<IngredientItemSlotUi>(5);
|
||||
foreach (Transform element in _ingredientFoodSlotLocation)
|
||||
{
|
||||
Destroy(element.gameObject);
|
||||
}
|
||||
|
||||
for (var i = 0; i < 10; i++)
|
||||
{
|
||||
var newItemSlot = Instantiate(_ingredientItemSlotUi, _ingredientFoodSlotLocation).GetComponent<IngredientItemSlotUi>();
|
||||
|
||||
if (i < 5)
|
||||
{
|
||||
_highIngredientSlotUis.Add(newItemSlot);
|
||||
_highIngredientSlotUis[i].SetIsLocked(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_normalIngredientSlotUis.Add(newItemSlot);
|
||||
}
|
||||
newItemSlot.SetItemSlot(null);
|
||||
}
|
||||
|
||||
CheckCookable();
|
||||
}
|
||||
|
||||
private void InventorySynchronization()
|
||||
{
|
||||
foreach (var element in _dataManager.TycoonData.FoodRecipes)
|
||||
{
|
||||
var newItemSlot = Instantiate(_finishedFoodSlotUi, _finishedFoodSlotLocation).GetComponent<TycoonItemSlotUi>();
|
||||
var foodData = _itemManager.FoodDataSo.GetDataByIdx(element);
|
||||
newItemSlot.SetFoodData(foodData);
|
||||
_finishedFoodSlotUis.Add(newItemSlot);
|
||||
newItemSlot.AddButtonClickListener(() => SelectFinishedFood(foodData));
|
||||
}
|
||||
}
|
||||
|
||||
private void AddFoodRecipe(string idx)
|
||||
{
|
||||
var foodData = _itemManager.FoodDataSo.GetDataByIdx(idx);
|
||||
var newItemSlot = Instantiate(_finishedFoodSlotUi, _finishedFoodSlotLocation).GetComponent<TycoonItemSlotUi>();
|
||||
newItemSlot.SetFoodData(foodData);
|
||||
_finishedFoodSlotUis.Add(newItemSlot);
|
||||
newItemSlot.AddButtonClickListener(() => SelectFinishedFood(foodData));
|
||||
}
|
||||
|
||||
private void OnInventoryChange(ItemSlot itemSlot, bool isAdded)
|
||||
{
|
||||
UpdateIngredientSlots();
|
||||
}
|
||||
|
||||
private void UpdateIngredientSlots()
|
||||
{
|
||||
if (_selectedFoodData == null) return;
|
||||
|
||||
SetIngredient(_selectedFoodData);
|
||||
}
|
||||
|
||||
private void SelectFinishedFood(FoodData foodData)
|
||||
{
|
||||
if (foodData == null)
|
||||
{
|
||||
_selectedFoodImage.enabled = false;
|
||||
_selectedFoodImage.sprite = null;
|
||||
_selectedFoodName.text = null;
|
||||
_selectedFoodTasteText.text = null;
|
||||
SetIngredient(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
_selectedFoodData = foodData;
|
||||
_selectedFoodImage.sprite = _itemManager.ItemDataSo.GetDataByIdx(_selectedFoodData.Idx).Sprite;
|
||||
_selectedFoodName.text = _selectedFoodData.Name;
|
||||
_selectedFoodTasteText.text = _selectedFoodData.TasteToString();
|
||||
_selectedFoodImage.enabled = true;
|
||||
SetIngredient(_selectedFoodData);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetIngredient(FoodData foodData)
|
||||
{
|
||||
if (foodData == null)
|
||||
{
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
_normalIngredientSlotUis[i].SetItemSlot(null);
|
||||
}
|
||||
CheckCookable();
|
||||
return;
|
||||
}
|
||||
|
||||
var ingredients = foodData.GetValidIngredients();
|
||||
var ingredientCount = ingredients.Count;
|
||||
for (var i = 0; i < 5; i++)
|
||||
{
|
||||
if (i < ingredientCount)
|
||||
{
|
||||
_normalIngredientSlotUis[i].SetItemSlot(new ItemSlot(ingredients[i].Idx, ingredients[i].Quantity));
|
||||
}
|
||||
else
|
||||
{
|
||||
_normalIngredientSlotUis[i].SetItemSlot(null);
|
||||
}
|
||||
}
|
||||
|
||||
CheckCookable();
|
||||
}
|
||||
|
||||
public void CheckCookable()
|
||||
{
|
||||
if (_selectedFoodData == null || string.IsNullOrEmpty(_selectedFoodData.Idx))
|
||||
{
|
||||
_cookButton.interactable = false;
|
||||
_cookText.color = _cookButton.colors.disabledColor;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_dailyFoodMenuUi.IsEmptyDailyFoodMenu(_selectedFoodData))
|
||||
{
|
||||
_cookButton.interactable = false;
|
||||
_cookText.color = _cookButton.colors.disabledColor;
|
||||
return;
|
||||
}
|
||||
|
||||
var ingredientCount = _selectedFoodData.GetValidIngredients().Count;
|
||||
for (var i = 0; i < ingredientCount; i++)
|
||||
{
|
||||
if (_normalIngredientSlotUis[i].IsEnoughIngredient) continue;
|
||||
|
||||
_cookButton.interactable = false;
|
||||
_cookText.color = _cookButton.colors.disabledColor;
|
||||
return;
|
||||
}
|
||||
|
||||
_cookButton.interactable = true;
|
||||
_cookText.color = Color.black;
|
||||
}
|
||||
|
||||
public void Cook()
|
||||
{
|
||||
foreach (var element in _selectedFoodData.GetValidIngredients())
|
||||
{
|
||||
var itemSlot = _dataManager.Inventory.GetItemByIdx(element.Idx);
|
||||
_dataManager.Inventory.RemoveItem(itemSlot, element.Quantity);
|
||||
}
|
||||
|
||||
_dailyFoodMenuUi.AddDailyFoodMenu(_selectedFoodData);
|
||||
CheckCookable();
|
||||
}
|
||||
|
||||
public void SortButton()
|
||||
{
|
||||
if (_finishedFoodSortDropdown.value == 0) return;
|
||||
|
||||
SortItemSlotUi((FoodSortingType)_finishedFoodSortDropdown.value);
|
||||
|
||||
_finishedFoodSortDropdown.value = 0;
|
||||
}
|
||||
|
||||
private void SortItemSlotUi(FoodSortingType sortingType)
|
||||
{
|
||||
switch (sortingType)
|
||||
{
|
||||
case FoodSortingType.None:
|
||||
return;
|
||||
case FoodSortingType.PriceUp:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
_itemManager.ItemDataSo.GetDataByIdx(x.FoodData.Idx).Price.
|
||||
CompareTo(_itemManager.ItemDataSo.GetDataByIdx(y.FoodData.Idx).Price));
|
||||
break;
|
||||
case FoodSortingType.PriceDown:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
_itemManager.ItemDataSo.GetDataByIdx(y.FoodData.Idx).Price.
|
||||
CompareTo(_itemManager.ItemDataSo.GetDataByIdx(x.FoodData.Idx).Price));
|
||||
break;
|
||||
case FoodSortingType.CookwareTypeUp:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
x.FoodData.Type.
|
||||
CompareTo(y.FoodData.Type));
|
||||
break;
|
||||
case FoodSortingType.CookwareTypeDown:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
y.FoodData.Type.
|
||||
CompareTo(x.FoodData.Type));
|
||||
break;
|
||||
case FoodSortingType.TasteUp:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
x.FoodData.Taste.
|
||||
CompareTo(y.FoodData.Taste));
|
||||
break;
|
||||
case FoodSortingType.TasteDown:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
y.FoodData.Taste.
|
||||
CompareTo(x.FoodData.Taste));
|
||||
break;
|
||||
case FoodSortingType.NameUp:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
string.Compare(x.FoodData.Name, y.FoodData.Name, StringComparison.Ordinal));
|
||||
break;
|
||||
case FoodSortingType.NameDown:
|
||||
_finishedFoodSlotUis.Sort((x, y) =>
|
||||
string.Compare(y.FoodData.Name, x.FoodData.Name, StringComparison.Ordinal));
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
for (var i = 0; i < _finishedFoodSlotUis.Count; i++)
|
||||
{
|
||||
_finishedFoodSlotUis[i].transform.SetSiblingIndex(i);
|
||||
}
|
||||
}
|
||||
|
||||
public void TycoonClosed()
|
||||
{
|
||||
SelectFinishedFood(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using BlueWater.Items;
|
||||
// using Sirenix.OdinInspector;
|
||||
// using TMPro;
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.UI;
|
||||
//
|
||||
// namespace BlueWater.Uis
|
||||
// {
|
||||
// public class CookUi : MonoBehaviour
|
||||
// {
|
||||
// [Title("컴포넌트")]
|
||||
// [SerializeField, Required]
|
||||
// private Image _selectedFoodImage;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private TMP_Text _selectedFoodName;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private TMP_Text _selectedFoodTasteText;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private TMP_Dropdown _finishedFoodSortDropdown;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private Button _cookButton;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private TMP_Text _cookText;
|
||||
//
|
||||
// [Title("프리팹 생성 위치")]
|
||||
// [SerializeField, Required]
|
||||
// private Transform _finishedFoodSlotLocation;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private Transform _ingredientFoodSlotLocation;
|
||||
//
|
||||
// [Title("프리팹")]
|
||||
// [SerializeField, Required]
|
||||
// private TycoonItemSlotUi _finishedFoodSlotUi;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private IngredientItemSlotUi _ingredientItemSlotUi;
|
||||
//
|
||||
// private List<TycoonItemSlotUi> _finishedFoodSlotUis;
|
||||
// private List<IngredientItemSlotUi> _highIngredientSlotUis;
|
||||
// private List<IngredientItemSlotUi> _normalIngredientSlotUis;
|
||||
//
|
||||
// private DataManager _dataManager;
|
||||
// private ItemManager _itemManager;
|
||||
// private DailyFoodMenuUi _dailyFoodMenuUi;
|
||||
// private FoodData _selectedFoodData;
|
||||
// private bool _isEnoughIngredient;
|
||||
//
|
||||
// private void Awake()
|
||||
// {
|
||||
// Initialize();
|
||||
// InventorySynchronization();
|
||||
// SelectFinishedFood(null);
|
||||
// }
|
||||
//
|
||||
// private void Start()
|
||||
// {
|
||||
// //TycoonEvents.OnFoodRecipeAcquired += AddFoodRecipe;
|
||||
// _dataManager.Inventory.OnChangeItemSlot += OnInventoryChange;
|
||||
// }
|
||||
//
|
||||
// private void OnDestroy()
|
||||
// {
|
||||
// //TycoonEvents.OnFoodRecipeAcquired -= AddFoodRecipe;
|
||||
// _dataManager.Inventory.OnChangeItemSlot -= OnInventoryChange;
|
||||
// }
|
||||
//
|
||||
// private void Initialize()
|
||||
// {
|
||||
// _dataManager = DataManager.Instance;
|
||||
// _itemManager = ItemManager.Instance;
|
||||
// _dailyFoodMenuUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.DailyFoodMenuUi;
|
||||
//
|
||||
// _finishedFoodSlotUis = new List<TycoonItemSlotUi>();
|
||||
// foreach (Transform element in _finishedFoodSlotLocation)
|
||||
// {
|
||||
// Destroy(element.gameObject);
|
||||
// }
|
||||
//
|
||||
// _highIngredientSlotUis = new List<IngredientItemSlotUi>(5);
|
||||
// _normalIngredientSlotUis = new List<IngredientItemSlotUi>(5);
|
||||
// foreach (Transform element in _ingredientFoodSlotLocation)
|
||||
// {
|
||||
// Destroy(element.gameObject);
|
||||
// }
|
||||
//
|
||||
// for (var i = 0; i < 10; i++)
|
||||
// {
|
||||
// var newItemSlot = Instantiate(_ingredientItemSlotUi, _ingredientFoodSlotLocation).GetComponent<IngredientItemSlotUi>();
|
||||
//
|
||||
// if (i < 5)
|
||||
// {
|
||||
// _highIngredientSlotUis.Add(newItemSlot);
|
||||
// _highIngredientSlotUis[i].SetIsLocked(true);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _normalIngredientSlotUis.Add(newItemSlot);
|
||||
// }
|
||||
// newItemSlot.SetItemSlot(null);
|
||||
// }
|
||||
//
|
||||
// CheckCookable();
|
||||
// }
|
||||
//
|
||||
// private void InventorySynchronization()
|
||||
// {
|
||||
// foreach (var element in _dataManager.TycoonData.FoodRecipes)
|
||||
// {
|
||||
// var newItemSlot = Instantiate(_finishedFoodSlotUi, _finishedFoodSlotLocation).GetComponent<TycoonItemSlotUi>();
|
||||
// var foodData = _itemManager.FoodDataSo.GetDataByIdx(element);
|
||||
// newItemSlot.SetFoodData(foodData);
|
||||
// _finishedFoodSlotUis.Add(newItemSlot);
|
||||
// newItemSlot.AddButtonClickListener(() => SelectFinishedFood(foodData));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void AddFoodRecipe(string idx)
|
||||
// {
|
||||
// var foodData = _itemManager.FoodDataSo.GetDataByIdx(idx);
|
||||
// var newItemSlot = Instantiate(_finishedFoodSlotUi, _finishedFoodSlotLocation).GetComponent<TycoonItemSlotUi>();
|
||||
// newItemSlot.SetFoodData(foodData);
|
||||
// _finishedFoodSlotUis.Add(newItemSlot);
|
||||
// newItemSlot.AddButtonClickListener(() => SelectFinishedFood(foodData));
|
||||
// }
|
||||
//
|
||||
// private void OnInventoryChange(ItemSlot itemSlot, bool isAdded)
|
||||
// {
|
||||
// UpdateIngredientSlots();
|
||||
// }
|
||||
//
|
||||
// private void UpdateIngredientSlots()
|
||||
// {
|
||||
// if (_selectedFoodData == null) return;
|
||||
//
|
||||
// SetIngredient(_selectedFoodData);
|
||||
// }
|
||||
//
|
||||
// private void SelectFinishedFood(FoodData foodData)
|
||||
// {
|
||||
// if (foodData == null)
|
||||
// {
|
||||
// _selectedFoodImage.enabled = false;
|
||||
// _selectedFoodImage.sprite = null;
|
||||
// _selectedFoodName.text = null;
|
||||
// _selectedFoodTasteText.text = null;
|
||||
// SetIngredient(null);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _selectedFoodData = foodData;
|
||||
// _selectedFoodImage.sprite = _itemManager.ItemDataSo.GetDataByIdx(_selectedFoodData.Idx).Sprite;
|
||||
// _selectedFoodName.text = _selectedFoodData.Name;
|
||||
// _selectedFoodTasteText.text = _selectedFoodData.TasteToString();
|
||||
// _selectedFoodImage.enabled = true;
|
||||
// SetIngredient(_selectedFoodData);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void SetIngredient(FoodData foodData)
|
||||
// {
|
||||
// if (foodData == null)
|
||||
// {
|
||||
// for (var i = 0; i < 5; i++)
|
||||
// {
|
||||
// _normalIngredientSlotUis[i].SetItemSlot(null);
|
||||
// }
|
||||
// CheckCookable();
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// var ingredients = foodData.GetValidIngredients();
|
||||
// var ingredientCount = ingredients.Count;
|
||||
// for (var i = 0; i < 5; i++)
|
||||
// {
|
||||
// if (i < ingredientCount)
|
||||
// {
|
||||
// _normalIngredientSlotUis[i].SetItemSlot(new ItemSlot(ingredients[i].Idx, ingredients[i].Quantity));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// _normalIngredientSlotUis[i].SetItemSlot(null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// CheckCookable();
|
||||
// }
|
||||
//
|
||||
// public void CheckCookable()
|
||||
// {
|
||||
// if (_selectedFoodData == null || string.IsNullOrEmpty(_selectedFoodData.Idx))
|
||||
// {
|
||||
// _cookButton.interactable = false;
|
||||
// _cookText.color = _cookButton.colors.disabledColor;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// if (!_dailyFoodMenuUi.IsEmptyDailyFoodMenu(_selectedFoodData))
|
||||
// {
|
||||
// _cookButton.interactable = false;
|
||||
// _cookText.color = _cookButton.colors.disabledColor;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// var ingredientCount = _selectedFoodData.GetValidIngredients().Count;
|
||||
// for (var i = 0; i < ingredientCount; i++)
|
||||
// {
|
||||
// if (_normalIngredientSlotUis[i].IsEnoughIngredient) continue;
|
||||
//
|
||||
// _cookButton.interactable = false;
|
||||
// _cookText.color = _cookButton.colors.disabledColor;
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// _cookButton.interactable = true;
|
||||
// _cookText.color = Color.black;
|
||||
// }
|
||||
//
|
||||
// public void Cook()
|
||||
// {
|
||||
// foreach (var element in _selectedFoodData.GetValidIngredients())
|
||||
// {
|
||||
// var itemSlot = _dataManager.Inventory.GetItemByIdx(element.Idx);
|
||||
// _dataManager.Inventory.RemoveItem(itemSlot, element.Quantity);
|
||||
// }
|
||||
//
|
||||
// _dailyFoodMenuUi.AddDailyFoodMenu(_selectedFoodData);
|
||||
// CheckCookable();
|
||||
// }
|
||||
//
|
||||
// public void SortButton()
|
||||
// {
|
||||
// if (_finishedFoodSortDropdown.value == 0) return;
|
||||
//
|
||||
// SortItemSlotUi((FoodSortingType)_finishedFoodSortDropdown.value);
|
||||
//
|
||||
// _finishedFoodSortDropdown.value = 0;
|
||||
// }
|
||||
//
|
||||
// private void SortItemSlotUi(FoodSortingType sortingType)
|
||||
// {
|
||||
// switch (sortingType)
|
||||
// {
|
||||
// case FoodSortingType.None:
|
||||
// return;
|
||||
// case FoodSortingType.PriceUp:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// _itemManager.ItemDataSo.GetDataByIdx(x.FoodData.Idx).Price.
|
||||
// CompareTo(_itemManager.ItemDataSo.GetDataByIdx(y.FoodData.Idx).Price));
|
||||
// break;
|
||||
// case FoodSortingType.PriceDown:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// _itemManager.ItemDataSo.GetDataByIdx(y.FoodData.Idx).Price.
|
||||
// CompareTo(_itemManager.ItemDataSo.GetDataByIdx(x.FoodData.Idx).Price));
|
||||
// break;
|
||||
// case FoodSortingType.CookwareTypeUp:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// x.FoodData.Type.
|
||||
// CompareTo(y.FoodData.Type));
|
||||
// break;
|
||||
// case FoodSortingType.CookwareTypeDown:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// y.FoodData.Type.
|
||||
// CompareTo(x.FoodData.Type));
|
||||
// break;
|
||||
// case FoodSortingType.TasteUp:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// x.FoodData.Taste.
|
||||
// CompareTo(y.FoodData.Taste));
|
||||
// break;
|
||||
// case FoodSortingType.TasteDown:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// y.FoodData.Taste.
|
||||
// CompareTo(x.FoodData.Taste));
|
||||
// break;
|
||||
// case FoodSortingType.NameUp:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// string.Compare(x.FoodData.Name, y.FoodData.Name, StringComparison.Ordinal));
|
||||
// break;
|
||||
// case FoodSortingType.NameDown:
|
||||
// _finishedFoodSlotUis.Sort((x, y) =>
|
||||
// string.Compare(y.FoodData.Name, x.FoodData.Name, StringComparison.Ordinal));
|
||||
// break;
|
||||
// default:
|
||||
// throw new ArgumentOutOfRangeException();
|
||||
// }
|
||||
//
|
||||
// for (var i = 0; i < _finishedFoodSlotUis.Count; i++)
|
||||
// {
|
||||
// _finishedFoodSlotUis[i].transform.SetSiblingIndex(i);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public void TycoonClosed()
|
||||
// {
|
||||
// SelectFinishedFood(null);
|
||||
// }
|
||||
// }
|
||||
// }
|
@ -1,220 +1,220 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BlueWater.Items;
|
||||
using BlueWater.Tycoons;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class DailyFoodMenuUi : MonoBehaviour
|
||||
{
|
||||
[Title("프리팹 생성 위치")]
|
||||
[SerializeField, Required]
|
||||
private Transform _soupFoodSlotLocation;
|
||||
|
||||
[FormerlySerializedAs("_fryingPanFoodSlotLocation")]
|
||||
[SerializeField, Required]
|
||||
private Transform _grillFoodSlotLocation;
|
||||
|
||||
[SerializeField, Required]
|
||||
private Transform _skewerFoodSlotLocation;
|
||||
|
||||
[SerializeField, Required]
|
||||
private Transform _dessertFoodSlotLocation;
|
||||
|
||||
[Title("프리팹")]
|
||||
[SerializeField, Required]
|
||||
private TycoonItemSlotUi _dailyFoodSlotUi;
|
||||
|
||||
[Title("실시간 데이터")]
|
||||
[SerializeField]
|
||||
private List<TycoonItemSlotUi> _soupFoodSlotUis = new(3);
|
||||
|
||||
[FormerlySerializedAs("_fryingPanFoodSlotUis")]
|
||||
[SerializeField]
|
||||
private List<TycoonItemSlotUi> _grillFoodSlotUis = new(3);
|
||||
|
||||
[SerializeField]
|
||||
private List<TycoonItemSlotUi> _skewerFoodSlotUis = new(3);
|
||||
|
||||
[SerializeField]
|
||||
private List<TycoonItemSlotUi> _dessertPanFoodSlotUis = new(3);
|
||||
|
||||
[field: SerializeField]
|
||||
public List<TycoonItemSlotUi> DailyFoodSlotUis { get; private set; } = new(12);
|
||||
|
||||
[SerializeField]
|
||||
private List<Pot> _pots = new(3);
|
||||
|
||||
[SerializeField]
|
||||
private List<Grill> _grills = new(3);
|
||||
|
||||
[SerializeField]
|
||||
private List<Skewer> _skewers = new(3);
|
||||
|
||||
private CookUi _cookUi;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
private void Initialize()
|
||||
{
|
||||
_cookUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.CookUi;
|
||||
|
||||
foreach (var element in _grillFoodSlotUis)
|
||||
{
|
||||
element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
}
|
||||
|
||||
foreach (var element in _soupFoodSlotUis)
|
||||
{
|
||||
element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
}
|
||||
|
||||
foreach (var element in _skewerFoodSlotUis)
|
||||
{
|
||||
element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
}
|
||||
|
||||
foreach (var element in _dessertPanFoodSlotUis)
|
||||
{
|
||||
element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
}
|
||||
}
|
||||
|
||||
private void RemoveDailyFood(TycoonItemSlotUi tycoonItemSlotUi)
|
||||
{
|
||||
tycoonItemSlotUi.SetFoodData(null);
|
||||
DailyFoodSlotUis.Remove(tycoonItemSlotUi);
|
||||
_cookUi.CheckCookable();
|
||||
}
|
||||
|
||||
public bool IsEmptyDailyFoodMenu(FoodData selectedFoodData)
|
||||
{
|
||||
var selectedTypeItemSlotUis = GetDailyFoodType(selectedFoodData.Type);
|
||||
|
||||
foreach (var element in selectedTypeItemSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void AddDailyFoodMenu(FoodData selectedFoodData)
|
||||
{
|
||||
var selectedTypeItemSlotUis = GetDailyFoodType(selectedFoodData.Type);
|
||||
|
||||
foreach (var element in selectedTypeItemSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||
{
|
||||
element.SetFoodData(selectedFoodData);
|
||||
DailyFoodSlotUis.Add(element);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<TycoonItemSlotUi> GetDailyFoodType(FoodType foodType)
|
||||
{
|
||||
switch (foodType)
|
||||
{
|
||||
case FoodType.None:
|
||||
Debug.LogError($"FoodType이 None입니다.");
|
||||
return null;
|
||||
case FoodType.Skewer:
|
||||
return _skewerFoodSlotUis;
|
||||
case FoodType.Soup:
|
||||
return _soupFoodSlotUis;
|
||||
case FoodType.Grill:
|
||||
return _grillFoodSlotUis;
|
||||
case FoodType.Dessert:
|
||||
return _dessertPanFoodSlotUis;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(foodType), foodType, null);
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanOpen()
|
||||
{
|
||||
return _grillFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
_soupFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
_skewerFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
_dessertPanFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx));
|
||||
}
|
||||
|
||||
public TycoonItemSlotUi InitializeGrill(Grill grill)
|
||||
{
|
||||
_grills.Add(grill);
|
||||
var index = _grills.Count - 1;
|
||||
_grillFoodSlotUis[index].SetIsLocked(false);
|
||||
_grillFoodSlotUis[index].SetFoodData(null);
|
||||
return _grillFoodSlotUis[index];
|
||||
}
|
||||
|
||||
public TycoonItemSlotUi InitializePot(Pot pot)
|
||||
{
|
||||
_pots.Add(pot);
|
||||
var index = _pots.Count - 1;
|
||||
_soupFoodSlotUis[index].SetIsLocked(false);
|
||||
_soupFoodSlotUis[index].SetFoodData(null);
|
||||
return _soupFoodSlotUis[index];
|
||||
}
|
||||
|
||||
|
||||
public TycoonItemSlotUi InitializeSkewer(Skewer skewer)
|
||||
{
|
||||
_skewers.Add(skewer);
|
||||
var index = _skewers.Count - 1;
|
||||
_skewerFoodSlotUis[index].SetIsLocked(false);
|
||||
_skewerFoodSlotUis[index].SetFoodData(null);
|
||||
return _skewerFoodSlotUis[index];
|
||||
}
|
||||
|
||||
public void TycoonClosed()
|
||||
{
|
||||
DailyFoodSlotUis.Clear();
|
||||
|
||||
foreach (var element in _grillFoodSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
{
|
||||
element.SetFoodData(null);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var element in _soupFoodSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
{
|
||||
element.SetFoodData(null);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var element in _skewerFoodSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
{
|
||||
element.SetFoodData(null);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var element in _dessertPanFoodSlotUis)
|
||||
{
|
||||
if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
{
|
||||
element.SetFoodData(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System;
|
||||
// using System.Collections.Generic;
|
||||
// using System.Linq;
|
||||
// using BlueWater.Items;
|
||||
// using BlueWater.Tycoons;
|
||||
// using Sirenix.OdinInspector;
|
||||
// using UnityEngine;
|
||||
// using UnityEngine.Serialization;
|
||||
//
|
||||
// namespace BlueWater.Uis
|
||||
// {
|
||||
// public class DailyFoodMenuUi : MonoBehaviour
|
||||
// {
|
||||
// [Title("프리팹 생성 위치")]
|
||||
// [SerializeField, Required]
|
||||
// private Transform _soupFoodSlotLocation;
|
||||
//
|
||||
// [FormerlySerializedAs("_fryingPanFoodSlotLocation")]
|
||||
// [SerializeField, Required]
|
||||
// private Transform _grillFoodSlotLocation;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private Transform _skewerFoodSlotLocation;
|
||||
//
|
||||
// [SerializeField, Required]
|
||||
// private Transform _dessertFoodSlotLocation;
|
||||
//
|
||||
// [Title("프리팹")]
|
||||
// [SerializeField, Required]
|
||||
// private TycoonItemSlotUi _dailyFoodSlotUi;
|
||||
//
|
||||
// [Title("실시간 데이터")]
|
||||
// [SerializeField]
|
||||
// private List<TycoonItemSlotUi> _soupFoodSlotUis = new(3);
|
||||
//
|
||||
// [FormerlySerializedAs("_fryingPanFoodSlotUis")]
|
||||
// [SerializeField]
|
||||
// private List<TycoonItemSlotUi> _grillFoodSlotUis = new(3);
|
||||
//
|
||||
// [SerializeField]
|
||||
// private List<TycoonItemSlotUi> _skewerFoodSlotUis = new(3);
|
||||
//
|
||||
// [SerializeField]
|
||||
// private List<TycoonItemSlotUi> _dessertPanFoodSlotUis = new(3);
|
||||
//
|
||||
// [field: SerializeField]
|
||||
// public List<TycoonItemSlotUi> DailyFoodSlotUis { get; private set; } = new(12);
|
||||
//
|
||||
// [SerializeField]
|
||||
// private List<Pot> _pots = new(3);
|
||||
//
|
||||
// [SerializeField]
|
||||
// private List<Grill> _grills = new(3);
|
||||
//
|
||||
// [SerializeField]
|
||||
// private List<Skewer> _skewers = new(3);
|
||||
//
|
||||
// private CookUi _cookUi;
|
||||
//
|
||||
// private void Start()
|
||||
// {
|
||||
// Initialize();
|
||||
// }
|
||||
//
|
||||
// private void Initialize()
|
||||
// {
|
||||
// _cookUi = TycoonUiManager.Instance.TycoonManagementUi.CookMenuUi.CookUi;
|
||||
//
|
||||
// foreach (var element in _grillFoodSlotUis)
|
||||
// {
|
||||
// element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _soupFoodSlotUis)
|
||||
// {
|
||||
// element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _skewerFoodSlotUis)
|
||||
// {
|
||||
// element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _dessertPanFoodSlotUis)
|
||||
// {
|
||||
// element.AddButtonClickListener(() => RemoveDailyFood(element));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void RemoveDailyFood(TycoonItemSlotUi tycoonItemSlotUi)
|
||||
// {
|
||||
// tycoonItemSlotUi.SetFoodData(null);
|
||||
// DailyFoodSlotUis.Remove(tycoonItemSlotUi);
|
||||
// _cookUi.CheckCookable();
|
||||
// }
|
||||
//
|
||||
// public bool IsEmptyDailyFoodMenu(FoodData selectedFoodData)
|
||||
// {
|
||||
// var selectedTypeItemSlotUis = GetDailyFoodType(selectedFoodData.Type);
|
||||
//
|
||||
// foreach (var element in selectedTypeItemSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// public void AddDailyFoodMenu(FoodData selectedFoodData)
|
||||
// {
|
||||
// var selectedTypeItemSlotUis = GetDailyFoodType(selectedFoodData.Type);
|
||||
//
|
||||
// foreach (var element in selectedTypeItemSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData == null || string.IsNullOrEmpty(element.FoodData.Idx))
|
||||
// {
|
||||
// element.SetFoodData(selectedFoodData);
|
||||
// DailyFoodSlotUis.Add(element);
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private List<TycoonItemSlotUi> GetDailyFoodType(FoodType foodType)
|
||||
// {
|
||||
// switch (foodType)
|
||||
// {
|
||||
// case FoodType.None:
|
||||
// Debug.LogError($"FoodType이 None입니다.");
|
||||
// return null;
|
||||
// case FoodType.Skewer:
|
||||
// return _skewerFoodSlotUis;
|
||||
// case FoodType.Soup:
|
||||
// return _soupFoodSlotUis;
|
||||
// case FoodType.Grill:
|
||||
// return _grillFoodSlotUis;
|
||||
// case FoodType.Dessert:
|
||||
// return _dessertPanFoodSlotUis;
|
||||
// default:
|
||||
// throw new ArgumentOutOfRangeException(nameof(foodType), foodType, null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public bool CanOpen()
|
||||
// {
|
||||
// return _grillFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
// _soupFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
// _skewerFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx)) ||
|
||||
// _dessertPanFoodSlotUis.Any(slot => slot.FoodData != null && !string.IsNullOrEmpty(slot.FoodData.Idx));
|
||||
// }
|
||||
//
|
||||
// public TycoonItemSlotUi InitializeGrill(Grill grill)
|
||||
// {
|
||||
// _grills.Add(grill);
|
||||
// var index = _grills.Count - 1;
|
||||
// _grillFoodSlotUis[index].SetIsLocked(false);
|
||||
// _grillFoodSlotUis[index].SetFoodData(null);
|
||||
// return _grillFoodSlotUis[index];
|
||||
// }
|
||||
//
|
||||
// public TycoonItemSlotUi InitializePot(Pot pot)
|
||||
// {
|
||||
// _pots.Add(pot);
|
||||
// var index = _pots.Count - 1;
|
||||
// _soupFoodSlotUis[index].SetIsLocked(false);
|
||||
// _soupFoodSlotUis[index].SetFoodData(null);
|
||||
// return _soupFoodSlotUis[index];
|
||||
// }
|
||||
//
|
||||
//
|
||||
// public TycoonItemSlotUi InitializeSkewer(Skewer skewer)
|
||||
// {
|
||||
// _skewers.Add(skewer);
|
||||
// var index = _skewers.Count - 1;
|
||||
// _skewerFoodSlotUis[index].SetIsLocked(false);
|
||||
// _skewerFoodSlotUis[index].SetFoodData(null);
|
||||
// return _skewerFoodSlotUis[index];
|
||||
// }
|
||||
//
|
||||
// public void TycoonClosed()
|
||||
// {
|
||||
// DailyFoodSlotUis.Clear();
|
||||
//
|
||||
// foreach (var element in _grillFoodSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
// {
|
||||
// element.SetFoodData(null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _soupFoodSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
// {
|
||||
// element.SetFoodData(null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _skewerFoodSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
// {
|
||||
// element.SetFoodData(null);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// foreach (var element in _dessertPanFoodSlotUis)
|
||||
// {
|
||||
// if (!element.GetIsLocked() && element.FoodData is not null)
|
||||
// {
|
||||
// element.SetFoodData(null);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
@ -1,244 +1,395 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using BlueWater;
|
||||
using BlueWater.Items;
|
||||
using BlueWater.Tycoons;
|
||||
using BlueWater.Uis;
|
||||
using BlueWater.Utility;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Localization;
|
||||
using UnityEngine.Localization.Settings;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ManualBook : SwitchActionPopupUi
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
[field: SerializeField]
|
||||
private Image cocktailImage;
|
||||
[field: SerializeField]
|
||||
private TextMeshProUGUI cocktailName;
|
||||
|
||||
[field: SerializeField, CLabel("메뉴얼 CockTail Prefab")]
|
||||
private ManualCocktailButton manualCocktailsPrefabs;
|
||||
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot01;
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot02;
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot03;
|
||||
[field: SerializeField]
|
||||
private TextMeshProUGUI ratioRange;
|
||||
|
||||
List<ManualCocktailButton> _button = new List<ManualCocktailButton>();
|
||||
private Coroutine _changedLocaleInstance;
|
||||
private ManualCocktailButton _selectedManualCocktailButton;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnLevelUp += UpdateManualBook;
|
||||
LocalizationSettings.SelectedLocaleChanged += OnChangedLocale;
|
||||
}
|
||||
|
||||
void Start()
|
||||
public class ManualBook : SwitchActionPopupUi
|
||||
{
|
||||
var book = transform.Find("Book");
|
||||
|
||||
// private Image _ingredientSlot1Image;
|
||||
// private Image _ingredientSlot2Image;
|
||||
// private Image _ingredientSlot3Image;
|
||||
|
||||
var allCocktails = ItemManager.Instance.CocktailDataSo.GetData();
|
||||
foreach (var element in allCocktails.Values)
|
||||
{
|
||||
if (element.Idx.Equals("Cocktail000")) continue; //쓰레기는 메뉴얼에 표시하지 않기
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
var cocktail = Instantiate(manualCocktailsPrefabs, book.Find("CocktailButtons"));
|
||||
cocktail.Initialize(this);
|
||||
cocktail.name = element.Idx;
|
||||
cocktail.transform.Find("Image").GetComponent<Image>().sprite = element.Sprite;
|
||||
_button.Add(cocktail);
|
||||
[SerializeField]
|
||||
private Transform _cocktailButtons;
|
||||
|
||||
[field: SerializeField]
|
||||
private Image cocktailImage;
|
||||
|
||||
[field: SerializeField]
|
||||
private TextMeshProUGUI cocktailName;
|
||||
|
||||
[field: SerializeField, CLabel("메뉴얼 CockTail Prefab")]
|
||||
private ManualCocktailButton manualCocktailsPrefabs;
|
||||
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot01;
|
||||
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot02;
|
||||
|
||||
[field: SerializeField]
|
||||
private ManualIngredientSlot slot03;
|
||||
|
||||
[field: SerializeField]
|
||||
private TextMeshProUGUI ratioRange;
|
||||
|
||||
List<ManualCocktailButton> _button = new List<ManualCocktailButton>();
|
||||
private Coroutine _changedLocaleInstance;
|
||||
private ManualCocktailButton _selectedManualCocktailButton;
|
||||
|
||||
private InputAction _openManualBookAction;
|
||||
private InputAction _pressQAction;
|
||||
private InputAction _cancelAction;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnLevelUp += UpdateManualBook;
|
||||
LocalizationSettings.SelectedLocaleChanged += OnChangedLocale;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_openManualBookAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.Tycoon, "OpenManualBook");
|
||||
_pressQAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "PressQ");
|
||||
_cancelAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "Cancel");
|
||||
|
||||
_openManualBookAction.performed += OnOpen;
|
||||
|
||||
foreach (var element2 in element.ValidIngredients) //들어가는 리큐르, 가니쉬 종류
|
||||
var allCocktails = ItemManager.Instance.CocktailDataSo.GetData();
|
||||
foreach (var element in allCocktails.Values)
|
||||
{
|
||||
if (element2.Idx.Equals("LiquidA")) { var scale = cocktail.transform.localScale; scale.z += 1; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("LiquidB")) { var scale = cocktail.transform.localScale; scale.z += 2; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("LiquidC")) { var scale = cocktail.transform.localScale; scale.z += 4; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("LiquidD")) { var scale = cocktail.transform.localScale; scale.z += 8; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("LiquidE")) { var scale = cocktail.transform.localScale; scale.z += 16; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("Garnish1")) { var scale = cocktail.transform.localScale; scale.z += 32; cocktail.transform.localScale = scale; };
|
||||
if (element2.Idx.Equals("Garnish2")) { var scale = cocktail.transform.localScale; scale.z += 64; cocktail.transform.localScale = scale; };
|
||||
}
|
||||
}
|
||||
if (element.Idx.Equals("Cocktail000")) continue; //쓰레기는 메뉴얼에 표시하지 않기
|
||||
|
||||
_button = _button.OrderBy(c => c.transform.localScale.z).ToList();
|
||||
var cocktail = Instantiate(manualCocktailsPrefabs, _cocktailButtons);
|
||||
cocktail.Initialize(this);
|
||||
cocktail.name = element.Idx;
|
||||
cocktail.SetImage(element.Sprite);
|
||||
_button.Add(cocktail);
|
||||
|
||||
for (int i = 0; i < _button.Count; i++)
|
||||
{
|
||||
_button[i].transform.SetSiblingIndex(i);
|
||||
_button[i].transform.localScale = new Vector3(1.0f,1.0f,1.0f);
|
||||
}
|
||||
foreach (var element2 in element.ValidIngredients) //들어가는 리큐르, 가니쉬 종류
|
||||
{
|
||||
if (element2.Idx.Equals("LiquidA"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 1;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
Update_Cocktails();
|
||||
SelectedItem(_button[0]);
|
||||
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
LocalizationSettings.SelectedLocaleChanged -= OnChangedLocale;
|
||||
}
|
||||
|
||||
private void OnChangedLocale(Locale locale)
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _changedLocaleInstance, ChangeLocaleCoroutine(locale));
|
||||
StartCoroutine(ChangeLocaleCoroutine(locale));
|
||||
}
|
||||
|
||||
private IEnumerator ChangeLocaleCoroutine(Locale locale)
|
||||
{
|
||||
var loadingOperation = Utils.GetTableAsync();
|
||||
yield return loadingOperation;
|
||||
if (element2.Idx.Equals("LiquidB"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 2;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
if (loadingOperation.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
SelectedItem(_selectedManualCocktailButton);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
if (element2.Idx.Equals("LiquidC"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 4;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
if (element2.Idx.Equals("LiquidD"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 8;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
private void Update_Cocktails() //해금된 칵테일의 활성 표시 유무
|
||||
{
|
||||
int playerLv = TycoonManager.Instance.TycoonStatus.CurrentLevel;
|
||||
if (element2.Idx.Equals("LiquidE"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 16;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
bool check = false;
|
||||
if (element2.Idx.Equals("Garnish1"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 32;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
|
||||
var cocktailDatas = ItemManager.Instance.CocktailDataSo.GetData();
|
||||
|
||||
foreach (var element in _button)
|
||||
{
|
||||
check = false;
|
||||
|
||||
var cocktailIngredients = cocktailDatas[element.name].ValidIngredients;
|
||||
|
||||
foreach (var element2 in cocktailIngredients)
|
||||
{
|
||||
if (element2.Idx.Equals("LiquidA")) {};
|
||||
if (element2.Idx.Equals("LiquidB") && playerLv < 5) { check = true; break; }
|
||||
if (element2.Idx.Equals("LiquidC") && playerLv < 10) { check = true; break; }
|
||||
if (element2.Idx.Equals("LiquidD") && playerLv < 15) { check = true; break; }
|
||||
if (element2.Idx.Equals("LiquidE") && playerLv < 20) { check = true; break; }
|
||||
if (element2.Idx.Equals("Garnish1") && playerLv < 25) { check = true; break; }
|
||||
if (element2.Idx.Equals("Garnish2") && playerLv < 30) { check = true; break; }
|
||||
//해금될때 어느 리퀴르랑 가니쉬가 해금되었는지 확인 불가능 하기 때문에 일단 수기로 작성...
|
||||
if (element2.Idx.Equals("Garnish2"))
|
||||
{
|
||||
var scale = cocktail.transform.localScale;
|
||||
scale.z += 64;
|
||||
cocktail.transform.localScale = scale;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!check)
|
||||
_button = _button.OrderBy(c => c.transform.localScale.z).ToList();
|
||||
|
||||
for (int i = 0; i < _button.Count; i++)
|
||||
{
|
||||
element.transform.Find("Image").GetComponent<Image>().material = null;
|
||||
_button[i].transform.SetSiblingIndex(i);
|
||||
_button[i].transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
Update_Cocktails();
|
||||
SelectedItem(_button[0]);
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
LocalizationSettings.SelectedLocaleChanged -= OnChangedLocale;
|
||||
}
|
||||
|
||||
private void OnChangedLocale(Locale locale)
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _changedLocaleInstance, ChangeLocaleCoroutine(locale));
|
||||
StartCoroutine(ChangeLocaleCoroutine(locale));
|
||||
}
|
||||
|
||||
private IEnumerator ChangeLocaleCoroutine(Locale locale)
|
||||
{
|
||||
var loadingOperation = Utils.GetTableAsync();
|
||||
yield return loadingOperation;
|
||||
|
||||
if (loadingOperation.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
SelectedItem(_selectedManualCocktailButton);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectedItem(ManualCocktailButton clickedButton)
|
||||
{
|
||||
_selectedManualCocktailButton = clickedButton;
|
||||
//if (clickedButton.GetComponent<Image>().material == null) //활성화 된 음료만 클릭이 되도록 한다.
|
||||
if (true) // 테스트용
|
||||
|
||||
public void OnOpen(InputAction.CallbackContext context)
|
||||
{
|
||||
bool checkSlot1 = false;
|
||||
bool checkSlot2 = false;
|
||||
bool checkSlot3 = false;
|
||||
Open();
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsOpened);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
_panel.SetActive(true);
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public void OnClose(InputAction.CallbackContext context)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(SwitchMapsClosed);
|
||||
IsOpened = false;
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
|
||||
public override void EnableInput()
|
||||
{
|
||||
_pressQAction.performed += OnClose;
|
||||
_cancelAction.performed += OnClose;
|
||||
}
|
||||
|
||||
public override void DisableInput()
|
||||
{
|
||||
_pressQAction.performed -= OnClose;
|
||||
_cancelAction.performed -= OnClose;
|
||||
}
|
||||
|
||||
private void Update_Cocktails() //해금된 칵테일의 활성 표시 유무
|
||||
{
|
||||
int playerLv = TycoonManager.Instance.TycoonStatus.CurrentLevel;
|
||||
|
||||
bool check = false;
|
||||
|
||||
var cocktailDatas = ItemManager.Instance.CocktailDataSo.GetData();
|
||||
var liquidDatas = ItemManager.Instance.LiquidDataSo.GetData();
|
||||
|
||||
cocktailImage.sprite = clickedButton.transform.Find("Image").GetComponent<Image>().sprite;
|
||||
cocktailName.text = Utils.GetLocalizedString(clickedButton.name);
|
||||
int ratioRangePer = cocktailDatas[clickedButton.name].RatioRange;
|
||||
ratioRange.text = ratioRangePer == 0 ? "" : $"{Utils.GetLocalizedString("MarginOfError")} : {ratioRangePer}%";
|
||||
|
||||
void Setslot(string ingredientName, int targetSlotNum = 0)
|
||||
foreach (var element in _button)
|
||||
{
|
||||
int targetSlotNumF = 0;
|
||||
|
||||
if (targetSlotNum != 0)
|
||||
check = false;
|
||||
|
||||
var cocktailIngredients = cocktailDatas[element.name].ValidIngredients;
|
||||
|
||||
foreach (var element2 in cocktailIngredients)
|
||||
{
|
||||
if (targetSlotNum == 1) {targetSlotNumF = 1; checkSlot1 = true;}
|
||||
else if (targetSlotNum == 2) {targetSlotNumF = 2; checkSlot2 = true;}
|
||||
else if (targetSlotNum == 3) {targetSlotNumF = 3; checkSlot3 = true;}
|
||||
if (element2.Idx.Equals("LiquidA"))
|
||||
{
|
||||
}
|
||||
|
||||
;
|
||||
if (element2.Idx.Equals("LiquidB") && playerLv < 5)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (element2.Idx.Equals("LiquidC") && playerLv < 10)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (element2.Idx.Equals("LiquidD") && playerLv < 15)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (element2.Idx.Equals("LiquidE") && playerLv < 20)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (element2.Idx.Equals("Garnish1") && playerLv < 25)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (element2.Idx.Equals("Garnish2") && playerLv < 30)
|
||||
{
|
||||
check = true;
|
||||
break;
|
||||
}
|
||||
//해금될때 어느 리퀴르랑 가니쉬가 해금되었는지 확인 불가능 하기 때문에 일단 수기로 작성...
|
||||
}
|
||||
else if (!checkSlot1) { targetSlotNumF = 1; checkSlot1 = true; }
|
||||
else if (!checkSlot2) { targetSlotNumF = 2; checkSlot2 = true; }
|
||||
else if (!checkSlot3) { targetSlotNumF = 3; checkSlot3 = true; }
|
||||
|
||||
ManualIngredientSlot targetSlotF = null;
|
||||
if (targetSlotNumF == 1) targetSlotF = slot01;
|
||||
else if (targetSlotNumF == 2) targetSlotF = slot02;
|
||||
else if (targetSlotNumF == 3) targetSlotF = slot03;
|
||||
|
||||
if (targetSlotF == null) return;
|
||||
|
||||
targetSlotF.SetImage(liquidDatas[ingredientName].Sprite);
|
||||
targetSlotF.SetType(Utils.GetLocalizedString(ingredientName));
|
||||
targetSlotF.SetPercent($"{cocktailDatas[clickedButton.name].GetIngredientRatio(ingredientName)}%");
|
||||
if (!check)
|
||||
{
|
||||
element.transform.Find("Image").GetComponent<Image>().material = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//가니쉬 배치를 처음으로... 일단 대기...
|
||||
/*
|
||||
*
|
||||
if (cocktailDatas[clickedButton.name].SearchIngredient("Garnish1") != 0)
|
||||
public void SelectedItem(ManualCocktailButton clickedButton)
|
||||
{
|
||||
_selectedManualCocktailButton = clickedButton;
|
||||
//if (clickedButton.GetComponent<Image>().material == null) //활성화 된 음료만 클릭이 되도록 한다.
|
||||
if (true) // 테스트용
|
||||
{
|
||||
Setslot("Garnish1",3);
|
||||
}
|
||||
else if (cocktailDatas[clickedButton.name].SearchIngredient("Garnish2") != 0)
|
||||
{
|
||||
Setslot("Garnish2",3);
|
||||
}
|
||||
*/
|
||||
bool checkSlot1 = false;
|
||||
bool checkSlot2 = false;
|
||||
bool checkSlot3 = false;
|
||||
|
||||
foreach (var element in liquidDatas)
|
||||
{
|
||||
if(cocktailDatas[clickedButton.name].SearchIngredient(element.Value.Idx) != 0) Setslot(element.Value.Idx);
|
||||
}
|
||||
|
||||
if (!checkSlot1) { slot01.gameObject.SetActive(false); }
|
||||
else { slot01.gameObject.SetActive(true);}
|
||||
if (!checkSlot2) {slot02.gameObject.SetActive(false); }
|
||||
else {slot02.gameObject.SetActive(true); }
|
||||
if (!checkSlot3) {slot03.gameObject.SetActive(false); }
|
||||
else { slot03.gameObject.SetActive(true); }
|
||||
var cocktailDatas = ItemManager.Instance.CocktailDataSo.GetData();
|
||||
var liquidDatas = ItemManager.Instance.LiquidDataSo.GetData();
|
||||
|
||||
cocktailImage.sprite = clickedButton.Image.sprite;
|
||||
cocktailName.text = Utils.GetLocalizedString(clickedButton.name);
|
||||
int ratioRangePer = cocktailDatas[clickedButton.name].RatioRange;
|
||||
ratioRange.text = ratioRangePer == 0
|
||||
? ""
|
||||
: $"{Utils.GetLocalizedString("MarginOfError")} : {ratioRangePer}%";
|
||||
|
||||
void Setslot(string ingredientName, int targetSlotNum = 0)
|
||||
{
|
||||
int targetSlotNumF = 0;
|
||||
|
||||
if (targetSlotNum != 0)
|
||||
{
|
||||
if (targetSlotNum == 1)
|
||||
{
|
||||
targetSlotNumF = 1;
|
||||
checkSlot1 = true;
|
||||
}
|
||||
else if (targetSlotNum == 2)
|
||||
{
|
||||
targetSlotNumF = 2;
|
||||
checkSlot2 = true;
|
||||
}
|
||||
else if (targetSlotNum == 3)
|
||||
{
|
||||
targetSlotNumF = 3;
|
||||
checkSlot3 = true;
|
||||
}
|
||||
}
|
||||
else if (!checkSlot1)
|
||||
{
|
||||
targetSlotNumF = 1;
|
||||
checkSlot1 = true;
|
||||
}
|
||||
else if (!checkSlot2)
|
||||
{
|
||||
targetSlotNumF = 2;
|
||||
checkSlot2 = true;
|
||||
}
|
||||
else if (!checkSlot3)
|
||||
{
|
||||
targetSlotNumF = 3;
|
||||
checkSlot3 = true;
|
||||
}
|
||||
|
||||
ManualIngredientSlot targetSlotF = null;
|
||||
if (targetSlotNumF == 1) targetSlotF = slot01;
|
||||
else if (targetSlotNumF == 2) targetSlotF = slot02;
|
||||
else if (targetSlotNumF == 3) targetSlotF = slot03;
|
||||
|
||||
if (targetSlotF == null) return;
|
||||
|
||||
targetSlotF.SetImage(liquidDatas[ingredientName].Sprite);
|
||||
targetSlotF.SetType(Utils.GetLocalizedString(ingredientName));
|
||||
targetSlotF.SetPercent($"{cocktailDatas[clickedButton.name].GetIngredientRatio(ingredientName)}%");
|
||||
}
|
||||
|
||||
//가니쉬 배치를 처음으로... 일단 대기...
|
||||
/*
|
||||
*
|
||||
if (cocktailDatas[clickedButton.name].SearchIngredient("Garnish1") != 0)
|
||||
{
|
||||
Setslot("Garnish1",3);
|
||||
}
|
||||
else if (cocktailDatas[clickedButton.name].SearchIngredient("Garnish2") != 0)
|
||||
{
|
||||
Setslot("Garnish2",3);
|
||||
}
|
||||
*/
|
||||
|
||||
foreach (var element in liquidDatas)
|
||||
{
|
||||
if (cocktailDatas[clickedButton.name].SearchIngredient(element.Value.Idx) != 0)
|
||||
Setslot(element.Value.Idx);
|
||||
}
|
||||
|
||||
if (!checkSlot1)
|
||||
{
|
||||
slot01.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
slot01.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
if (!checkSlot2)
|
||||
{
|
||||
slot02.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
slot02.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
if (!checkSlot3)
|
||||
{
|
||||
slot03.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
slot03.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateManualBook(LevelData levelData)
|
||||
{
|
||||
Update_Cocktails();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateManualBook(LevelData levelData)
|
||||
{
|
||||
Update_Cocktails();
|
||||
}
|
||||
|
||||
public void ShowUi() => gameObject.SetActive(true);
|
||||
public void HideUi() => gameObject.SetActive(false);
|
||||
}
|
||||
}
|
@ -1,26 +1,33 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ManualCocktailButton : MonoBehaviour
|
||||
{
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class ManualCocktailButton : MonoBehaviour
|
||||
{
|
||||
[field: SerializeField]
|
||||
public Image Image { get; private set; }
|
||||
|
||||
public ManualBook manual; // 다른 스크립트가 붙은 오브젝트를 참조 (에디터에서 설정 가능)
|
||||
private Button button;
|
||||
public ManualBook manual; // 다른 스크립트가 붙은 오브젝트를 참조 (에디터에서 설정 가능)
|
||||
private Button button;
|
||||
|
||||
void Start()
|
||||
{
|
||||
button = GetComponent<Button>();
|
||||
button.onClick.AddListener(() => OnButtonClicked());
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
button = GetComponent<Button>();
|
||||
button.onClick.AddListener(() => OnButtonClicked());
|
||||
}
|
||||
|
||||
public void Initialize(ManualBook manualBook)
|
||||
{
|
||||
manual = manualBook;
|
||||
}
|
||||
public void Initialize(ManualBook manualBook)
|
||||
{
|
||||
manual = manualBook;
|
||||
}
|
||||
|
||||
// 눌린 버튼을 매개변수로 받는 메서드
|
||||
public void OnButtonClicked()
|
||||
{
|
||||
manual.SelectedItem(this.GetComponent<ManualCocktailButton>());
|
||||
public void SetImage(Sprite sprite) => Image.sprite = sprite;
|
||||
|
||||
// 눌린 버튼을 매개변수로 받는 메서드
|
||||
public void OnButtonClicked()
|
||||
{
|
||||
manual.SelectedItem(this.GetComponent<ManualCocktailButton>());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,223 +1,206 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BlueWater;
|
||||
using BlueWater.Tycoons;
|
||||
using BlueWater.Uis;
|
||||
using BlueWater.Utility;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using TMPro;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.Localization;
|
||||
using UnityEngine.Localization.Settings;
|
||||
using UnityEngine.ResourceManagement.AsyncOperations;
|
||||
using UnityEngine.Serialization;
|
||||
using UnityEngine.UI;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
public class TycoonCard : MonoBehaviour
|
||||
{
|
||||
private TycoonSelectCard _selectCardUi;
|
||||
|
||||
[Title("카드 속성")]
|
||||
[SerializeField]
|
||||
private TMP_Text _informationText;
|
||||
internal CardData CardDataForIdx;
|
||||
//[field: SerializeField, CLabel("IDX"), ReadOnly]
|
||||
//private string _cardData = "AddAllLiquid";
|
||||
|
||||
[field: SerializeField, CLabel("카드 이름")]
|
||||
private string cardName;
|
||||
//[field: SerializeField, CLabel("카드 이미지")]
|
||||
//private Image CardImage;
|
||||
[field: SerializeField, CLabel("카드 텍스트")]
|
||||
private string cardText;
|
||||
|
||||
private Coroutine _currentRotationCoroutine;
|
||||
[FormerlySerializedAs("RotationDurationCard")]
|
||||
[field: Title("카드 회전")]
|
||||
[field: SerializeField, CLabel("카드 회전 속도")]
|
||||
internal float rotationDurationCard = 1.0f;
|
||||
[field: SerializeField, CLabel("회전 가속 종류")]
|
||||
public Acceleration accelerationCard;
|
||||
|
||||
[field: Title("부가효과 : 카드 기울기")]
|
||||
[field: SerializeField, CLabel("최대 기울기(각도)")]
|
||||
internal float maxRotationAngle = 15f;
|
||||
[field: SerializeField, CLabel("기울기 복원 속도")]
|
||||
internal float returnSpeed = 1.0f;
|
||||
private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적
|
||||
private Coroutine _startRotationCoroutine;
|
||||
private Coroutine _endRotationCoroutine;
|
||||
|
||||
private Image _image;
|
||||
private RectTransform _rectTransform;
|
||||
private Transform _cardComTransform;
|
||||
private TycoonCardArea _cardArea;
|
||||
private Coroutine _changedLocaleInstance;
|
||||
|
||||
private Action selectAction;
|
||||
|
||||
private void Awake()
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonCard : MonoBehaviour
|
||||
{
|
||||
_rectTransform = GetComponent<RectTransform>();
|
||||
_cardComTransform = transform.Find("CardCom").GetComponent<Transform>();
|
||||
_image = _cardComTransform.Find("Image").GetComponent<Image>();
|
||||
_selectCardUi = transform.GetComponentInParent<TycoonSelectCard>();
|
||||
_cardArea = transform.Find("Area").GetComponent<TycoonCardArea>();
|
||||
}
|
||||
[field: Title("컴포넌트")]
|
||||
[field: SerializeField]
|
||||
public RectTransform RectTransform { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public Transform Panel { get; private set; }
|
||||
|
||||
public void SetselectAction(Action<TycoonCard> action)
|
||||
{
|
||||
_cardArea.SetselectAction(action);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
LocalizationSettings.SelectedLocaleChanged += OnChangedLocale;
|
||||
}
|
||||
[field: SerializeField]
|
||||
public Image CardImage { get; private set; }
|
||||
|
||||
private void Update()
|
||||
{
|
||||
//Debug.Log(_mainCamera.WorldToScreenPoint(GameManager.Instance.CurrentTycoonPlayer.transform.position));
|
||||
//카메라 기준 캐릭터의 위치를 가져옴
|
||||
}
|
||||
[field: SerializeField]
|
||||
public GameObject BackObject { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public GameObject PriceUi { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TMP_Text PriceText { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TycoonCardArea CardArea { get; private set; }
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
LocalizationSettings.SelectedLocaleChanged -= OnChangedLocale;
|
||||
}
|
||||
[Title("카드 속성")]
|
||||
[SerializeField]
|
||||
private TMP_Text _informationText;
|
||||
|
||||
private void OnChangedLocale(Locale locale)
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _changedLocaleInstance, ChangeLocaleCoroutine(locale));
|
||||
StartCoroutine(ChangeLocaleCoroutine(locale));
|
||||
}
|
||||
internal CardData CardDataForIdx;
|
||||
//[field: SerializeField, CLabel("IDX"), ReadOnly]
|
||||
//private string _cardData = "AddAllLiquid";
|
||||
|
||||
private IEnumerator ChangeLocaleCoroutine(Locale locale)
|
||||
{
|
||||
var loadingOperation = Utils.GetTableAsync();
|
||||
yield return loadingOperation;
|
||||
[field: SerializeField, CLabel("카드 이름")]
|
||||
private string cardName;
|
||||
|
||||
if (loadingOperation.Status == AsyncOperationStatus.Succeeded)
|
||||
//[field: SerializeField, CLabel("카드 이미지")]
|
||||
//private Image CardImage;
|
||||
[field: SerializeField, CLabel("카드 텍스트")]
|
||||
private string cardText;
|
||||
|
||||
private Coroutine _currentRotationCoroutine;
|
||||
|
||||
[FormerlySerializedAs("RotationDurationCard")]
|
||||
[field: Title("카드 회전")]
|
||||
[field: SerializeField, CLabel("카드 회전 속도")]
|
||||
internal float rotationDurationCard = 1.0f;
|
||||
|
||||
[field: SerializeField, CLabel("회전 가속 종류")]
|
||||
public Acceleration accelerationCard;
|
||||
|
||||
[field: Title("부가효과 : 카드 기울기")]
|
||||
[field: SerializeField, CLabel("최대 기울기(각도)")]
|
||||
internal float maxRotationAngle = 15f;
|
||||
|
||||
[field: SerializeField, CLabel("기울기 복원 속도")]
|
||||
internal float returnSpeed = 1.0f;
|
||||
|
||||
private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적
|
||||
private Coroutine _startRotationCoroutine;
|
||||
private Coroutine _endRotationCoroutine;
|
||||
|
||||
private Coroutine _changedLocaleInstance;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
var table = loadingOperation.Result;
|
||||
var textValue = table.GetEntry(CardDataForIdx.Idx)?.GetLocalizedString();
|
||||
_informationText.text = textValue;
|
||||
LocalizationSettings.SelectedLocaleChanged += OnChangedLocale;
|
||||
}
|
||||
}
|
||||
|
||||
//지정된 IDX값으로 정보값 초기화
|
||||
public void SetCard(string cardIdx)
|
||||
{
|
||||
CardDataForIdx = TycoonManager.Instance.CardDataSo.GetDataByIdx(cardIdx);
|
||||
_informationText.text = Utils.GetLocalizedString(cardIdx);
|
||||
_image.sprite = CardDataForIdx.Sprite;
|
||||
}
|
||||
|
||||
[Button("회전")]
|
||||
public void Rotation_Start()
|
||||
{
|
||||
_cardComTransform.localRotation = Quaternion.Euler(0, -180,0);
|
||||
_cardComTransform.localScale = new Vector3(0,0,0);
|
||||
|
||||
if (_currentRotationCoroutine != null)
|
||||
private void OnDestroy()
|
||||
{
|
||||
StopCoroutine(_currentRotationCoroutine);
|
||||
_currentRotationCoroutine = null;
|
||||
LocalizationSettings.SelectedLocaleChanged -= OnChangedLocale;
|
||||
}
|
||||
|
||||
_currentRotationCoroutine = StartCoroutine(RotateOverTime());
|
||||
|
||||
// Resources.Load()
|
||||
}
|
||||
|
||||
public void Spawn()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
// 마우스 클릭 시 호출
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (_enable)
|
||||
{
|
||||
switch (_cardData) //탐색 후 행동...
|
||||
{
|
||||
//TycoonManager.Instance.TycoonStatus.CurrentExp += 10; 이런거 넣어주자...
|
||||
case "": break;
|
||||
default:
|
||||
Debug.Log("Not Found Card : IDX");
|
||||
break;
|
||||
}
|
||||
|
||||
TycoonManager.Instance.CardDataSo.AddToSelectedCard(_cardDataForIdx);
|
||||
|
||||
//해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로...
|
||||
this.SetEnable(false);
|
||||
_isPointerInside = false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
private IEnumerator RotateOverTime() //카드를 등장하며 회전시킴!
|
||||
{
|
||||
|
||||
Transform backObject = transform.Find("CardCom/Back");
|
||||
backObject.gameObject.SetActive(true);
|
||||
Quaternion startRotation = _cardComTransform.localRotation;
|
||||
Quaternion targetRotation = Quaternion.Euler(0, 0, 0);
|
||||
|
||||
Vector3 initialScale = _cardComTransform.localScale;
|
||||
|
||||
float elapsedTime = 0.0f;
|
||||
|
||||
while (elapsedTime < 0.5f)
|
||||
private void OnChangedLocale(Locale locale)
|
||||
{
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
|
||||
float t = elapsedTime / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
_cardComTransform.localScale = Vector3.Lerp(initialScale, new Vector3(0.95f,0.95f,0.95f), easedT);
|
||||
|
||||
yield return null;
|
||||
Utils.StartUniqueCoroutine(this, ref _changedLocaleInstance, ChangeLocaleCoroutine(locale));
|
||||
StartCoroutine(ChangeLocaleCoroutine(locale));
|
||||
}
|
||||
|
||||
elapsedTime = 0.0f;
|
||||
|
||||
while (elapsedTime < rotationDurationCard)
|
||||
|
||||
private IEnumerator ChangeLocaleCoroutine(Locale locale)
|
||||
{
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
var loadingOperation = Utils.GetTableAsync();
|
||||
yield return loadingOperation;
|
||||
|
||||
float t = elapsedTime / rotationDurationCard;
|
||||
float easedT = t;
|
||||
|
||||
if (accelerationCard == Acceleration.EaseExpoIn) easedT = Mathf.Pow(2, 10 * (t - 1)) ;
|
||||
else if (accelerationCard == Acceleration.EaseExpoOut) easedT = 1 - Mathf.Pow(2, -10 * t);
|
||||
else if (accelerationCard == Acceleration.EaseBounceIn) easedT = 1 - EaseEffect.BounceOut(1 - t);
|
||||
else if (accelerationCard == Acceleration.EaseBounceOut) easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
_cardComTransform.localRotation = Quaternion.Lerp(startRotation, targetRotation, easedT);
|
||||
|
||||
float currentYRotation = _cardComTransform.localRotation.eulerAngles.y;
|
||||
|
||||
if (currentYRotation <= 90.0f && backObject.gameObject.activeSelf)
|
||||
if (loadingOperation.Status == AsyncOperationStatus.Succeeded)
|
||||
{
|
||||
backObject.gameObject.SetActive(false);
|
||||
var table = loadingOperation.Result;
|
||||
var textValue = table.GetEntry(CardDataForIdx.Idx)?.GetLocalizedString();
|
||||
_informationText.text = textValue;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetName(string objectName) => gameObject.name = objectName;
|
||||
public void SetLocalPosition(Vector3 localPosition) => transform.localPosition = localPosition;
|
||||
public void SetLocalScale(Vector3 localScale) => transform.localScale = localScale;
|
||||
|
||||
//지정된 IDX값으로 정보값 초기화
|
||||
public void SetCard(CardData cardData)
|
||||
{
|
||||
CardDataForIdx = cardData;
|
||||
_informationText.text = Utils.GetLocalizedString(cardData.Idx);
|
||||
CardImage.sprite = CardDataForIdx.Sprite;
|
||||
}
|
||||
|
||||
public void SetSelectAction(Action<TycoonCard> action)
|
||||
{
|
||||
CardArea.SetselectAction(action);
|
||||
}
|
||||
|
||||
public void SetPrice(int price)
|
||||
{
|
||||
PriceText.text = price.ToString("N0");
|
||||
PriceUi.SetActive(true);
|
||||
}
|
||||
|
||||
[Button("회전")]
|
||||
public void Rotation_Start()
|
||||
{
|
||||
Panel.localRotation = Quaternion.Euler(0, -180, 0);
|
||||
Panel.localScale = new Vector3(0, 0, 0);
|
||||
|
||||
if (_currentRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_currentRotationCoroutine);
|
||||
_currentRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (elapsedTime > rotationDurationCard / 1.8)
|
||||
{
|
||||
_cardArea.SetEnable(true);
|
||||
}
|
||||
|
||||
yield return null;
|
||||
_currentRotationCoroutine = StartCoroutine(RotateOverTime());
|
||||
}
|
||||
|
||||
_cardComTransform.localRotation = targetRotation;
|
||||
/// <summary>
|
||||
/// 카드를 등장하며 회전시킴!
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private IEnumerator RotateOverTime()
|
||||
{
|
||||
BackObject.SetActive(true);
|
||||
Quaternion startRotation = Panel.localRotation;
|
||||
Quaternion targetRotation = Quaternion.Euler(0, 0, 0);
|
||||
|
||||
Vector3 initialScale = Panel.localScale;
|
||||
|
||||
float elapsedTime = 0.0f;
|
||||
|
||||
while (elapsedTime < 0.5f)
|
||||
{
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
|
||||
float t = elapsedTime / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
Panel.localScale = Vector3.Lerp(initialScale, new Vector3(0.95f, 0.95f, 0.95f), easedT);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
elapsedTime = 0.0f;
|
||||
|
||||
while (elapsedTime < rotationDurationCard)
|
||||
{
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
|
||||
float t = elapsedTime / rotationDurationCard;
|
||||
float easedT = t;
|
||||
|
||||
if (accelerationCard == Acceleration.EaseExpoIn) easedT = Mathf.Pow(2, 10 * (t - 1));
|
||||
else if (accelerationCard == Acceleration.EaseExpoOut) easedT = 1 - Mathf.Pow(2, -10 * t);
|
||||
else if (accelerationCard == Acceleration.EaseBounceIn) easedT = 1 - EaseEffect.BounceOut(1 - t);
|
||||
else if (accelerationCard == Acceleration.EaseBounceOut) easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
Panel.localRotation = Quaternion.Lerp(startRotation, targetRotation, easedT);
|
||||
|
||||
float currentYRotation = Panel.localRotation.eulerAngles.y;
|
||||
|
||||
if (currentYRotation <= 90.0f && BackObject.activeSelf)
|
||||
{
|
||||
BackObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (elapsedTime > rotationDurationCard / 1.8)
|
||||
{
|
||||
CardArea.SetEnable(true);
|
||||
}
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Panel.localRotation = targetRotation;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using BlueWater;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
@ -11,7 +10,6 @@ using UnityEngine.UI;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*To do
|
||||
*회전하는 객체 가져오기
|
||||
@ -19,230 +17,246 @@ using UnityEngine.UI;
|
||||
* 카드 회전(돌아가는거), 획득, 등장은 따로 빼놓고 Card 스크립트에 분리시켜놓기
|
||||
*/
|
||||
|
||||
public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler ,IPointerMoveHandler
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
//Area 활성화 유무
|
||||
private bool _enable = false;
|
||||
public void SetEnable(bool val) { _enable = val; }
|
||||
|
||||
private Coroutine _currentRotationCoroutine;
|
||||
|
||||
private float _maxRotationAngle;
|
||||
private float _returnSpeed;
|
||||
|
||||
private TycoonCard _tycoonCard; //부모
|
||||
private float _returnSpeedTime = 0.0f; // 복원속도를 더할 메서드
|
||||
private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적
|
||||
private Coroutine _startRotationCoroutine;
|
||||
private Coroutine _endRotationCoroutine;
|
||||
|
||||
private Image _image;
|
||||
private RectTransform _rectTransform;
|
||||
private Transform _cardComTransform;
|
||||
private Camera _uiCamera;
|
||||
|
||||
private Action<TycoonCard> selectAction;
|
||||
|
||||
private void Awake()
|
||||
public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler,
|
||||
IPointerMoveHandler
|
||||
{
|
||||
_tycoonCard = transform.parent.GetComponent<TycoonCard>();
|
||||
_rectTransform = this.GetComponent<RectTransform>();
|
||||
_cardComTransform = transform.parent.Find("CardCom").GetComponent<Transform>();
|
||||
_image = _cardComTransform.Find("Image").GetComponent<Image>();
|
||||
_maxRotationAngle = _tycoonCard.maxRotationAngle;
|
||||
_returnSpeed = _tycoonCard.returnSpeed;
|
||||
}
|
||||
private Coroutine _currentRotationCoroutine;
|
||||
|
||||
void Start()
|
||||
{
|
||||
_uiCamera = TycoonCameraManager.Instance.MainCamera;
|
||||
}
|
||||
private float _maxRotationAngle;
|
||||
private float _returnSpeed;
|
||||
|
||||
private TycoonCard _tycoonCard; //부모
|
||||
private float _returnSpeedTime = 0.0f; // 복원속도를 더할 메서드
|
||||
private bool _isPointerInside; // 이미지 안에 마우스가 있는지 여부를 추적
|
||||
private Coroutine _startRotationCoroutine;
|
||||
private Coroutine _endRotationCoroutine;
|
||||
|
||||
public void SetselectAction(Action<TycoonCard> action)
|
||||
{
|
||||
selectAction = action;
|
||||
}
|
||||
|
||||
// 마우스가 이미지 위에 올라갔을 때 호출
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (_enable)
|
||||
{
|
||||
if (_currentRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_currentRotationCoroutine);
|
||||
_currentRotationCoroutine = null;
|
||||
}
|
||||
_startRotationCoroutine = StartCoroutine(StartToRotation());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private Image _cardImage;
|
||||
private RectTransform _rectTransform;
|
||||
private Transform _panel;
|
||||
private Camera _uiCamera;
|
||||
|
||||
//Area 활성화 유무
|
||||
private bool _enable = false;
|
||||
|
||||
// 마우스가 이미지에서 벗어났을 때 호출
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (_enable)
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
private Action<TycoonCard> _onSelectAction;
|
||||
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (_enable)
|
||||
{
|
||||
_isPointerInside = false;
|
||||
_endRotationCoroutine = StartCoroutine(ReturnToZeroRotation());
|
||||
}
|
||||
}
|
||||
|
||||
// 마우스 클릭 시 호출
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (_enable)
|
||||
{
|
||||
//_tycoonCard.transform.parent.parent.GetComponent<TycoonSelectCard>().SelectedCard(_tycoonCard);
|
||||
|
||||
if (selectAction != null)
|
||||
{
|
||||
selectAction?.Invoke(_tycoonCard);
|
||||
OnPointerExit(null);
|
||||
}
|
||||
|
||||
//해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로...
|
||||
this.SetEnable(false);
|
||||
_isPointerInside = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerMove(PointerEventData eventData)
|
||||
{
|
||||
if (_isPointerInside)
|
||||
{
|
||||
RotateCard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator StartToRotation()
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
while (_returnSpeedTime < 1.0f)
|
||||
{
|
||||
_returnSpeedTime += Time.unscaledDeltaTime * _returnSpeed;
|
||||
|
||||
RotateCard();
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_isPointerInside = true;
|
||||
_returnSpeedTime = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator ReturnToZeroRotation()
|
||||
{
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
|
||||
Quaternion startRotation = _cardComTransform.GetComponent<RectTransform>().localRotation;
|
||||
Quaternion startRotationImg = _image.GetComponent<RectTransform>().localRotation;
|
||||
Quaternion endRotation = Quaternion.identity;
|
||||
|
||||
Vector3 initialScale = _cardComTransform.localScale;
|
||||
Vector3 targetScale = new Vector3(0.95f,0.95f,0.95f);
|
||||
|
||||
while (_returnSpeedTime > 0.0f)
|
||||
{
|
||||
_cardComTransform.GetComponent<RectTransform>().localRotation = Quaternion.Slerp(startRotation, endRotation, 1.0f - _returnSpeedTime);
|
||||
_image.GetComponent<RectTransform>().localRotation = Quaternion.Slerp(startRotationImg, endRotation, 1.0f - _returnSpeedTime);
|
||||
_returnSpeedTime -= Time.unscaledDeltaTime * _returnSpeed;
|
||||
|
||||
float t = (1.0f - _returnSpeedTime);
|
||||
t = 1 - Mathf.Pow(2, -10 * t);
|
||||
|
||||
_cardComTransform.localScale = Vector3.Lerp(initialScale, targetScale, t);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_returnSpeedTime = 0.0f;
|
||||
|
||||
_cardComTransform.GetComponent<RectTransform>().localRotation = Quaternion.identity;
|
||||
_image.GetComponent<RectTransform>().localRotation = Quaternion.identity;
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void RotateCard()
|
||||
{
|
||||
Vector3 initialScale = _cardComTransform.localScale;
|
||||
Vector3 targetScale = new Vector3(1.05f, 1.05f, 1.0f); // 타겟 스케일 설정
|
||||
|
||||
// 마우스 포인터의 화면 좌표(eventData.position)를 이미지의 로컬 좌표(localPoint)로 변환
|
||||
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(_rectTransform, Input.mousePosition, _uiCamera, out var localPoint))
|
||||
private void Awake()
|
||||
{
|
||||
// RectTransform의 중심을 기준으로 정규화된 값으로 변환
|
||||
Vector2 normalizedPoint = new Vector2(
|
||||
(localPoint.x / _rectTransform.rect.width) + 0.5f,
|
||||
(localPoint.y / _rectTransform.rect.height) + 0.5f
|
||||
);
|
||||
|
||||
// 좌표를 중심 기준으로 (-0.5, -0.5)에서 (0.5, 0.5)로 변환 (이미지 중앙이 0,0이 되도록)
|
||||
Vector2 centeredNormalizedPoint = normalizedPoint - new Vector2(0.5f, 0.5f);
|
||||
|
||||
// Debug.Log($"Normalized Point: {centeredNormalizedPoint}");
|
||||
|
||||
// X와 Y축의 회전 각도를 마우스 위치에 따라 계산 (최대 회전 각도를 15도로 제한)
|
||||
float rotationX = Mathf.Clamp(-centeredNormalizedPoint.y * _maxRotationAngle * 2 * _returnSpeedTime, -_maxRotationAngle, _maxRotationAngle);
|
||||
float rotationY = Mathf.Clamp(centeredNormalizedPoint.x * _maxRotationAngle * 2 * _returnSpeedTime, -_maxRotationAngle, _maxRotationAngle);
|
||||
|
||||
// 회전을 적용 (X축은 위아래 기울기, Y축은 좌우 기울기)
|
||||
_cardComTransform.GetComponent<RectTransform>().localRotation = Quaternion.Euler(rotationX, rotationY, 0f);
|
||||
_image.GetComponent<RectTransform>().localRotation = Quaternion.Euler(-rotationX, 0f, 0f);
|
||||
_tycoonCard = transform.parent.GetComponent<TycoonCard>();
|
||||
_rectTransform = GetComponent<RectTransform>();
|
||||
_panel = _tycoonCard.Panel;
|
||||
_cardImage = _tycoonCard.CardImage;
|
||||
_maxRotationAngle = _tycoonCard.maxRotationAngle;
|
||||
_returnSpeed = _tycoonCard.returnSpeed;
|
||||
}
|
||||
|
||||
// 스케일 보간 (Lerp)
|
||||
float t = Mathf.Clamp01(_returnSpeedTime);
|
||||
float easedT = 1 - Mathf.Pow(2, -10 * t);
|
||||
private void Start()
|
||||
{
|
||||
_uiCamera = TycoonCameraManager.Instance.UiCamera;
|
||||
}
|
||||
|
||||
public void SetEnable(bool val)
|
||||
{
|
||||
_enable = val;
|
||||
}
|
||||
|
||||
public void SetselectAction(Action<TycoonCard> action)
|
||||
{
|
||||
_onSelectAction = action;
|
||||
}
|
||||
|
||||
// 스케일을 Lerp 함수를 사용하여 보간
|
||||
_cardComTransform.localScale = Vector3.Lerp(initialScale, targetScale, easedT);
|
||||
// 마우스가 이미지 위에 올라갔을 때 호출
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (_enable)
|
||||
{
|
||||
if (_currentRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_currentRotationCoroutine);
|
||||
_currentRotationCoroutine = null;
|
||||
}
|
||||
|
||||
_startRotationCoroutine = StartCoroutine(StartToRotation());
|
||||
}
|
||||
}
|
||||
|
||||
// 마우스가 이미지에서 벗어났을 때 호출
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
if (_enable)
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (_enable)
|
||||
{
|
||||
_isPointerInside = false;
|
||||
_endRotationCoroutine = StartCoroutine(ReturnToZeroRotation());
|
||||
}
|
||||
}
|
||||
|
||||
// 마우스 클릭 시 호출
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
if (_enable)
|
||||
{
|
||||
//_tycoonCard.transform.parent.parent.GetComponent<TycoonSelectCard>().SelectedCard(_tycoonCard);
|
||||
|
||||
if (_onSelectAction != null)
|
||||
{
|
||||
_onSelectAction?.Invoke(_tycoonCard);
|
||||
//OnPointerExit(null);
|
||||
}
|
||||
|
||||
//해당 밑줄은 따로 메소드를 만들어주자... 여기서 호출하는게 아니라 SelectCardUi에서 호출받는 방식으로...
|
||||
//this.SetEnable(false);
|
||||
//_isPointerInside = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnPointerMove(PointerEventData eventData)
|
||||
{
|
||||
if (_isPointerInside)
|
||||
{
|
||||
RotateCard();
|
||||
}
|
||||
}
|
||||
|
||||
public void SuccessClick()
|
||||
{
|
||||
if (!_enable) return;
|
||||
|
||||
OnPointerExit(null);
|
||||
SetEnable(false);
|
||||
_isPointerInside = false;
|
||||
}
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator StartToRotation()
|
||||
{
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
while (_returnSpeedTime < 1.0f)
|
||||
{
|
||||
_returnSpeedTime += Time.unscaledDeltaTime * _returnSpeed;
|
||||
|
||||
RotateCard();
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_isPointerInside = true;
|
||||
_returnSpeedTime = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator ReturnToZeroRotation()
|
||||
{
|
||||
if (_startRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_startRotationCoroutine);
|
||||
_startRotationCoroutine = null;
|
||||
}
|
||||
|
||||
Quaternion startRotation = _panel.GetComponent<RectTransform>().localRotation;
|
||||
Quaternion startRotationImg = _cardImage.GetComponent<RectTransform>().localRotation;
|
||||
Quaternion endRotation = Quaternion.identity;
|
||||
|
||||
Vector3 initialScale = _panel.localScale;
|
||||
Vector3 targetScale = new Vector3(0.95f, 0.95f, 0.95f);
|
||||
|
||||
while (_returnSpeedTime > 0.0f)
|
||||
{
|
||||
_panel.GetComponent<RectTransform>().localRotation =
|
||||
Quaternion.Slerp(startRotation, endRotation, 1.0f - _returnSpeedTime);
|
||||
_cardImage.GetComponent<RectTransform>().localRotation =
|
||||
Quaternion.Slerp(startRotationImg, endRotation, 1.0f - _returnSpeedTime);
|
||||
_returnSpeedTime -= Time.unscaledDeltaTime * _returnSpeed;
|
||||
|
||||
float t = (1.0f - _returnSpeedTime);
|
||||
t = 1 - Mathf.Pow(2, -10 * t);
|
||||
|
||||
_panel.localScale = Vector3.Lerp(initialScale, targetScale, t);
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_returnSpeedTime = 0.0f;
|
||||
|
||||
_panel.GetComponent<RectTransform>().localRotation = Quaternion.identity;
|
||||
_cardImage.GetComponent<RectTransform>().localRotation = Quaternion.identity;
|
||||
_endRotationCoroutine = null;
|
||||
}
|
||||
|
||||
|
||||
private void RotateCard()
|
||||
{
|
||||
Vector3 initialScale = _panel.localScale;
|
||||
Vector3 targetScale = new Vector3(1.05f, 1.05f, 1.0f); // 타겟 스케일 설정
|
||||
|
||||
// 마우스 포인터의 화면 좌표(eventData.position)를 이미지의 로컬 좌표(localPoint)로 변환
|
||||
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(_rectTransform, Input.mousePosition, _uiCamera,
|
||||
out var localPoint))
|
||||
{
|
||||
// RectTransform의 중심을 기준으로 정규화된 값으로 변환
|
||||
Vector2 normalizedPoint = new Vector2(
|
||||
(localPoint.x / _rectTransform.rect.width) + 0.5f,
|
||||
(localPoint.y / _rectTransform.rect.height) + 0.5f
|
||||
);
|
||||
|
||||
// 좌표를 중심 기준으로 (-0.5, -0.5)에서 (0.5, 0.5)로 변환 (이미지 중앙이 0,0이 되도록)
|
||||
Vector2 centeredNormalizedPoint = normalizedPoint - new Vector2(0.5f, 0.5f);
|
||||
|
||||
// Debug.Log($"Normalized Point: {centeredNormalizedPoint}");
|
||||
|
||||
// X와 Y축의 회전 각도를 마우스 위치에 따라 계산 (최대 회전 각도를 15도로 제한)
|
||||
float rotationX = Mathf.Clamp(-centeredNormalizedPoint.y * _maxRotationAngle * 2 * _returnSpeedTime,
|
||||
-_maxRotationAngle, _maxRotationAngle);
|
||||
float rotationY = Mathf.Clamp(centeredNormalizedPoint.x * _maxRotationAngle * 2 * _returnSpeedTime,
|
||||
-_maxRotationAngle, _maxRotationAngle);
|
||||
|
||||
// 회전을 적용 (X축은 위아래 기울기, Y축은 좌우 기울기)
|
||||
_panel.GetComponent<RectTransform>().localRotation =
|
||||
Quaternion.Euler(rotationX, rotationY, 0f);
|
||||
_cardImage.GetComponent<RectTransform>().localRotation = Quaternion.Euler(-rotationX, 0f, 0f);
|
||||
}
|
||||
|
||||
// 스케일 보간 (Lerp)
|
||||
float t = Mathf.Clamp01(_returnSpeedTime);
|
||||
float easedT = 1 - Mathf.Pow(2, -10 * t);
|
||||
|
||||
// 스케일을 Lerp 함수를 사용하여 보간
|
||||
_panel.localScale = Vector3.Lerp(initialScale, targetScale, easedT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,414 +0,0 @@
|
||||
using BlueWater.Tycoons;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonEpicBoxUi : PopupUi
|
||||
{
|
||||
[field: SerializeField, CLabel("카드 프리펫")]
|
||||
private GameObject cardPerfab;
|
||||
|
||||
private GameObject _panel;
|
||||
|
||||
private GameObject _currentCard01;
|
||||
private GameObject _currentCard02;
|
||||
private GameObject _currentCard03;
|
||||
private GameObject _currentCard04;
|
||||
private GameObject _currentCard05;
|
||||
|
||||
private TycoonCard _tycoonCard01Componet;
|
||||
private TycoonCard _tycoonCard02Componet;
|
||||
private TycoonCard _tycoonCard03Componet;
|
||||
private TycoonCard _tycoonCard04Componet;
|
||||
private TycoonCard _tycoonCard05Componet;
|
||||
|
||||
private LevelData _lvData;
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonStatus _tycoonStatus;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox += CreateCard;
|
||||
|
||||
_panel = transform.Find("Panel").gameObject;
|
||||
HideUi();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonStatus = _tycoonManager.TycoonStatus;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox -= CreateCard;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
|
||||
[Button("에픽상자 열기")]
|
||||
private void CreateCard()
|
||||
{
|
||||
/*
|
||||
* 해당 기능에 대해서는 TycoonSelectCard와 유사한 기능이 많기에... 따로 분리시켜서 효율적으로 관리하도록하자...
|
||||
* SelectedCard(...) 에 대해서도 이하동문
|
||||
*/
|
||||
|
||||
_lvData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
|
||||
|
||||
|
||||
// 기존 카드가 있으면 삭제
|
||||
if (_currentCard01 != null) { Destroy(_currentCard01); }
|
||||
if (_currentCard02 != null) { Destroy(_currentCard02); }
|
||||
if (_currentCard03 != null) { Destroy(_currentCard03); }
|
||||
if (_currentCard04 != null) { Destroy(_currentCard04); }
|
||||
if (_currentCard05 != null) { Destroy(_currentCard05); }
|
||||
|
||||
|
||||
int rand = Random.Range(2, 6);
|
||||
|
||||
|
||||
|
||||
_currentCard01 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard01.name = "Card01";
|
||||
|
||||
_currentCard02 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard02.name = "Card02";
|
||||
|
||||
if (rand >= 3)
|
||||
{
|
||||
_currentCard03 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard03.name = "Card03";
|
||||
}
|
||||
|
||||
if (rand >= 4)
|
||||
{
|
||||
_currentCard04 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard04.name = "Card04";
|
||||
}
|
||||
|
||||
if (rand >= 5)
|
||||
{
|
||||
_currentCard05 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard05.name = "Card05";
|
||||
}
|
||||
|
||||
|
||||
var scale = new Vector3(0.65f, 0.65f, 1f);
|
||||
|
||||
|
||||
if (rand >= 5)
|
||||
{
|
||||
_currentCard01.transform.localPosition = new Vector3(-700, 30, 0);
|
||||
_currentCard01.transform.localScale = scale;
|
||||
_currentCard02.transform.localPosition = new Vector3(-350, 30, 0);
|
||||
_currentCard02.transform.localScale = scale;
|
||||
_currentCard03.transform.localPosition = new Vector3(0, 30, 0);
|
||||
_currentCard03.transform.localScale = scale;
|
||||
_currentCard04.transform.localPosition = new Vector3(350, 30, 0);
|
||||
_currentCard04.transform.localScale = scale;
|
||||
_currentCard05.transform.localPosition = new Vector3(700, 30, 0);
|
||||
_currentCard05.transform.localScale = scale;
|
||||
}
|
||||
else if (rand >= 4)
|
||||
{
|
||||
_currentCard01.transform.localPosition = new Vector3(-525, 30, 0);
|
||||
_currentCard01.transform.localScale = scale;
|
||||
_currentCard02.transform.localPosition = new Vector3(-175, 30, 0);
|
||||
_currentCard02.transform.localScale = scale;
|
||||
_currentCard03.transform.localPosition = new Vector3(175, 30, 0);
|
||||
_currentCard03.transform.localScale = scale;
|
||||
_currentCard04.transform.localPosition = new Vector3(525, 30, 0);
|
||||
_currentCard04.transform.localScale = scale;
|
||||
}
|
||||
else if (rand >= 3)
|
||||
{
|
||||
_currentCard01.transform.localPosition = new Vector3(-350, 30, 0);
|
||||
_currentCard01.transform.localScale = scale;
|
||||
_currentCard02.transform.localPosition = new Vector3(0, 30, 0);
|
||||
_currentCard02.transform.localScale = scale;
|
||||
_currentCard03.transform.localPosition = new Vector3(350, 30, 0);
|
||||
_currentCard03.transform.localScale = scale;
|
||||
}
|
||||
else if (rand >= 2)
|
||||
{
|
||||
_currentCard01.transform.localPosition = new Vector3(-175, 30, 0);
|
||||
_currentCard01.transform.localScale = scale;
|
||||
_currentCard02.transform.localPosition = new Vector3(175, 30, 0);
|
||||
_currentCard02.transform.localScale = scale;
|
||||
}
|
||||
|
||||
_tycoonCard01Componet = _currentCard01.GetComponent<TycoonCard>();
|
||||
_tycoonCard02Componet = _currentCard02.GetComponent<TycoonCard>();
|
||||
if (rand >= 3) _tycoonCard03Componet = _currentCard03.GetComponent<TycoonCard>();
|
||||
if (rand >= 4) _tycoonCard04Componet = _currentCard04.GetComponent<TycoonCard>();
|
||||
if (rand >= 5) _tycoonCard05Componet = _currentCard05.GetComponent<TycoonCard>();
|
||||
|
||||
|
||||
Open();
|
||||
|
||||
//----카드 값 지정 및 초기화----
|
||||
|
||||
CardData card;
|
||||
|
||||
var card01Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card01Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card.Type == CardType.Passive);//패시브 검사
|
||||
_tycoonCard01Componet.SetCard(card01Key);
|
||||
|
||||
|
||||
|
||||
var card02Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
if (card != null)
|
||||
{
|
||||
card02Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card02Key.Equals(card01Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive);//패시브 검사
|
||||
_tycoonCard02Componet.SetCard(card02Key);
|
||||
|
||||
var card03Key = "NULL VAL";
|
||||
if (rand >= 3)
|
||||
{
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card03Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card03Key.Equals(card01Key) || card03Key.Equals(card02Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
_tycoonCard03Componet.SetCard(card03Key);
|
||||
}
|
||||
|
||||
var card04Key = "NULL VAL";
|
||||
if (rand >= 4)
|
||||
{
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card04Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card04Key.Equals(card01Key) || card04Key.Equals(card02Key) //중복검사
|
||||
|| card04Key.Equals(card03Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
|
||||
_tycoonCard04Componet.SetCard(card04Key);
|
||||
}
|
||||
|
||||
if (rand >= 5)
|
||||
{
|
||||
var card05Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card05Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card05Key.Equals(card01Key) || card05Key.Equals(card02Key) //중복검사
|
||||
|| card05Key.Equals(card03Key) || card05Key.Equals(card04Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
|
||||
_tycoonCard05Componet.SetCard(card05Key);
|
||||
}
|
||||
|
||||
//-------------
|
||||
|
||||
//여기에 선택했을때 호출할 함수를 등록하자!
|
||||
|
||||
_tycoonCard01Componet.Rotation_Start();
|
||||
_tycoonCard02Componet.Rotation_Start();
|
||||
if (rand >= 3) _tycoonCard03Componet.Rotation_Start();
|
||||
if (rand >= 4) _tycoonCard04Componet.Rotation_Start();
|
||||
if (rand >= 5) _tycoonCard05Componet.Rotation_Start();
|
||||
|
||||
GetCard(_tycoonCard01Componet);
|
||||
GetCard(_tycoonCard02Componet);
|
||||
if (rand >= 3) GetCard(_tycoonCard03Componet);
|
||||
if (rand >= 4) GetCard(_tycoonCard04Componet);
|
||||
if (rand >= 5) GetCard(_tycoonCard05Componet);
|
||||
}
|
||||
|
||||
public void GetCard(TycoonCard currTycoonCard)
|
||||
{
|
||||
switch (currTycoonCard.CardDataForIdx.Idx) //탐색 후 행동...
|
||||
{
|
||||
case "HeartSlotPlus":
|
||||
_tycoonStatus.MaxPlayerHealth += 2;
|
||||
break;
|
||||
case "HeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth += 2;
|
||||
break;
|
||||
case "FullHeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth = _tycoonStatus.MaxPlayerHealth;
|
||||
break;
|
||||
case "AddLiquidB":
|
||||
_tycoonStatus.CurrentLiquidAmountB += 4000;
|
||||
break;
|
||||
case "AddLiquidC":
|
||||
_tycoonStatus.CurrentLiquidAmountC += 4000;
|
||||
break;
|
||||
case "AddLiquidD":
|
||||
_tycoonStatus.CurrentLiquidAmountD += 4000;
|
||||
break;
|
||||
case "AddLiquidE":
|
||||
_tycoonStatus.CurrentLiquidAmountE += 4000;
|
||||
break;
|
||||
case "AddGarnish1":
|
||||
_tycoonStatus.CurrentGarnishAmount1 += 4000;
|
||||
break;
|
||||
case "AddGarnish2":
|
||||
_tycoonStatus.CurrentGarnishAmount2 += 4000;
|
||||
break;
|
||||
case "AllLiquidAdd":
|
||||
EventManager.InvokeAddBarrels(1000);
|
||||
break;
|
||||
case "ServerNpcAdd":
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
break;
|
||||
case "CleanerNpcAdd":
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
break;
|
||||
case "BartenderNpcAdd":
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
break;
|
||||
case "SpeedBoost":
|
||||
_tycoonStatus.PlayerMoveSpeedMultiplier += 0.1f;
|
||||
break;
|
||||
case "ExpBoost":
|
||||
_tycoonStatus.ExpMultiplier += 0.2f;
|
||||
break;
|
||||
case "GoldBoost":
|
||||
_tycoonStatus.GoldMultiplier += 0.2f;
|
||||
break;
|
||||
case "AllCleanUp":
|
||||
EventManager.InvokeCleaningAll();
|
||||
break;
|
||||
case "GaugeReset":
|
||||
EventManager.InvokeGaugeResetCustomers();
|
||||
break;
|
||||
case "DashCooldownReduction":
|
||||
_tycoonStatus.PlayerDashCooldownReduction += 1;
|
||||
break;
|
||||
case "TipBoost":
|
||||
_tycoonStatus.TipMultiplier += 0.2f;
|
||||
break;
|
||||
case "EndGoldBoost":
|
||||
_tycoonStatus.EndGoldMultiplier += 0.1f;
|
||||
break;
|
||||
case "AllCustomerPurification":
|
||||
EventManager.InvokePurifiedCustomerAll();
|
||||
break;
|
||||
case "GaugeTimeUp":
|
||||
_tycoonStatus.CustomerHurryTimeIncrease += 3;
|
||||
break;
|
||||
case "BarrelAutoSupply":
|
||||
if (_tycoonManager.CardDataSo.CardFirstCheck("BarrelAutoSupply"))
|
||||
{
|
||||
EventManager.InvokeAutoSupplyBarrels();
|
||||
}
|
||||
_tycoonStatus.BarrelAutoIncrease += 2;
|
||||
break;
|
||||
case "ServerNpcUpgrade":
|
||||
_tycoonStatus.ServerTipMultiplier += 0.1f;
|
||||
break;
|
||||
case "CleanerNpcUpgrade":
|
||||
_tycoonStatus.CleanerCleaningReduction += 1;
|
||||
break;
|
||||
case "BartenderNpcUpgrade":
|
||||
_tycoonStatus.BartenderMakingReduction += 1;
|
||||
break;
|
||||
case "PassiveDoubleServing":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.DoubleServing;
|
||||
break;
|
||||
case "PassiveRandomChange":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.RandomChange;
|
||||
EventManager.InvokeChangedRandomBox();
|
||||
break;
|
||||
case "PassiveGoldAutoGain":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.GoldAutoGain;
|
||||
EventManager.InvokeGainAutoMoneyCounter(_tycoonManager.TycoonStageController.StageDataSo.AutoGainWaitTime);
|
||||
break;
|
||||
case "PassiveMakingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.MakingBonus;
|
||||
break;
|
||||
case "PassiveServingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.ServingBonus;
|
||||
break;
|
||||
case "PassiveCleaningBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.CleaningBonus;
|
||||
break;
|
||||
default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return;
|
||||
}
|
||||
|
||||
TycoonManager.Instance.CardDataSo.AddToSelectedCard(currTycoonCard.CardDataForIdx);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ShowUi() => _panel.SetActive(true);
|
||||
public void HideUi() => _panel.SetActive(false);
|
||||
}
|
||||
}
|
@ -1,52 +1,52 @@
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonManagementUi : SwitchActionPopupUi
|
||||
{
|
||||
[Title("컴포넌트")]
|
||||
[SerializeField, Required]
|
||||
private RectTransform _rectTransform;
|
||||
|
||||
[field: SerializeField, Required]
|
||||
public CookMenuUi CookMenuUi { get; private set; }
|
||||
|
||||
private Tween _openTween;
|
||||
private Tween _closeTween;
|
||||
private bool _isQuitting;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
CookMenuUi.ShowUi();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_isQuitting) return;
|
||||
|
||||
_openTween.Kill();
|
||||
_closeTween.Kill();
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
_rectTransform.anchoredPosition = new Vector2(-960f, 0f);
|
||||
base.Open();
|
||||
_openTween = _rectTransform.DOAnchorPosX(960f, 0.5f).SetAutoKill(false);
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
_closeTween = _rectTransform.DOAnchorPosX(-960f, 0.5f).SetAutoKill(false).
|
||||
OnComplete(() => base.Close());
|
||||
}
|
||||
}
|
||||
}
|
||||
// using System.Collections.Generic;
|
||||
// using DG.Tweening;
|
||||
// using Sirenix.OdinInspector;
|
||||
// using UnityEngine;
|
||||
//
|
||||
// namespace BlueWater.Uis
|
||||
// {
|
||||
// public class TycoonManagementUi : SwitchActionPopupUi
|
||||
// {
|
||||
// [Title("컴포넌트")]
|
||||
// [SerializeField, Required]
|
||||
// private RectTransform _rectTransform;
|
||||
//
|
||||
// [field: SerializeField, Required]
|
||||
// public CookMenuUi CookMenuUi { get; private set; }
|
||||
//
|
||||
// private Tween _openTween;
|
||||
// private Tween _closeTween;
|
||||
// private bool _isQuitting;
|
||||
//
|
||||
// private void Awake()
|
||||
// {
|
||||
// CookMenuUi.ShowUi();
|
||||
// }
|
||||
//
|
||||
// private void OnApplicationQuit()
|
||||
// {
|
||||
// _isQuitting = true;
|
||||
// }
|
||||
//
|
||||
// private void OnDestroy()
|
||||
// {
|
||||
// if (_isQuitting) return;
|
||||
//
|
||||
// _openTween.Kill();
|
||||
// _closeTween.Kill();
|
||||
// }
|
||||
//
|
||||
// public override void Open()
|
||||
// {
|
||||
// _rectTransform.anchoredPosition = new Vector2(-960f, 0f);
|
||||
// base.Open();
|
||||
// _openTween = _rectTransform.DOAnchorPosX(960f, 0.5f).SetAutoKill(false);
|
||||
// }
|
||||
//
|
||||
// public override void Close()
|
||||
// {
|
||||
// _closeTween = _rectTransform.DOAnchorPosX(-960f, 0.5f).SetAutoKill(false).
|
||||
// OnComplete(() => base.Close());
|
||||
// }
|
||||
// }
|
||||
// }
|
105
Assets/02.Scripts/Ui/Tycoon/TycoonRareRewardBoxUi.cs
Normal file
105
Assets/02.Scripts/Ui/Tycoon/TycoonRareRewardBoxUi.cs
Normal file
@ -0,0 +1,105 @@
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Tycoons;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonRareRewardBoxUi : PopupUi
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
[SerializeField]
|
||||
private Transform _contents;
|
||||
|
||||
[SerializeField]
|
||||
private Vector3 _cardLocalScale = new(0.65f, 0.65f, 1f);
|
||||
|
||||
private List<TycoonCard> _tycoonCards = new(5);
|
||||
|
||||
private LevelData _currentLevelData;
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonCardController _tycoonCardController;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonCardController = _tycoonManager.TycoonCardController;
|
||||
|
||||
EventManager.OnOpenedRareRewardBox += CreateCard;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnOpenedRareRewardBox -= CreateCard;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.DisableAction("OpenManualBook");
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
_panel.SetActive(true);
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
IsOpened = false;
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
PlayerInputKeyManager.Instance.EnableAction("OpenManualBook");
|
||||
}
|
||||
|
||||
[Button("레어 상자 열기")]
|
||||
private void CreateCard()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
_currentLevelData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
_tycoonCardController.DestroyCardList(_tycoonCards);
|
||||
var randomCount = Random.Range(2, 6);
|
||||
for (int i = 0; i < randomCount; i++)
|
||||
{
|
||||
var newCard = _tycoonCardController.CreateTycoonCard(_contents);
|
||||
newCard.SetName($"Card{i:00}");
|
||||
newCard.SetLocalScale(_cardLocalScale);
|
||||
_tycoonCards.Add(newCard);
|
||||
}
|
||||
|
||||
Open();
|
||||
|
||||
//----카드 값 지정 및 초기화----
|
||||
HashSet<string> hashSet = new HashSet<string>(randomCount - 1);
|
||||
foreach (var element in _tycoonCards)
|
||||
{
|
||||
CardData cardData = null;
|
||||
string cardIdx = null;
|
||||
|
||||
do
|
||||
{
|
||||
cardData = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
cardData = _tycoonManager.CardDataSo.SubstitutionLiquid(cardData, _currentLevelData);
|
||||
|
||||
if (cardData != null)
|
||||
{
|
||||
cardIdx = cardData.Idx;
|
||||
}
|
||||
|
||||
} while (cardData == null || _tycoonManager.CardDataSo.CardMaxCheck(cardData) ||
|
||||
hashSet.Contains(cardIdx) || cardData.Type == CardType.Passive);
|
||||
|
||||
hashSet.Add(cardIdx);
|
||||
element.SetCard(cardData);
|
||||
element.Rotation_Start();
|
||||
_tycoonCardController.SelectedCard(element);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -7,11 +7,12 @@ using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonResultUi : MonoBehaviour
|
||||
public class TycoonResultUi : PopupUi
|
||||
{
|
||||
[Title("결과 카드")]
|
||||
[SerializeField]
|
||||
@ -165,12 +166,14 @@ namespace BlueWater.Uis
|
||||
|
||||
private Coroutine _showResultInstance;
|
||||
private Tween _pressAnyKeyTween;
|
||||
private InputAction _cancelAction;
|
||||
private InputAction _pressAnyKeyAction;
|
||||
|
||||
private float _playTime;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnShowResult += ShowResult;
|
||||
EventManager.OnShowResult += Open;
|
||||
EventManager.OnOrderResult += AddServingCount;
|
||||
EventManager.OnMissedServing += AddMissedServingCount;
|
||||
EventManager.OnCleaningResult += AddCleaningCount;
|
||||
@ -188,6 +191,9 @@ namespace BlueWater.Uis
|
||||
|
||||
public void Start()
|
||||
{
|
||||
_cancelAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "Cancel");
|
||||
_pressAnyKeyAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, "PressAnyKey");
|
||||
|
||||
foreach (Transform element in _resultCardContents.transform)
|
||||
{
|
||||
Destroy(element.gameObject);
|
||||
@ -203,21 +209,58 @@ namespace BlueWater.Uis
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnShowResult -= ShowResult;
|
||||
EventManager.OnShowResult -= Open;
|
||||
EventManager.OnOrderResult -= AddServingCount;
|
||||
EventManager.OnMissedServing -= AddMissedServingCount;
|
||||
EventManager.OnCleaningResult -= AddCleaningCount;
|
||||
EventManager.OnAddedGold -= AddGoldCount;
|
||||
|
||||
_cancelAction.performed -= OnCancel;
|
||||
_pressAnyKeyAction.performed -= OnPressAnyKey;
|
||||
|
||||
_pressAnyKeyTween.Kill();
|
||||
}
|
||||
|
||||
|
||||
[Button("결과 연출 테스트")]
|
||||
public void ShowResult()
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
IsOpened = true;
|
||||
|
||||
Utils.StartUniqueCoroutine(this, ref _showResultInstance, ShowResultCoroutine());
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void EnableInput()
|
||||
{
|
||||
_pressAnyKeyAction.Disable();
|
||||
|
||||
_cancelAction.performed += OnCancel;
|
||||
_pressAnyKeyAction.performed += OnPressAnyKey;
|
||||
}
|
||||
|
||||
public override void DisableInput()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnCancel(InputAction.CallbackContext context)
|
||||
{
|
||||
_cancelAction.performed -= OnCancel;
|
||||
ShowImmediately();
|
||||
}
|
||||
|
||||
private void OnPressAnyKey(InputAction.CallbackContext context)
|
||||
{
|
||||
SceneManager.LoadScene("00.TycoonTitle");
|
||||
}
|
||||
|
||||
private IEnumerator ShowResultCoroutine()
|
||||
{
|
||||
SetResultData();
|
||||
@ -302,11 +345,10 @@ namespace BlueWater.Uis
|
||||
|
||||
_pressAnyKeyPanel.SetActive(true);
|
||||
_pressAnyKeyTween.Restart();
|
||||
}
|
||||
|
||||
public void ButtonContinue()
|
||||
{
|
||||
SceneManager.LoadScene("00.TycoonTitle");
|
||||
_cancelAction.performed -= OnCancel;
|
||||
_pressAnyKeyAction.Enable();
|
||||
yield return null;
|
||||
}
|
||||
|
||||
private void SetActiveUi(bool isActive)
|
||||
@ -376,6 +418,7 @@ namespace BlueWater.Uis
|
||||
|
||||
SetResultData();
|
||||
SetActiveUi(true);
|
||||
_pressAnyKeyAction.Enable();
|
||||
}
|
||||
|
||||
private void AddServingCount(Customer orderedCustomer, bool orderedCorrected)
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Tycoons;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
@ -8,39 +9,26 @@ namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonSelectCard : PopupUi
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
private Camera uiCamera;
|
||||
|
||||
[field: SerializeField, CLabel("카드 프리펫")]
|
||||
private GameObject cardPrefab;
|
||||
|
||||
private GameObject _currentCard01;
|
||||
private GameObject _currentCard02;
|
||||
private GameObject _currentCard03;
|
||||
|
||||
private TycoonCard _tycoonCard01Componet;
|
||||
private TycoonCard _tycoonCard02Componet;
|
||||
private TycoonCard _tycoonCard03Componet;
|
||||
|
||||
private LevelData _lvData;
|
||||
[SerializeField]
|
||||
private Transform _contents;
|
||||
|
||||
private List<TycoonCard> _tycoonCards = new(3);
|
||||
|
||||
private LevelData _currentLevelData;
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonStatus _tycoonStatus;
|
||||
|
||||
private bool _isSelectedPassive;
|
||||
private TycoonCardController _tycoonCardController;
|
||||
|
||||
private void Awake()
|
||||
private void Start()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox += CreateCard;
|
||||
|
||||
_panel = transform.Find("Panel").gameObject;
|
||||
HideUi();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
uiCamera = TycoonCameraManager.Instance.UiCamera;
|
||||
_panel.SetActive(false);
|
||||
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonStatus = _tycoonManager.TycoonStatus;
|
||||
_tycoonCardController = _tycoonManager.TycoonCardController;
|
||||
|
||||
EventManager.OnOpenedNormalRewardBox += CreateCard;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
@ -50,303 +38,123 @@ namespace BlueWater.Uis
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.DisableAction("OpenManualBook");
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
_panel.SetActive(true);
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
_panel.SetActive(false);
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
PlayerInputKeyManager.Instance.EnableAction("OpenManualBook");
|
||||
}
|
||||
|
||||
[Button("카드 생성하기(레벨업)")]
|
||||
private void CreateCard()
|
||||
{
|
||||
|
||||
_lvData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
// 기존 카드가 있으면 삭제
|
||||
if (_currentCard01 != null)
|
||||
_currentLevelData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
_tycoonCardController.DestroyCardList(_tycoonCards);
|
||||
for (int i = 0; i < _tycoonCards.Capacity; i++)
|
||||
{
|
||||
Destroy(_currentCard01);
|
||||
var newCard = _tycoonCardController.CreateTycoonCard(_contents);
|
||||
newCard.SetName($"Card{i:00}");
|
||||
_tycoonCards.Add(newCard);
|
||||
}
|
||||
if (_currentCard02 != null)
|
||||
{
|
||||
Destroy(_currentCard02);
|
||||
}
|
||||
if (_currentCard03 != null)
|
||||
{
|
||||
Destroy(_currentCard03);
|
||||
}
|
||||
|
||||
_currentCard01 = Instantiate(cardPrefab, _panel.transform);
|
||||
_currentCard01.name = "Card01";
|
||||
|
||||
_currentCard02 = Instantiate(cardPrefab, _panel.transform);
|
||||
_currentCard02.name = "Card02";
|
||||
|
||||
_currentCard03 = Instantiate(cardPrefab, _panel.transform);
|
||||
_currentCard03.name = "Card03";
|
||||
|
||||
_currentCard01.transform.localPosition = new Vector3(-550, 0, 0);
|
||||
_currentCard02.transform.localPosition = new Vector3(0, 0, 0);
|
||||
_currentCard03.transform.localPosition = new Vector3(550, 0, 0);
|
||||
|
||||
_tycoonCard01Componet = _currentCard01.GetComponent<TycoonCard>();
|
||||
_tycoonCard02Componet = _currentCard02.GetComponent<TycoonCard>();
|
||||
_tycoonCard03Componet = _currentCard03.GetComponent<TycoonCard>();
|
||||
|
||||
Open();
|
||||
|
||||
//----카드 값 지정 및 초기화----
|
||||
HashSet<string> hashSet = new HashSet<string>(_tycoonCards.Capacity - 1);
|
||||
foreach (var element in _tycoonCards)
|
||||
{
|
||||
CardData cardData = null;
|
||||
string cardIdx = null;
|
||||
|
||||
bool PassiveCheck(CardData card)
|
||||
{
|
||||
return _isSelectedPassive && card.Type == CardType.Passive;
|
||||
}
|
||||
|
||||
CardData card;
|
||||
|
||||
var card01Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
do
|
||||
{
|
||||
cardData = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
cardData = _tycoonManager.CardDataSo.SubstitutionLiquid(cardData, _currentLevelData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card01Key = card.Idx;
|
||||
}
|
||||
if (cardData != null)
|
||||
{
|
||||
cardIdx = cardData.Idx;
|
||||
}
|
||||
|
||||
} while (cardData == null || _tycoonManager.CardDataSo.CardMaxCheck(cardData) ||
|
||||
hashSet.Contains(cardIdx) || _tycoonCardController.IsSelectedPassiveCard(cardData));
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| PassiveCheck(card));//패시브 검사
|
||||
_tycoonCard01Componet.SetCard(card01Key);
|
||||
|
||||
|
||||
|
||||
var card02Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
if (card != null)
|
||||
{
|
||||
card02Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card02Key.Equals(card01Key) //중복검사
|
||||
|| PassiveCheck(card));//패시브 검사
|
||||
_tycoonCard02Componet.SetCard(card02Key);
|
||||
|
||||
|
||||
var card03Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card03Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card03Key.Equals(card01Key) || card03Key.Equals(card02Key) //중복검사
|
||||
|| PassiveCheck(card)); //패시브 검사
|
||||
_tycoonCard03Componet.SetCard(card03Key);
|
||||
|
||||
//-------------
|
||||
|
||||
|
||||
_tycoonCard01Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard01Componet.Rotation_Start();
|
||||
_tycoonCard02Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard02Componet.Rotation_Start();
|
||||
_tycoonCard03Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard03Componet.Rotation_Start();
|
||||
hashSet.Add(cardIdx);
|
||||
element.SetCard(cardData);
|
||||
element.SetSelectAction(SelectedCard);
|
||||
element.Rotation_Start();
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectedCard(TycoonCard currTycoonCard)
|
||||
private void SelectedCard(TycoonCard currentTycoonCard)
|
||||
{
|
||||
switch (currTycoonCard.CardDataForIdx.Idx) //탐색 후 행동...
|
||||
{
|
||||
case "HeartSlotPlus":
|
||||
_tycoonStatus.MaxPlayerHealth += 2;
|
||||
break;
|
||||
case "HeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth += 2;
|
||||
break;
|
||||
case "FullHeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth = _tycoonStatus.MaxPlayerHealth;
|
||||
break;
|
||||
case "AddLiquidB":
|
||||
_tycoonStatus.CurrentLiquidAmountB += 4000;
|
||||
break;
|
||||
case "AddLiquidC":
|
||||
_tycoonStatus.CurrentLiquidAmountC += 4000;
|
||||
break;
|
||||
case "AddLiquidD":
|
||||
_tycoonStatus.CurrentLiquidAmountD += 4000;
|
||||
break;
|
||||
case "AddLiquidE":
|
||||
_tycoonStatus.CurrentLiquidAmountE += 4000;
|
||||
break;
|
||||
case "AddGarnish1":
|
||||
_tycoonStatus.CurrentGarnishAmount1 += 4000;
|
||||
break;
|
||||
case "AddGarnish2":
|
||||
_tycoonStatus.CurrentGarnishAmount2 += 4000;
|
||||
break;
|
||||
case "AllLiquidAdd":
|
||||
EventManager.InvokeAddBarrels(1000);
|
||||
break;
|
||||
case "ServerNpcAdd":
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
break;
|
||||
case "CleanerNpcAdd":
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
break;
|
||||
case "BartenderNpcAdd":
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
break;
|
||||
case "SpeedBoost":
|
||||
_tycoonStatus.PlayerMoveSpeedMultiplier += 0.1f;
|
||||
break;
|
||||
case "ExpBoost":
|
||||
_tycoonStatus.ExpMultiplier += 0.2f;
|
||||
break;
|
||||
case "GoldBoost":
|
||||
_tycoonStatus.GoldMultiplier += 0.2f;
|
||||
break;
|
||||
case "AllCleanUp":
|
||||
EventManager.InvokeCleaningAll();
|
||||
break;
|
||||
case "GaugeReset":
|
||||
EventManager.InvokeGaugeResetCustomers();
|
||||
break;
|
||||
case "DashCooldownReduction":
|
||||
_tycoonStatus.PlayerDashCooldownReduction += 1;
|
||||
break;
|
||||
case "TipBoost":
|
||||
_tycoonStatus.TipMultiplier += 0.2f;
|
||||
break;
|
||||
case "EndGoldBoost":
|
||||
_tycoonStatus.EndGoldMultiplier += 0.1f;
|
||||
break;
|
||||
case "AllCustomerPurification":
|
||||
EventManager.InvokePurifiedCustomerAll();
|
||||
break;
|
||||
case "GaugeTimeUp":
|
||||
_tycoonStatus.CustomerHurryTimeIncrease += 3;
|
||||
break;
|
||||
case "BarrelAutoSupply":
|
||||
if (_tycoonManager.CardDataSo.CardFirstCheck("BarrelAutoSupply"))
|
||||
{
|
||||
EventManager.InvokeAutoSupplyBarrels();
|
||||
}
|
||||
_tycoonStatus.BarrelAutoIncrease += 2;
|
||||
break;
|
||||
case "ServerNpcUpgrade":
|
||||
_tycoonStatus.ServerTipMultiplier += 0.1f;
|
||||
break;
|
||||
case "CleanerNpcUpgrade":
|
||||
_tycoonStatus.CleanerCleaningReduction += 1;
|
||||
break;
|
||||
case "BartenderNpcUpgrade":
|
||||
_tycoonStatus.BartenderMakingReduction += 1;
|
||||
break;
|
||||
case "PassiveDoubleServing":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.DoubleServing;
|
||||
break;
|
||||
case "PassiveRandomChange":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.RandomChange;
|
||||
EventManager.InvokeChangedRandomBox();
|
||||
break;
|
||||
case "PassiveGoldAutoGain":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.GoldAutoGain;
|
||||
EventManager.InvokeGainAutoMoneyCounter(_tycoonManager.TycoonStageController.StageDataSo.AutoGainWaitTime);
|
||||
break;
|
||||
case "PassiveMakingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.MakingBonus;
|
||||
break;
|
||||
case "PassiveServingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.ServingBonus;
|
||||
break;
|
||||
case "PassiveCleaningBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.CleaningBonus;
|
||||
break;
|
||||
default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return;
|
||||
}
|
||||
|
||||
if (currTycoonCard.CardDataForIdx.Type == CardType.Passive) _isSelectedPassive = true;
|
||||
|
||||
TycoonManager.Instance.CardDataSo.AddToSelectedCard(currTycoonCard.CardDataForIdx);
|
||||
|
||||
StartCoroutine(SelectedAnimation(currTycoonCard));
|
||||
_tycoonCardController.SelectedCard(currentTycoonCard);
|
||||
currentTycoonCard.CardArea.SuccessClick();
|
||||
StartCoroutine(SelectedAnimation(currentTycoonCard));
|
||||
}
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator SelectedAnimation(TycoonCard currTycoonCard)
|
||||
private IEnumerator SelectedAnimation(TycoonCard currentTycoonCard)
|
||||
{
|
||||
Vector2 startPosition01; //시작 위치
|
||||
Vector2 endPosition01; // 목표 위치
|
||||
Vector2 startPosition01 = default; //시작 위치
|
||||
Vector2 endPosition01 = default; // 목표 위치
|
||||
|
||||
Vector2 startPosition02; //시작 위치
|
||||
Vector2 endPosition02; // 목표 위치
|
||||
Vector2 startPosition02 = default; //시작 위치
|
||||
Vector2 endPosition02 = default; // 목표 위치
|
||||
|
||||
Vector2 startPosition03; //시작 위치
|
||||
Vector2 endPosition03; //목표 위치
|
||||
Vector2 startPosition03 = default; //시작 위치
|
||||
Vector2 endPosition03 = default; //목표 위치
|
||||
|
||||
RectTransform rect01;
|
||||
RectTransform rect02;
|
||||
RectTransform rect03;
|
||||
RectTransform rect01 = null;
|
||||
RectTransform rect02 = null;
|
||||
RectTransform rect03 = null;
|
||||
|
||||
rect03 = currTycoonCard.GetComponent<RectTransform>();
|
||||
rect03 = currentTycoonCard.GetComponent<RectTransform>();
|
||||
startPosition03 = rect03.anchoredPosition;
|
||||
endPosition03 = new Vector2(0.0f, 0.0f);
|
||||
|
||||
|
||||
// 화면의 해상도를 가져옴
|
||||
if (currTycoonCard == _tycoonCard01Componet) //우우
|
||||
if (currentTycoonCard == _tycoonCards[0]) //우우
|
||||
{
|
||||
rect01 = _tycoonCard02Componet.GetComponent<RectTransform>();
|
||||
rect01 = _tycoonCards[0].RectTransform;
|
||||
startPosition01 = rect01.anchoredPosition; // 시작 위치
|
||||
endPosition01 = new Vector2(Screen.width + 1500, startPosition01.y); // 목표 위치(좌측)
|
||||
|
||||
rect02 = _tycoonCard03Componet.GetComponent<RectTransform>();
|
||||
rect02 = _tycoonCards[2].RectTransform;
|
||||
startPosition02 = rect02.anchoredPosition; // 시작 위치
|
||||
endPosition02 = new Vector2(Screen.width + 1500, startPosition02.y); // 목표 위치(좌측)
|
||||
}
|
||||
else if (currTycoonCard == _tycoonCard02Componet) //좌우
|
||||
else if (currentTycoonCard == _tycoonCards[1]) //좌우
|
||||
{
|
||||
rect01 = _tycoonCard01Componet.GetComponent<RectTransform>();
|
||||
rect01 = _tycoonCards[1].RectTransform;
|
||||
startPosition01 = rect01.anchoredPosition; // 시작 위치
|
||||
endPosition01 = new Vector2(-1500, startPosition01.y); // 목표 위치(좌측)
|
||||
|
||||
rect02 = _tycoonCard03Componet.GetComponent<RectTransform>();
|
||||
rect02 = _tycoonCards[2].RectTransform;
|
||||
startPosition02 = rect02.anchoredPosition; // 시작 위치
|
||||
endPosition02 = new Vector2(Screen.width + 1500, startPosition02.y); // 목표 위치(좌측)
|
||||
}
|
||||
else //좌좌
|
||||
else if (currentTycoonCard == _tycoonCards[2]) //좌좌
|
||||
{
|
||||
rect01 = _tycoonCard01Componet.GetComponent<RectTransform>();
|
||||
rect01 = _tycoonCards[0].RectTransform;
|
||||
startPosition01 = rect01.anchoredPosition; // 시작 위치
|
||||
endPosition01 = new Vector2(-1500, startPosition01.y); // 목표 위치(좌측)
|
||||
|
||||
rect02 = _tycoonCard02Componet.GetComponent<RectTransform>();
|
||||
rect02 = _tycoonCards[1].RectTransform;
|
||||
startPosition02 = rect02.anchoredPosition; // 시작 위치
|
||||
endPosition02 = new Vector2(-1500, startPosition02.y); // 목표 위치(좌측)
|
||||
}
|
||||
@ -381,26 +189,8 @@ namespace BlueWater.Uis
|
||||
yield return null;
|
||||
}
|
||||
|
||||
if (_currentCard01 != null)
|
||||
{
|
||||
Destroy(_currentCard01);
|
||||
}
|
||||
if (_currentCard02 != null)
|
||||
{
|
||||
Destroy(_currentCard02);
|
||||
}
|
||||
if (_currentCard03 != null)
|
||||
{
|
||||
Destroy(_currentCard03);
|
||||
}
|
||||
|
||||
_tycoonCardController.DestroyCardList(_tycoonCards);
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void ShowUi() => _panel.SetActive(true);
|
||||
public void HideUi() => _panel.SetActive(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,386 +0,0 @@
|
||||
using System;
|
||||
using BlueWater.Tycoons;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonShopUi : PopupUi
|
||||
{
|
||||
[field: SerializeField, CLabel("카드 프리펫")]
|
||||
private GameObject cardPerfab;
|
||||
|
||||
[field: SerializeField, CLabel("판매완료 이미지")]
|
||||
private GameObject soldOutImg;
|
||||
|
||||
[field: SerializeField, CLabel("골드TextMesh")]
|
||||
private TextMeshProUGUI goldTextmesh;
|
||||
|
||||
private GameObject _panel;
|
||||
|
||||
private GameObject _currentCard01;
|
||||
private GameObject _currentCard02;
|
||||
private GameObject _currentCard03;
|
||||
private GameObject _currentCard04;
|
||||
private GameObject _currentCard05;
|
||||
|
||||
private TycoonCard _tycoonCard01Componet;
|
||||
private TycoonCard _tycoonCard02Componet;
|
||||
private TycoonCard _tycoonCard03Componet;
|
||||
private TycoonCard _tycoonCard04Componet;
|
||||
private TycoonCard _tycoonCard05Componet;
|
||||
|
||||
private LevelData _lvData;
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonStatus _tycoonStatus;
|
||||
|
||||
private bool _isSelectedPassive = false;
|
||||
|
||||
private int _gold;
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox += CreateCard;
|
||||
|
||||
_panel = transform.Find("Panel").gameObject;
|
||||
HideUi();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
_gold = ES3.Load("EndGold", 0);
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonStatus = _tycoonManager.TycoonStatus;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox -= CreateCard;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
|
||||
[Button("Shop 열기")]
|
||||
private void CreateCard()
|
||||
{
|
||||
/*
|
||||
* 해당 기능에 대해서는 TycoonSelectCard와 유사한 기능이 많기에... 따로 분리시켜서 효율적으로 관리하도록하자...
|
||||
* SelectedCard(...) 에 대해서도 이하동문
|
||||
*/
|
||||
|
||||
_lvData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
// 기존 카드가 있으면 삭제
|
||||
if (_currentCard01 != null) { Destroy(_currentCard01); }
|
||||
if (_currentCard02 != null) { Destroy(_currentCard02); }
|
||||
if (_currentCard03 != null) { Destroy(_currentCard03); }
|
||||
if (_currentCard04 != null) { Destroy(_currentCard04); }
|
||||
if (_currentCard05 != null) { Destroy(_currentCard05); }
|
||||
|
||||
|
||||
_currentCard01 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard01.name = "Card01";
|
||||
|
||||
_currentCard02 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard02.name = "Card02";
|
||||
|
||||
_currentCard03 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard03.name = "Card03";
|
||||
|
||||
_currentCard04 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard04.name = "Card04";
|
||||
|
||||
_currentCard05 = Instantiate(cardPerfab, _panel.transform);
|
||||
_currentCard05.name = "Card05";
|
||||
|
||||
var scale = new Vector3(0.65f, 0.65f, 1f);
|
||||
|
||||
_currentCard01.transform.localPosition = new Vector3(-700, 30, 0);
|
||||
_currentCard01.transform.localScale = scale;
|
||||
_currentCard02.transform.localPosition = new Vector3(-350, 30, 0);
|
||||
_currentCard02.transform.localScale = scale;
|
||||
_currentCard03.transform.localPosition = new Vector3(0, 30, 0);
|
||||
_currentCard03.transform.localScale = scale;
|
||||
_currentCard04.transform.localPosition = new Vector3(350, 30, 0);
|
||||
_currentCard04.transform.localScale = scale;
|
||||
_currentCard05.transform.localPosition = new Vector3(700, 30, 0);
|
||||
_currentCard05.transform.localScale = scale;
|
||||
|
||||
_tycoonCard01Componet = _currentCard01.GetComponent<TycoonCard>();
|
||||
_tycoonCard02Componet = _currentCard02.GetComponent<TycoonCard>();
|
||||
_tycoonCard03Componet = _currentCard03.GetComponent<TycoonCard>();
|
||||
_tycoonCard04Componet = _currentCard04.GetComponent<TycoonCard>();
|
||||
_tycoonCard05Componet = _currentCard05.GetComponent<TycoonCard>();
|
||||
|
||||
|
||||
Open();
|
||||
|
||||
//----카드 값 지정 및 초기화----
|
||||
|
||||
bool PassiveCheck(CardData card)
|
||||
{
|
||||
return _isSelectedPassive && card.Type == CardType.Passive;
|
||||
}
|
||||
|
||||
CardData card;
|
||||
|
||||
var card01Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card01Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card.Type == CardType.Passive);//패시브 검사
|
||||
_tycoonCard01Componet.SetCard(card01Key);
|
||||
|
||||
|
||||
|
||||
var card02Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
if (card != null)
|
||||
{
|
||||
card02Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card02Key.Equals(card01Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive);//패시브 검사
|
||||
_tycoonCard02Componet.SetCard(card02Key);
|
||||
|
||||
|
||||
var card03Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card03Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card03Key.Equals(card01Key) || card03Key.Equals(card02Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
_tycoonCard03Componet.SetCard(card03Key);
|
||||
|
||||
|
||||
var card04Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card04Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card04Key.Equals(card01Key) || card04Key.Equals(card02Key) //중복검사
|
||||
|| card04Key.Equals(card03Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
_tycoonCard04Componet.SetCard(card04Key);
|
||||
|
||||
var card05Key = "NULL VAL";
|
||||
do
|
||||
{
|
||||
card = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
card = _tycoonManager.CardDataSo.SubstitutionLiquid(card, _lvData);
|
||||
|
||||
if (card != null)
|
||||
{
|
||||
card05Key = card.Idx;
|
||||
}
|
||||
|
||||
} while (card == null || _tycoonManager.CardDataSo.CardMaxCheck(card) //Max 검사
|
||||
|| card05Key.Equals(card01Key) || card05Key.Equals(card02Key) //중복검사
|
||||
|| card05Key.Equals(card03Key) || card05Key.Equals(card04Key) //중복검사
|
||||
|| card.Shop != ShopType.Active //숍 등장 검사
|
||||
|| card.Type == CardType.Passive); //패시브 검사
|
||||
_tycoonCard05Componet.SetCard(card05Key);
|
||||
|
||||
//-------------
|
||||
|
||||
//여기에 선택했을때 호출할 함수를 등록하자!
|
||||
|
||||
_tycoonCard01Componet.Rotation_Start();
|
||||
_tycoonCard02Componet.Rotation_Start();
|
||||
_tycoonCard03Componet.Rotation_Start();
|
||||
_tycoonCard04Componet.Rotation_Start();
|
||||
_tycoonCard05Componet.Rotation_Start();
|
||||
|
||||
_tycoonCard01Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard02Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard03Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard04Componet.SetselectAction(SelectedCard);
|
||||
_tycoonCard05Componet.SetselectAction(SelectedCard);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void SelectedCard(TycoonCard currTycoonCard)
|
||||
{
|
||||
|
||||
//살 수 있는 가격이면 SOLD OUT 표시하기! 못사면 Gold를 빨갛게 표시하고 흔들임 효과 주기
|
||||
var cardSoldOutImg = Instantiate(soldOutImg, currTycoonCard.transform);
|
||||
cardSoldOutImg.transform.localPosition = new Vector3(0, 0, 0);
|
||||
cardSoldOutImg.transform.localScale = new Vector3(1f, 1f, 1f);
|
||||
|
||||
switch (currTycoonCard.CardDataForIdx.Idx) //탐색 후 행동...
|
||||
{
|
||||
case "HeartSlotPlus":
|
||||
_tycoonStatus.MaxPlayerHealth += 2;
|
||||
break;
|
||||
case "HeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth += 2;
|
||||
break;
|
||||
case "FullHeartRecovery":
|
||||
_tycoonStatus.CurrentPlayerHealth = _tycoonStatus.MaxPlayerHealth;
|
||||
break;
|
||||
case "AddLiquidB":
|
||||
_tycoonStatus.CurrentLiquidAmountB += 4000;
|
||||
break;
|
||||
case "AddLiquidC":
|
||||
_tycoonStatus.CurrentLiquidAmountC += 4000;
|
||||
break;
|
||||
case "AddLiquidD":
|
||||
_tycoonStatus.CurrentLiquidAmountD += 4000;
|
||||
break;
|
||||
case "AddLiquidE":
|
||||
_tycoonStatus.CurrentLiquidAmountE += 4000;
|
||||
break;
|
||||
case "AddGarnish1":
|
||||
_tycoonStatus.CurrentGarnishAmount1 += 4000;
|
||||
break;
|
||||
case "AddGarnish2":
|
||||
_tycoonStatus.CurrentGarnishAmount2 += 4000;
|
||||
break;
|
||||
case "AllLiquidAdd":
|
||||
EventManager.InvokeAddBarrels(1000);
|
||||
break;
|
||||
case "ServerNpcAdd":
|
||||
EventManager.InvokeCreateServerCrew();
|
||||
break;
|
||||
case "CleanerNpcAdd":
|
||||
EventManager.InvokeCreateCleanerCrew();
|
||||
break;
|
||||
case "BartenderNpcAdd":
|
||||
EventManager.InvokeCreateBartenderCrew();
|
||||
break;
|
||||
case "SpeedBoost":
|
||||
_tycoonStatus.PlayerMoveSpeedMultiplier += 0.1f;
|
||||
break;
|
||||
case "ExpBoost":
|
||||
_tycoonStatus.ExpMultiplier += 0.2f;
|
||||
break;
|
||||
case "GoldBoost":
|
||||
_tycoonStatus.GoldMultiplier += 0.2f;
|
||||
break;
|
||||
case "AllCleanUp":
|
||||
EventManager.InvokeCleaningAll();
|
||||
break;
|
||||
case "GaugeReset":
|
||||
EventManager.InvokeGaugeResetCustomers();
|
||||
break;
|
||||
case "DashCooldownReduction":
|
||||
_tycoonStatus.PlayerDashCooldownReduction += 1;
|
||||
break;
|
||||
case "TipBoost":
|
||||
_tycoonStatus.TipMultiplier += 0.2f;
|
||||
break;
|
||||
case "EndGoldBoost":
|
||||
_tycoonStatus.EndGoldMultiplier += 0.1f;
|
||||
break;
|
||||
case "AllCustomerPurification":
|
||||
EventManager.InvokePurifiedCustomerAll();
|
||||
break;
|
||||
case "GaugeTimeUp":
|
||||
_tycoonStatus.CustomerHurryTimeIncrease += 3;
|
||||
break;
|
||||
case "BarrelAutoSupply":
|
||||
if (_tycoonManager.CardDataSo.CardFirstCheck("BarrelAutoSupply"))
|
||||
{
|
||||
EventManager.InvokeAutoSupplyBarrels();
|
||||
}
|
||||
_tycoonStatus.BarrelAutoIncrease += 2;
|
||||
break;
|
||||
case "ServerNpcUpgrade":
|
||||
_tycoonStatus.ServerTipMultiplier += 0.1f;
|
||||
break;
|
||||
case "CleanerNpcUpgrade":
|
||||
_tycoonStatus.CleanerCleaningReduction += 1;
|
||||
break;
|
||||
case "BartenderNpcUpgrade":
|
||||
_tycoonStatus.BartenderMakingReduction += 1;
|
||||
break;
|
||||
case "PassiveDoubleServing":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.DoubleServing;
|
||||
break;
|
||||
case "PassiveRandomChange":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.RandomChange;
|
||||
EventManager.InvokeChangedRandomBox();
|
||||
break;
|
||||
case "PassiveGoldAutoGain":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.GoldAutoGain;
|
||||
EventManager.InvokeGainAutoMoneyCounter(_tycoonManager.TycoonStageController.StageDataSo.AutoGainWaitTime);
|
||||
break;
|
||||
case "PassiveMakingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.MakingBonus;
|
||||
break;
|
||||
case "PassiveServingBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.ServingBonus;
|
||||
break;
|
||||
case "PassiveCleaningBonus":
|
||||
_tycoonStatus.CurrentPassiveCard = PassiveCard.CleaningBonus;
|
||||
break;
|
||||
default: Debug.Log("Not Found Card : IDX" + currTycoonCard.CardDataForIdx.Idx); return;
|
||||
}
|
||||
|
||||
if (currTycoonCard.CardDataForIdx.Type == CardType.Passive) _isSelectedPassive = true;
|
||||
|
||||
TycoonManager.Instance.CardDataSo.AddToSelectedCard(currTycoonCard.CardDataForIdx);
|
||||
|
||||
}
|
||||
|
||||
public void ShowUi() => _panel.SetActive(true);
|
||||
public void HideUi() => _panel.SetActive(false);
|
||||
}
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
using BlueWater.Tycoons;
|
||||
using DG.Tweening;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
@ -31,7 +30,6 @@ namespace BlueWater.Uis
|
||||
private Tween _openUiEndTween;
|
||||
private Tween _closedUiStartTween;
|
||||
private Tween _closedUiEndTween;
|
||||
private bool _isQuitting;
|
||||
|
||||
// Hashes
|
||||
private static readonly int _highlightTriggerHash = Animator.StringToHash("highlightTrigger");
|
||||
@ -46,19 +44,19 @@ namespace BlueWater.Uis
|
||||
InitializeComponents();
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
private void Start()
|
||||
{
|
||||
_isQuitting = true;
|
||||
EventManager.OnTycoonGameStarted += TycoonOpenUi;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (_isQuitting) return;
|
||||
|
||||
_openUiStartTween.Kill();
|
||||
_openUiEndTween.Kill();
|
||||
_closedUiStartTween.Kill();
|
||||
_closedUiEndTween.Kill();
|
||||
|
||||
EventManager.OnTycoonGameStarted -= TycoonOpenUi;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -103,6 +101,7 @@ namespace BlueWater.Uis
|
||||
_openUiImage.SetActive(false);
|
||||
_panel.SetActive(false);
|
||||
PlayerInputKeyManager.Instance.EnableCurrentPlayerInput();
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
210
Assets/02.Scripts/Ui/Tycoon/TycoonStartShopUi.cs
Normal file
210
Assets/02.Scripts/Ui/Tycoon/TycoonStartShopUi.cs
Normal file
@ -0,0 +1,210 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using BlueWater.Tycoons;
|
||||
using BlueWater.Utility;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonStartShopUi : PopupUi
|
||||
{
|
||||
[SerializeField, CLabel("판매완료 프리팹")]
|
||||
private GameObject _soldOutPrefab;
|
||||
|
||||
[SerializeField]
|
||||
private RectTransform _endGoldUiRect;
|
||||
|
||||
[SerializeField]
|
||||
private TMP_Text _endGoldText;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
[SerializeField]
|
||||
private Transform _contents;
|
||||
|
||||
[SerializeField]
|
||||
private Vector3 _cardLocalScale = new(0.65f, 0.65f, 1f);
|
||||
|
||||
[Title("구매 성공 연출")]
|
||||
[SerializeField]
|
||||
private float _endGoldChangeDuration = 1f;
|
||||
|
||||
[Title("구매 실패 연출")]
|
||||
[SerializeField]
|
||||
private Color _targetColor = Color.red;
|
||||
|
||||
[SerializeField]
|
||||
private float _duration = 0.5f;
|
||||
|
||||
[SerializeField]
|
||||
private Vector3 _punchPosition = new(10f, 0f, 0f);
|
||||
|
||||
[Title("저장된 골드")]
|
||||
[SerializeField]
|
||||
private int _endGold;
|
||||
|
||||
private List<TycoonCard> _tycoonCards = new(5);
|
||||
|
||||
private LevelData _currentLevelData;
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonCardController _tycoonCardController;
|
||||
private Sequence _failedPurchaseSequence;
|
||||
private Coroutine _changeGoldInstance;
|
||||
|
||||
private Color _originalColor;
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
if (_panel.activeSelf)
|
||||
{
|
||||
Utils.StartUniqueCoroutine(this, ref _changeGoldInstance, AnimateGoldChange());
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
EventManager.OnInitializedPlayerInput += CreateCard;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonCardController = _tycoonManager.TycoonCardController;
|
||||
_endGold = ES3.Load("EndGold", 0);
|
||||
_endGoldText.text = _endGold.ToString("N0");
|
||||
_originalColor = _endGoldText.color;
|
||||
|
||||
_failedPurchaseSequence = DOTween.Sequence();
|
||||
_failedPurchaseSequence
|
||||
.Join(_endGoldUiRect.DOPunchPosition(_punchPosition, _duration))
|
||||
.Join(_endGoldText.DOColor(_targetColor, _duration / 2f))
|
||||
.Append(_endGoldText.DOColor(_originalColor, _duration / 2f))
|
||||
.SetUpdate(true)
|
||||
.SetAutoKill(false)
|
||||
.Pause();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
_failedPurchaseSequence.Kill();
|
||||
|
||||
EventManager.OnInitializedPlayerInput -= CreateCard;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.DisableAction("OpenManualBook");
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
_panel.SetActive(true);
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
IsOpened = false;
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
PlayerInputKeyManager.Instance.EnableAction("OpenManualBook");
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
[Button("상점 열기")]
|
||||
private void CreateCard()
|
||||
{
|
||||
if (!Application.isPlaying) return;
|
||||
|
||||
Utils.StartUniqueCoroutine(this, ref _changeGoldInstance, AnimateGoldChange());
|
||||
|
||||
_currentLevelData = TycoonManager.Instance.GetCurrentLevelData();
|
||||
_tycoonCardController.DestroyCardList(_tycoonCards);
|
||||
for (int i = 0; i < _tycoonCards.Capacity; i++)
|
||||
{
|
||||
var newCard = _tycoonCardController.CreateTycoonCard(_contents);
|
||||
newCard.SetName($"Card{i:00}");
|
||||
newCard.SetLocalScale(_cardLocalScale);
|
||||
_tycoonCards.Add(newCard);
|
||||
}
|
||||
|
||||
Open();
|
||||
|
||||
//----카드 값 지정 및 초기화----
|
||||
HashSet<string> hashSet = new HashSet<string>(_tycoonCards.Count - 1);
|
||||
bool isAddedPassive = false;
|
||||
foreach (var element in _tycoonCards)
|
||||
{
|
||||
CardData cardData = null;
|
||||
string cardIdx = null;
|
||||
|
||||
do
|
||||
{
|
||||
cardData = _tycoonManager.CardDataSo.GetRandCardData();
|
||||
cardData = _tycoonManager.CardDataSo.SubstitutionLiquid(cardData, _currentLevelData);
|
||||
|
||||
if (cardData != null)
|
||||
{
|
||||
cardIdx = cardData.Idx;
|
||||
}
|
||||
|
||||
} while (cardData == null || _tycoonManager.CardDataSo.CardMaxCheck(cardData) ||
|
||||
hashSet.Contains(cardIdx) || cardData.Shop != ShopType.Active ||
|
||||
(cardData.Type == CardType.Passive && isAddedPassive));
|
||||
|
||||
if (cardData.Type == CardType.Passive)
|
||||
{
|
||||
isAddedPassive = true;
|
||||
}
|
||||
hashSet.Add(cardIdx);
|
||||
element.SetCard(cardData);
|
||||
element.SetSelectAction(SelectedCard);
|
||||
element.SetPrice(cardData.Price);
|
||||
element.Rotation_Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectedCard(TycoonCard currentTycoonCard)
|
||||
{
|
||||
var cardPrice = currentTycoonCard.CardDataForIdx.Price;
|
||||
|
||||
// 구매 불가능할 때,
|
||||
if (_endGold < cardPrice)
|
||||
{
|
||||
_failedPurchaseSequence.Restart();
|
||||
return;
|
||||
}
|
||||
|
||||
// 구매 가능할 때,
|
||||
_endGold -= cardPrice;
|
||||
Utils.StartUniqueCoroutine(this, ref _changeGoldInstance, AnimateGoldChange());
|
||||
currentTycoonCard.CardArea.SuccessClick();
|
||||
Instantiate(_soldOutPrefab, currentTycoonCard.transform);
|
||||
|
||||
_tycoonCardController.SelectedCard(currentTycoonCard);
|
||||
}
|
||||
|
||||
private IEnumerator AnimateGoldChange()
|
||||
{
|
||||
var currentGold = int.Parse(_endGoldText.text.Replace(",", ""));
|
||||
var targetGold = _endGold;
|
||||
var elapsedTime = 0f;
|
||||
while (elapsedTime <= _endGoldChangeDuration)
|
||||
{
|
||||
var newGold = (int)Mathf.Lerp(currentGold, targetGold, elapsedTime / _endGoldChangeDuration);
|
||||
_endGoldText.text = newGold.ToString("N0");
|
||||
elapsedTime += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
_endGoldText.text = targetGold.ToString("N0");
|
||||
}
|
||||
}
|
||||
}
|
@ -16,24 +16,6 @@ namespace BlueWater.Uis
|
||||
[field: SerializeField]
|
||||
public Canvas WorldCanvas { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public GoldUi GoldUi { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TycoonUpgradeUi TycoonUpgradeUi { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TycoonManagementUi TycoonManagementUi { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public TycoonStageUi TycoonStageUi { get; private set; }
|
||||
|
||||
[field: SerializeField]
|
||||
public ManualBook ManualBook { get; private set; }
|
||||
|
||||
// [field: SerializeField]
|
||||
// public BrewingUi BrewingUi { get; private set; }
|
||||
|
||||
[SerializeField]
|
||||
private Image _fadeImage;
|
||||
|
||||
@ -49,17 +31,11 @@ namespace BlueWater.Uis
|
||||
|
||||
private void Start()
|
||||
{
|
||||
EventManager.OnTycoonGameStarted += TycoonOpenEvent;
|
||||
EventManager.OnTycoonGameOvered += TycoonClosedEvent;
|
||||
EventManager.OnFadeInOut += FadeInOut;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (Quitting) return;
|
||||
|
||||
EventManager.OnTycoonGameStarted -= TycoonOpenEvent;
|
||||
EventManager.OnTycoonGameOvered -= TycoonClosedEvent;
|
||||
EventManager.OnFadeInOut -= FadeInOut;
|
||||
}
|
||||
|
||||
@ -73,31 +49,12 @@ namespace BlueWater.Uis
|
||||
{
|
||||
MainCanvas = GetComponent<Canvas>();
|
||||
WorldCanvas = GameObject.Find("WorldCanvas").GetComponent<Canvas>();
|
||||
GoldUi = transform.Find("IngameUi/StatusPanel/GoldUi").GetComponent<GoldUi>();
|
||||
TycoonUpgradeUi = GetComponentInChildren<TycoonUpgradeUi>(true);
|
||||
TycoonManagementUi = GetComponentInChildren<TycoonManagementUi>(true);
|
||||
TycoonStageUi = GetComponentInChildren<TycoonStageUi>(true);
|
||||
//BrewingUi = GetComponentInChildren<BrewingUi>(true);
|
||||
ManualBook = GetComponentInChildren<ManualBook>(true);
|
||||
_fadeImage = MainCanvas.transform.Find("FadeImage").GetComponent<Image>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Methods
|
||||
#region Methods
|
||||
|
||||
private void TycoonOpenEvent()
|
||||
{
|
||||
TycoonStageUi.TycoonOpenUi();
|
||||
}
|
||||
|
||||
private void TycoonClosedEvent()
|
||||
{
|
||||
TycoonStageUi.TycoonClosedUi();
|
||||
TycoonManagementUi.CookMenuUi.CookUi.TycoonClosed();
|
||||
TycoonManagementUi.CookMenuUi.DailyFoodMenuUi.TycoonClosed();
|
||||
}
|
||||
|
||||
public void FadeInOut(float fadeInTime, float fadeOutTime, Color? fadeColor = null, float delayAfterFadeIn = 0f)
|
||||
{
|
||||
|
132
Assets/02.Scripts/Ui/Tycoon/UpgradePopupUi.cs
Normal file
132
Assets/02.Scripts/Ui/Tycoon/UpgradePopupUi.cs
Normal file
@ -0,0 +1,132 @@
|
||||
using System.Collections;
|
||||
using BlueWater.Items;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class UpgradePopupUi : PopupUi
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
[SerializeField]
|
||||
private AnimationController _animationController;
|
||||
|
||||
[SerializeField]
|
||||
private Image information; //정보를 알려주는 이미지
|
||||
|
||||
[SerializeField]
|
||||
private Image liqueurImage; //리큐르 팝업창에 뜰 이미지
|
||||
|
||||
private void Start()
|
||||
{
|
||||
EventManager.OnLevelUp += StartUpgradePopup;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnLevelUp -= StartUpgradePopup;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
PlayerInputKeyManager.Instance.DisableAction("OpenManualBook");
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.TycoonUi);
|
||||
PopupUiController.RegisterPopup(this);
|
||||
_panel.SetActive(true);
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
PlayerInputKeyManager.Instance.SwitchCurrentActionMap(InputActionMaps.Tycoon);
|
||||
IsOpened = false;
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
PlayerInputKeyManager.Instance.EnableAction("OpenManualBook");
|
||||
}
|
||||
|
||||
private void StartUpgradePopup(LevelData currentLevelData)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentLevelData.OpenUpgrade)) return;
|
||||
|
||||
liqueurImage.sprite = int.Parse(currentLevelData.Idx) switch
|
||||
{
|
||||
5 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidB").Sprite,
|
||||
10 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidC").Sprite,
|
||||
15 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidD").Sprite,
|
||||
20 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidE").Sprite,
|
||||
25 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("Garnish1").Sprite,
|
||||
30 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("Garnish2").Sprite,
|
||||
_ => liqueurImage.sprite
|
||||
};
|
||||
|
||||
StartCoroutine(StartUpgradePopupCoroutine(currentLevelData));
|
||||
}
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator StartUpgradePopupCoroutine(LevelData currentLevelData)
|
||||
{
|
||||
Open();
|
||||
float timer = 0f;
|
||||
|
||||
while (timer < 1.0f)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 0.5)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
|
||||
float t = timer / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
information.transform.localScale =
|
||||
Vector3.Lerp(new Vector3(0.0f, 0.0f, 0.0f), new Vector3(1.0f, 1.0f, 1.0f), easedT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 2.0)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 0.5)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
|
||||
float t = timer / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
information.transform.localScale =
|
||||
Vector3.Lerp(new Vector3(1.0f, 1.0f, 1.0f), new Vector3(0.0f, 0.0f, 0.0f), easedT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_animationController.PlayAnimation("CardUpgrade_Reverse");
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 1.0f)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
using System.Collections;
|
||||
using BlueWater;
|
||||
using BlueWater.Items;
|
||||
using BlueWater.Tycoons;
|
||||
using BlueWater.Uis;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Upgrade_Popup : PopupUi
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
|
||||
[SerializeField]
|
||||
private AnimationController _animationController;
|
||||
|
||||
[SerializeField]
|
||||
private Image information; //정보를 알려주는 이미지
|
||||
|
||||
[SerializeField]
|
||||
private Image liqueurImage; //리큐르 팝업창에 뜰 이미지
|
||||
|
||||
private void Start()
|
||||
{
|
||||
EventManager.OnLevelUp += StartUpgradePopup;
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnLevelUp -= StartUpgradePopup;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
{
|
||||
VisualFeedbackManager.Instance.SetBaseTimeScale(0.0f);
|
||||
PlayerInputKeyManager.Instance.DisableAction("Manual");
|
||||
PopupUiController.RegisterPopup(this);
|
||||
ShowUi();
|
||||
IsOpened = true;
|
||||
}
|
||||
|
||||
public override void Close()
|
||||
{
|
||||
HideUi();
|
||||
PlayerInputKeyManager.Instance.EnableAction("Manual");
|
||||
PopupUiController.UnregisterPopup(this);
|
||||
IsOpened = false;
|
||||
|
||||
if (!PopupUiController.IsPopupListEmpty()) return;
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
|
||||
private void StartUpgradePopup(LevelData currentLevelData)
|
||||
{
|
||||
if (string.IsNullOrEmpty(currentLevelData.OpenUpgrade)) return;
|
||||
|
||||
liqueurImage.sprite = int.Parse(currentLevelData.Idx) switch
|
||||
{
|
||||
5 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidB").Sprite,
|
||||
10 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidC").Sprite,
|
||||
15 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidD").Sprite,
|
||||
20 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("LiquidE").Sprite,
|
||||
25 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("Garnish1").Sprite,
|
||||
30 => ItemManager.Instance.LiquidDataSo.GetDataByIdx("Garnish2").Sprite,
|
||||
_ => liqueurImage.sprite
|
||||
};
|
||||
|
||||
StartCoroutine(StartUpgradePopupCoroutine(currentLevelData));
|
||||
}
|
||||
|
||||
// ReSharper disable Unity.PerformanceAnalysis
|
||||
private IEnumerator StartUpgradePopupCoroutine(LevelData currentLevelData)
|
||||
{
|
||||
int lv = TycoonManager.Instance.LevelDataSo.GetDataCount();
|
||||
|
||||
Open();
|
||||
float timer = 0f;
|
||||
|
||||
while (timer < 1.0f)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 0.5)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
|
||||
float t = timer / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
information.transform.localScale = Vector3.Lerp( new Vector3(0.0f,0.0f,0.0f), new Vector3(1.0f,1.0f,1.0f), easedT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 2.0)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 0.5)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
|
||||
float t = timer / 0.5f;
|
||||
float easedT = EaseEffect.BounceOut(t);
|
||||
|
||||
information.transform.localScale = Vector3.Lerp( new Vector3(1.0f,1.0f,1.0f), new Vector3(0.0f,0.0f,0.0f), easedT);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
_animationController.PlayAnimation("CardUpgrade_Reverse");
|
||||
|
||||
timer = 0f;
|
||||
|
||||
while (timer < 1.0f)
|
||||
{
|
||||
timer += Time.unscaledDeltaTime;
|
||||
yield return null;
|
||||
}
|
||||
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
Close();
|
||||
}
|
||||
|
||||
public void ShowUi() => _panel.SetActive(true);
|
||||
public void HideUi() => _panel.SetActive(false);
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 53 KiB |
@ -43,11 +43,11 @@ TextureImporter:
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteMode: 2
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 0
|
||||
alignment: 7
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePivot: {x: 0.5, y: 0}
|
||||
spritePixelsToUnits: 512
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
@ -121,7 +121,29 @@ TextureImporter:
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
sprites:
|
||||
- serializedVersion: 2
|
||||
name: Carpet_0
|
||||
rect:
|
||||
serializedVersion: 2
|
||||
x: 4
|
||||
y: 158
|
||||
width: 502
|
||||
height: 183
|
||||
alignment: 0
|
||||
pivot: {x: 0, y: 0}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
customData:
|
||||
outline: []
|
||||
physicsShape: []
|
||||
tessellationDetail: 0
|
||||
bones: []
|
||||
spriteID: b78b2186644c8f44dbd0c19158b88d29
|
||||
internalID: 939234109
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
@ -135,7 +157,8 @@ TextureImporter:
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
nameFileIdTable:
|
||||
Carpet_0: 939234109
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 113 KiB |
Binary file not shown.
Before Width: | Height: | Size: 130 KiB |
BIN
Assets/03.Images/Ui/Tycoon/ManualBookButton.png
Normal file
BIN
Assets/03.Images/Ui/Tycoon/ManualBookButton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 318 KiB |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eec1e6905d04a6d4289f29eecbaa66d0
|
||||
guid: f3407ac04bcf8ca4a930127e65f49aba
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
@ -46,9 +46,9 @@ TextureImporter:
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 7
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 512
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
152
Assets/04.Materials/Outline/TrashCanOutlineUnlit.mat
Normal file
152
Assets/04.Materials/Outline/TrashCanOutlineUnlit.mat
Normal file
@ -0,0 +1,152 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: TrashCanOutlineUnlit
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 8daa1b13f763ae74f8630c7a631dd327, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 3d9690c99ee20dd4b8e26a010b499f80, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _CastShadows: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _FadeDistance: 150
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _ISCORNER: 0
|
||||
- _IsCorner: 0
|
||||
- _Metallic: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _OutlineMipLevel: 0
|
||||
- _OutlineOpaqueAlpha: 1
|
||||
- _OutlineReferenceTexWidth: 1024
|
||||
- _OutlineSmoothness: 1
|
||||
- _OutlineWidth: 3
|
||||
- _Parallax: 0.005
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _StencilComp: 8
|
||||
- _StencilRef: 1
|
||||
- _Surface: 0
|
||||
- _Thickness: 0.01
|
||||
- _ThresholdEnd: 0.25
|
||||
- _Use8Neighbourhood: 1
|
||||
- _UseScreenSpaceOutlineWidth: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _OutlineColor: {r: 1, g: 1, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &6323663459513743005
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 9
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6fa6e2e3b077f3443977d9130d66679b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -242,7 +242,6 @@ GameObject:
|
||||
- component: {fileID: 2798544366308408093}
|
||||
- component: {fileID: 6925146187533612706}
|
||||
- component: {fileID: 2935942385829016914}
|
||||
- component: {fileID: 6054159730444663926}
|
||||
- component: {fileID: 1063431021331126030}
|
||||
- component: {fileID: 6662554121718997272}
|
||||
- component: {fileID: 3359549505901716120}
|
||||
@ -324,276 +323,6 @@ CapsuleCollider:
|
||||
m_Height: 0.5
|
||||
m_Direction: 1
|
||||
m_Center: {x: 0, y: 0.25, z: 0}
|
||||
--- !u!114 &6054159730444663926
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2768568390039878737}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||
m_NotificationBehavior: 2
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_DeviceRegainedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ControlsChangedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionEvents:
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnMove
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 52dbe09f-4e34-4a14-a772-54f5d5d97787
|
||||
m_ActionName: 'Tycoon/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnInteraction
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 31e27536-38f7-4c48-ad94-663c23a8c2a8
|
||||
m_ActionName: 'Tycoon/Interaction[/Keyboard/e]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 58dbe258-7d9d-4d57-a59d-9165662f3d4b
|
||||
m_ActionName: 'Combat/Move[/Keyboard/w,/Keyboard/s,/Keyboard/a,/Keyboard/d]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 472e0ca2-cdfb-496f-bf8c-c25a4b0a6c8b
|
||||
m_ActionName: 'Combat/Attack[/Mouse/leftButton,/Keyboard/k]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: aaf44bb4-bce6-4abe-bb2a-ec5f15b43c8f
|
||||
m_ActionName: 'Combat/Dash[/Keyboard/space]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: ebdb638c-8057-4b32-8cb5-b4e5039b4969
|
||||
m_ActionName: 'Combat/ActivateMainSkill[/Mouse/rightButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: d7467711-57a8-4a31-a2ba-d14040cff3e7
|
||||
m_ActionName: 'Combat/OpenMenu[/Keyboard/escape]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 65cfde9b-38e6-4d35-b2a6-f48dbbeeead6
|
||||
m_ActionName: 'Combat/OpenItemInventory[/Keyboard/i]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 494568c8-7762-428e-8e8c-1920adfcc29a
|
||||
m_ActionName: 'CombatUi/Cancel[/Keyboard/escape]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 5df8fd65-01b8-4cfe-b110-5ff2cfdd437f
|
||||
m_ActionName: 'CombatUi/InteractionUi[/Keyboard/e]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 04886026-3576-4662-8c73-dab606c598ed
|
||||
m_ActionName: 'CombatUi/CloseItemInventory[/Keyboard/i]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnDevelopKey01
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: a0f02877-2c29-4c32-8898-f0074336c625
|
||||
m_ActionName: 'Tycoon/RestaurantUpgrade[/Keyboard/b]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnCancel
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 43781cf6-335d-402e-957c-7a27f3e627b6
|
||||
m_ActionName: 'TycoonUi/Cancel[/Keyboard/escape]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 70079543-a5e9-4137-85af-1ad206da8794
|
||||
m_ActionName: 'CombatTitle/MoveScene[/Keyboard/anyKey,/Mouse/leftButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 66824a18-0819-44a4-92c2-6395511e3d0d
|
||||
m_ActionName: 'UI/Navigate[/Keyboard/w,/Keyboard/upArrow,/Keyboard/s,/Keyboard/downArrow,/Keyboard/a,/Keyboard/leftArrow,/Keyboard/d,/Keyboard/rightArrow]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 93ed1c14-2900-4d30-91fb-a9f2353a9540
|
||||
m_ActionName: 'UI/Submit[/Keyboard/enter]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 3c7c74ba-0c86-4e21-ab91-2b1e674cf243
|
||||
m_ActionName: 'UI/Cancel[/Keyboard/escape]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 52083aa7-62f5-41d7-b37e-4db100ef2cda
|
||||
m_ActionName: 'UI/Point[/Mouse/position]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 42e6067b-0d00-4787-92d8-ddf60510de83
|
||||
m_ActionName: 'UI/Click[/Mouse/leftButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 30ef3965-cc51-452e-8df9-6a3567a53f4d
|
||||
m_ActionName: 'UI/ScrollWheel[/Mouse/scroll]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: b99f7e4b-30f0-4936-9e55-c383951d6f58
|
||||
m_ActionName: 'UI/MiddleClick[/Mouse/middleButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 4849bf4c-7b3b-43c4-8bbf-7178f536fb94
|
||||
m_ActionName: 'UI/RightClick[/Mouse/rightButton]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 49ed4722-bfe5-47b7-b724-008d9ca57edc
|
||||
m_ActionName: UI/TrackedDevicePosition
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 7f4f45c6-67b1-47bf-9a74-fea6f6b5fde1
|
||||
m_ActionName: UI/TrackedDeviceOrientation
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 2959a0ad-c73e-43b1-b98e-9917868b2a9a
|
||||
m_ActionName: 'Combat/Interaction[/Keyboard/f]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: a5d9ffcb-5c4f-4c6d-8335-9060bbea120a
|
||||
m_ActionName: 'Combat/OpenDevelopMenu[/Keyboard/f1]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 2f6cc7b3-e806-4b78-b11f-e6ed70bb67ac
|
||||
m_ActionName: 'Combat/ForceKillBoss[/Keyboard/f2]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionId: 0dbf1015-499a-43fe-b252-11c232b9a1ae
|
||||
m_ActionName: 'Combat/HealthPointMax[/Keyboard/f3]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnManual
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: ef02b0fe-8d61-4bdb-bd1e-543575b67aa0
|
||||
m_ActionName: 'Tycoon/Manual[/Keyboard/q]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnCancelManual
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: c30fb3f3-d280-4b30-af6c-15f7483fd658
|
||||
m_ActionName: 'TycoonUi/CancelManual[/Keyboard/q]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnDash
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 34c447c4-c69f-4348-89ba-e1f8585deb95
|
||||
m_ActionName: 'Tycoon/Dash[/Keyboard/space]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnZoomOut
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: 58ceafb0-6793-42e9-8c85-5527c3b43147
|
||||
m_ActionName: 'Tycoon/ZoomOut[/Mouse/scroll/down]'
|
||||
- m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 1674052485383758547}
|
||||
m_TargetAssemblyTypeName: BlueWater.Players.Tycoons.TycoonInput, Assembly-CSharp
|
||||
m_MethodName: OnZoomIn
|
||||
m_Mode: 0
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
m_ActionId: c8d0a703-f98c-41e5-9e7a-8639bf731c02
|
||||
m_ActionName: 'Tycoon/ZoomIn[/Mouse/scroll/up]'
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: Tycoon
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
--- !u!114 &1063431021331126030
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -608,7 +337,7 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
<Rigidbody>k__BackingField: {fileID: 6925146187533612706}
|
||||
<CharacterCollider>k__BackingField: {fileID: 2935942385829016914}
|
||||
<PlayerInput>k__BackingField: {fileID: 6054159730444663926}
|
||||
<PlayerInput>k__BackingField: {fileID: 0}
|
||||
<VisualLook>k__BackingField: {fileID: 6509241874729291456}
|
||||
<SkeletonAnimation>k__BackingField: {fileID: 7125556968546628472}
|
||||
<InteractionCanvas>k__BackingField: {fileID: 56698895639349130}
|
||||
@ -668,7 +397,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 2bc02c60fe9bf724885e9f5713f900ee, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_playerInput: {fileID: 6054159730444663926}
|
||||
_playerInput: {fileID: 0}
|
||||
--- !u!114 &4836489897218844789
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -10,6 +10,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 3904427873695393554}
|
||||
- component: {fileID: 2321255064315590360}
|
||||
- component: {fileID: 1045125956338313060}
|
||||
m_Layer: 0
|
||||
m_Name: PlayerInputKeyManager
|
||||
m_TagString: Untagged
|
||||
@ -45,4 +46,35 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
_persistent: 1
|
||||
_currentPlayerInput: {fileID: 0}
|
||||
_currentPlayerInput: {fileID: 1045125956338313060}
|
||||
_initializedActionMap: 0
|
||||
--- !u!114 &1045125956338313060
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8387747698985620347}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 62899f850307741f2a39c98a8b639597, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Actions: {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||
m_NotificationBehavior: 0
|
||||
m_UIInputModule: {fileID: 0}
|
||||
m_DeviceLostEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_DeviceRegainedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ControlsChangedEvent:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_ActionEvents: []
|
||||
m_NeverAutoSwitchControlSchemes: 0
|
||||
m_DefaultControlScheme:
|
||||
m_DefaultActionMap: UI
|
||||
m_SplitScreenIndex: -1
|
||||
m_Camera: {fileID: 0}
|
||||
|
@ -459,13 +459,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1257168652086081515}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 1.5, y: 0, z: -9}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 3, y: -0, z: -9.12}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &54737336156565261
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -510,12 +510,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -2087,13 +2087,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5201607581264057475}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -4.5, y: 0, z: -10.5}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -3, y: 0, z: -10.62}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &7868020324968386277
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2138,12 +2138,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -2295,13 +2295,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5474017274063444601}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 4.5, y: 0, z: -10.5}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 6, y: 0, z: -10.62}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &1557273429337980854
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -2346,12 +2346,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -3233,13 +3233,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6580883797889437422}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -6.5, y: 0, z: -9}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -5, y: 0, z: -9.12}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &795284508034462010
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3284,12 +3284,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -3428,13 +3428,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6687653557957919170}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 6.3, y: 0, z: -9}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 7.8, y: 0, z: -9.12}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &3875951963651922220
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -3479,12 +3479,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -4649,13 +4649,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7832313260715379830}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -0.5, y: 0, z: -10.5}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: 1, y: 0, z: -10.62}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &3821588728016129624
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4700,12 +4700,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -5711,13 +5711,13 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 9204693660265299527}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.5, y: 0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: -2.5, y: 0, z: -9}
|
||||
m_LocalScale: {x: 3, y: 3, z: 1}
|
||||
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||
m_LocalPosition: {x: -1, y: 0, z: -9.12}
|
||||
m_LocalScale: {x: 3, y: 4, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8806487701918433865}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 90, z: 0}
|
||||
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||
--- !u!212 &6650133644870983064
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -5762,12 +5762,12 @@ SpriteRenderer:
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Sprite: {fileID: 939234109, guid: 6fbe25d112354c0499f972a2816e1998, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_Size: {x: 0.98046875, y: 0.35742188}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
@ -8899,6 +8899,10 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2469795103172270817, guid: f0b7d93a3fd80be429e7fdac2a2cce39, type: 3}
|
||||
propertyPath: m_Mesh
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5897095096647521783, guid: f0b7d93a3fd80be429e7fdac2a2cce39, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: TrashCan (1)
|
||||
@ -10017,6 +10021,10 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2469795103172270817, guid: f0b7d93a3fd80be429e7fdac2a2cce39, type: 3}
|
||||
propertyPath: m_Mesh
|
||||
value:
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5897095096647521783, guid: f0b7d93a3fd80be429e7fdac2a2cce39, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: TrashCan
|
||||
|
@ -144,17 +144,132 @@ PrefabInstance:
|
||||
propertyPath: m_WasSpriteAssigned
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_RemovedComponents:
|
||||
- {fileID: 3580758810857167321, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
m_RemovedGameObjects:
|
||||
- {fileID: 8884531212319162473, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 3764902268943045601, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: -8278684978296943735}
|
||||
- targetCorrespondingSourceObject: {fileID: 3764902268943045601, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 8118547606801377584}
|
||||
- targetCorrespondingSourceObject: {fileID: 3764902268943045601, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 5411673223561907087}
|
||||
- targetCorrespondingSourceObject: {fileID: 7835622629792856689, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1218107485074680230}
|
||||
- targetCorrespondingSourceObject: {fileID: 7835622629792856689, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 3467519215335342689}
|
||||
- targetCorrespondingSourceObject: {fileID: 7835622629792856689, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 2469795103172270817}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
--- !u!1 &672328621937310823 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 7835622629792856689, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
m_PrefabInstance: {fileID: 7343451337687172630}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!23 &1218107485074680230
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 672328621937310823}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: ec4cb15ba7bfd2947a45f723b8d06f65, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!114 &3467519215335342689
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 672328621937310823}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d247ba06193faa74d9335f5481b2b56c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skeletonDataAsset: {fileID: 11400000, guid: 509d10beebe0f7e48957b5e92193a753, type: 2}
|
||||
initialSkinName:
|
||||
fixPrefabOverrideViaMeshFilter: 2
|
||||
initialFlipX: 0
|
||||
initialFlipY: 0
|
||||
updateWhenInvisible: 3
|
||||
separatorSlotNames: []
|
||||
zSpacing: 0
|
||||
useClipping: 1
|
||||
immutableTriangles: 0
|
||||
pmaVertexColors: 1
|
||||
clearStateOnDisable: 0
|
||||
tintBlack: 0
|
||||
singleSubmesh: 0
|
||||
fixDrawOrder: 0
|
||||
addNormals: 0
|
||||
calculateTangents: 0
|
||||
maskInteraction: 0
|
||||
maskMaterials:
|
||||
materialsMaskDisabled: []
|
||||
materialsInsideMask: []
|
||||
materialsOutsideMask: []
|
||||
disableRenderingOnOverride: 1
|
||||
physicsPositionInheritanceFactor: {x: 1, y: 1}
|
||||
physicsRotationInheritanceFactor: 1
|
||||
physicsMovementRelativeTo: {fileID: 0}
|
||||
updateTiming: 1
|
||||
unscaledTime: 0
|
||||
_animationName: TrashcanCloseStop
|
||||
loop: 0
|
||||
timeScale: 1
|
||||
--- !u!33 &2469795103172270817
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 672328621937310823}
|
||||
m_Mesh: {fileID: 0}
|
||||
--- !u!1 &5897095096647521783 stripped
|
||||
GameObject:
|
||||
m_CorrespondingSourceObject: {fileID: 3764902268943045601, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
@ -173,17 +288,38 @@ MonoBehaviour:
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<CenterTransform>k__BackingField: {fileID: 5927803667513949971}
|
||||
<VisualLook>k__BackingField: {fileID: 6077686033771388879}
|
||||
<VisualLook>k__BackingField: {fileID: 0}
|
||||
<InteractionCanvas>k__BackingField: {fileID: 6533109861150454071}
|
||||
<OutlineMaterial>k__BackingField: {fileID: 2100000, guid: 9db92b3ac1f276e42ae7d7bcfbbca549, type: 2}
|
||||
<OutlineMaterial>k__BackingField: {fileID: 0}
|
||||
<LocalizeStringEvent>k__BackingField: {fileID: 5411673223561907087}
|
||||
<EnableInteraction>k__BackingField: 1
|
||||
<InteractionRadius>k__BackingField: 0.7
|
||||
<InteractionMessage>k__BackingField:
|
||||
IsOpened: 0
|
||||
_spineController: {fileID: 8118547606801377584}
|
||||
_playerHoldingTime: 1
|
||||
_canRandomChange: 0
|
||||
_randomBoxSprite: {fileID: 21300000, guid: 3484bcfbb75f8d54bb1f209c301f86ee, type: 3}
|
||||
--- !u!114 &8118547606801377584
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5897095096647521783}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: be4f815e5e3c0d5459559bdc0b8bbbfb, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<SkeletonAnimation>k__BackingField: {fileID: 3467519215335342689}
|
||||
_originalMaterial: {fileID: 2100000, guid: ec4cb15ba7bfd2947a45f723b8d06f65, type: 2}
|
||||
_replacementMaterial: {fileID: 2100000, guid: 6fa6e2e3b077f3443977d9130d66679b, type: 2}
|
||||
_initialSkinName: default
|
||||
_isRandomSkin: 0
|
||||
_isRandomRange: 0
|
||||
_randomRange: {x: 0, y: 0}
|
||||
_randomStrings: []
|
||||
--- !u!114 &5411673223561907087
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -217,11 +353,6 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 4011269187381704965, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
m_PrefabInstance: {fileID: 7343451337687172630}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!212 &6077686033771388879 stripped
|
||||
SpriteRenderer:
|
||||
m_CorrespondingSourceObject: {fileID: 3580758810857167321, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
m_PrefabInstance: {fileID: 7343451337687172630}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &6533109861150454071 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 4558604739080582945, guid: 3f9f846a7f237924e97c9acf370d991d, type: 3}
|
||||
|
@ -12,7 +12,7 @@ GameObject:
|
||||
- component: {fileID: 144498693429315535}
|
||||
- component: {fileID: 7359522310736043695}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_Name: CardImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -32,11 +32,11 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2842611899938369659}
|
||||
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_AnchoredPosition: {x: 0, y: 120}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -80}
|
||||
m_SizeDelta: {x: 380, y: 380}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &144498693429315535
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -75,6 +75,142 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &422035898130258741
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3859141191891866496}
|
||||
- component: {fileID: 8590037841327968711}
|
||||
- component: {fileID: 6714720895858370018}
|
||||
m_Layer: 5
|
||||
m_Name: PriceText
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3859141191891866496
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 422035898130258741}
|
||||
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: 6504440028018360999}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 110, y: -50}
|
||||
m_SizeDelta: {x: 85.48, y: 100}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &8590037841327968711
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 422035898130258741}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6714720895858370018
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 422035898130258741}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 100
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 0e5360dce269ccc42b822a424d66fbd4, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 50
|
||||
m_fontSizeBase: 50
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 36
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &1250835500097346222
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -85,7 +221,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 2842611899938369659}
|
||||
m_Layer: 5
|
||||
m_Name: CardCom
|
||||
m_Name: Panel
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -100,8 +236,8 @@ RectTransform:
|
||||
m_GameObject: {fileID: 1250835500097346222}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.95, y: 0.95, z: 0.95}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 4200239664524397730}
|
||||
- {fileID: 951644923240543435}
|
||||
@ -109,10 +245,10 @@ RectTransform:
|
||||
- {fileID: 7408726339065734494}
|
||||
m_Father: {fileID: 725714798138964366}
|
||||
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!1 &2155411910842643407
|
||||
GameObject:
|
||||
@ -146,10 +282,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2842611899938369659}
|
||||
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: 500, y: 800}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5097570944488985431
|
||||
CanvasRenderer:
|
||||
@ -221,11 +357,11 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2842611899938369659}
|
||||
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_AnchoredPosition: {x: 0, y: -250}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 30}
|
||||
m_SizeDelta: {x: 400, y: 240}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &3904437696116363940
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -254,7 +390,7 @@ MonoBehaviour:
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: 'hello '
|
||||
m_text: "\uCE74\uB4DC \uC124\uBA85"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: dabfdeb80b25d44b4ace56414d0eb4ad, type: 2}
|
||||
m_sharedMaterial: {fileID: 2100000, guid: 19a626476403a2f40b9d0512f80d61d9, type: 2}
|
||||
@ -325,6 +461,102 @@ MonoBehaviour:
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3272948643881793100
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6177536167443362169}
|
||||
- component: {fileID: 8990611720735539643}
|
||||
- component: {fileID: 5364373717513611383}
|
||||
- component: {fileID: 2759500739634548774}
|
||||
m_Layer: 5
|
||||
m_Name: GoldImage
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6177536167443362169
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3272948643881793100}
|
||||
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: 6504440028018360999}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -50}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &8990611720735539643
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3272948643881793100}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5364373717513611383
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3272948643881793100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 2880e34baca6ca04893136786677bf95, type: 2}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
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: 21300000, guid: bb299176ee03f63468d9bb59a8998669, type: 3}
|
||||
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!114 &2759500739634548774
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3272948643881793100}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: -1
|
||||
m_PreferredWidth: 100
|
||||
m_PreferredHeight: 100
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!1 &5785355462301107295
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -355,13 +587,14 @@ RectTransform:
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 2842611899938369659}
|
||||
- {fileID: 6504440028018360999}
|
||||
- {fileID: 2155908598707014642}
|
||||
m_Father: {fileID: 0}
|
||||
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_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_SizeDelta: {x: 500, y: 800}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &1311751278713342195
|
||||
MonoBehaviour:
|
||||
@ -375,6 +608,13 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 1e080f1606bf24d4cb31f55f7958812a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<RectTransform>k__BackingField: {fileID: 725714798138964366}
|
||||
<Panel>k__BackingField: {fileID: 2842611899938369659}
|
||||
<CardImage>k__BackingField: {fileID: 7359522310736043695}
|
||||
<BackObject>k__BackingField: {fileID: 6679847304593375419}
|
||||
<PriceUi>k__BackingField: {fileID: 6591927570521581973}
|
||||
<PriceText>k__BackingField: {fileID: 6714720895858370018}
|
||||
<CardArea>k__BackingField: {fileID: 2953333486680660764}
|
||||
_informationText: {fileID: 6023757579985556140}
|
||||
cardName:
|
||||
cardText:
|
||||
@ -382,6 +622,94 @@ MonoBehaviour:
|
||||
accelerationCard: 2
|
||||
maxRotationAngle: 15
|
||||
returnSpeed: 1
|
||||
--- !u!1 &6591927570521581973
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6504440028018360999}
|
||||
- component: {fileID: 6268387999823090855}
|
||||
- component: {fileID: 5924012489343003107}
|
||||
- component: {fileID: 5822149288548038844}
|
||||
m_Layer: 5
|
||||
m_Name: PriceUi
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &6504440028018360999
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6591927570521581973}
|
||||
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: 1
|
||||
m_Children:
|
||||
- {fileID: 6177536167443362169}
|
||||
- {fileID: 3859141191891866496}
|
||||
m_Father: {fileID: 725714798138964366}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: -100}
|
||||
m_SizeDelta: {x: 195.48001, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0}
|
||||
--- !u!222 &6268387999823090855
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6591927570521581973}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5924012489343003107
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6591927570521581973}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 0
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 0
|
||||
m_ChildAlignment: 0
|
||||
m_Spacing: 10
|
||||
m_ChildForceExpandWidth: 0
|
||||
m_ChildForceExpandHeight: 0
|
||||
m_ChildControlWidth: 1
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
m_ReverseArrangement: 0
|
||||
--- !u!114 &5822149288548038844
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6591927570521581973}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 2
|
||||
m_VerticalFit: 0
|
||||
--- !u!1 &6679847304593375419
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -414,10 +742,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2842611899938369659}
|
||||
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: 500, y: 800}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7947080285353656384
|
||||
CanvasRenderer:
|
||||
@ -470,7 +798,7 @@ GameObject:
|
||||
- component: {fileID: 553588331708226939}
|
||||
- component: {fileID: 2953333486680660764}
|
||||
m_Layer: 5
|
||||
m_Name: Area
|
||||
m_Name: CardArea
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -490,10 +818,10 @@ RectTransform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 725714798138964366}
|
||||
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: 500, y: 800}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3981473352066336261
|
||||
CanvasRenderer:
|
||||
|
@ -134,6 +134,7 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: b470f74ac4a54bb4fae06d22ecef1c0e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
<Image>k__BackingField: {fileID: 1754191685957469056}
|
||||
manual: {fileID: 0}
|
||||
--- !u!1 &4085502877294975030
|
||||
GameObject:
|
||||
|
8
Assets/08.Spines/Props/TrashCan.meta
Normal file
8
Assets/08.Spines/Props/TrashCan.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa1925e797474a54f962a1a2110f868c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
27
Assets/08.Spines/Props/TrashCan/Trashcan.atlas.txt
Normal file
27
Assets/08.Spines/Props/TrashCan/Trashcan.atlas.txt
Normal file
@ -0,0 +1,27 @@
|
||||
Trashcan.png
|
||||
size:2015,800
|
||||
filter:Linear,Linear
|
||||
01/Body
|
||||
bounds:1212,368,430,379
|
||||
rotate:90
|
||||
01/Body_White
|
||||
bounds:826,368,430,384
|
||||
rotate:90
|
||||
01/Eye
|
||||
bounds:2,14,270,155
|
||||
rotate:90
|
||||
01/White
|
||||
bounds:826,2,410,364
|
||||
01/쓰레기통
|
||||
bounds:1238,2,410,364
|
||||
01/쓰레기통02
|
||||
bounds:414,3,410,365
|
||||
01/쓰레기통03
|
||||
bounds:1650,14,410,363
|
||||
rotate:90
|
||||
01/쓰레기통04
|
||||
bounds:1593,426,410,372
|
||||
01/쓰레기통05
|
||||
bounds:414,370,410,428
|
||||
01/쓰레기통06
|
||||
bounds:2,286,410,512
|
7
Assets/08.Spines/Props/TrashCan/Trashcan.atlas.txt.meta
Normal file
7
Assets/08.Spines/Props/TrashCan/Trashcan.atlas.txt.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 676b4a86935660144aee5c4c18205979
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Assets/08.Spines/Props/TrashCan/Trashcan.png
Normal file
BIN
Assets/08.Spines/Props/TrashCan/Trashcan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 514 KiB |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 662bba5229c57344e89c377b65ed23b8
|
||||
guid: 3d9690c99ee20dd4b8e26a010b499f80
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
@ -37,24 +37,24 @@ TextureImporter:
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 7
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 512
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureType: 0
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
@ -72,53 +72,53 @@ TextureImporter:
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 4
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
- serializedVersion: 4
|
||||
buildTarget: WindowsStoreApps
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
textureCompression: 0
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 1
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
@ -126,7 +126,7 @@ TextureImporter:
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
BIN
Assets/08.Spines/Props/TrashCan/Trashcan.skel.bytes
Normal file
BIN
Assets/08.Spines/Props/TrashCan/Trashcan.skel.bytes
Normal file
Binary file not shown.
7
Assets/08.Spines/Props/TrashCan/Trashcan.skel.bytes.meta
Normal file
7
Assets/08.Spines/Props/TrashCan/Trashcan.skel.bytes.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 56f259f80a090e24a9a83cea3eadb530
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
19
Assets/08.Spines/Props/TrashCan/Trashcan_Atlas.asset
Normal file
19
Assets/08.Spines/Props/TrashCan/Trashcan_Atlas.asset
Normal file
@ -0,0 +1,19 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a6b194f808b1af6499c93410e504af42, type: 3}
|
||||
m_Name: Trashcan_Atlas
|
||||
m_EditorClassIdentifier:
|
||||
textureLoadingMode: 0
|
||||
onDemandTextureLoader: {fileID: 0}
|
||||
atlasFile: {fileID: 4900000, guid: 676b4a86935660144aee5c4c18205979, type: 3}
|
||||
materials:
|
||||
- {fileID: 2100000, guid: ec4cb15ba7bfd2947a45f723b8d06f65, type: 2}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 23ad53bbc3a0aea4a8fc9af13c64180e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
46
Assets/08.Spines/Props/TrashCan/Trashcan_Material.mat
Normal file
46
Assets/08.Spines/Props/TrashCan/Trashcan_Material.mat
Normal file
@ -0,0 +1,46 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Trashcan_Material
|
||||
m_Shader: {fileID: 4800000, guid: b77e51f117177954ea863bdb422344fb, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _STRAIGHT_ALPHA_INPUT
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 2800000, guid: 3d9690c99ee20dd4b8e26a010b499f80, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Cutoff: 0.1
|
||||
- _DoubleSidedLighting: 0
|
||||
- _LightAffectsAdditive: 0
|
||||
- _ReceiveShadows: 0
|
||||
- _StencilComp: 8
|
||||
- _StencilRef: 1
|
||||
- _StraightAlphaInput: 1
|
||||
- _TintBlack: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Black: {r: 0, g: 0, b: 0, a: 0}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ec4cb15ba7bfd2947a45f723b8d06f65
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
31
Assets/08.Spines/Props/TrashCan/Trashcan_SkeletonData.asset
Normal file
31
Assets/08.Spines/Props/TrashCan/Trashcan_SkeletonData.asset
Normal file
@ -0,0 +1,31 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1b3b4b945939a54ea0b23d3396115fb, type: 3}
|
||||
m_Name: Trashcan_SkeletonData
|
||||
m_EditorClassIdentifier:
|
||||
atlasAssets:
|
||||
- {fileID: 11400000, guid: 23ad53bbc3a0aea4a8fc9af13c64180e, type: 2}
|
||||
scale: 0.001
|
||||
skeletonJSON: {fileID: 4900000, guid: 56f259f80a090e24a9a83cea3eadb530, type: 3}
|
||||
isUpgradingBlendModeMaterials: 0
|
||||
blendModeMaterials:
|
||||
requiresBlendModeMaterials: 0
|
||||
applyAdditiveMaterial: 1
|
||||
additiveMaterials: []
|
||||
multiplyMaterials: []
|
||||
screenMaterials: []
|
||||
skeletonDataModifiers: []
|
||||
fromAnimation: []
|
||||
toAnimation: []
|
||||
duration: []
|
||||
defaultMix: 0.2
|
||||
controller: {fileID: 0}
|
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 509d10beebe0f7e48957b5e92193a753
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -387,6 +387,14 @@ MonoBehaviour:
|
||||
m_Key: Failure
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2633210348711936
|
||||
m_Key: PurchaseCompleted
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2659807046938624
|
||||
m_Key: StartShopWarningMessage
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
m_KeyGenerator:
|
||||
|
@ -394,6 +394,14 @@ MonoBehaviour:
|
||||
m_Localized: Failure
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2633210348711936
|
||||
m_Localized: Purchase completed
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2659807046938624
|
||||
m_Localized: Unused gold will be forfeited.
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds: []
|
||||
|
@ -407,6 +407,15 @@ MonoBehaviour:
|
||||
m_Localized: "\uC2E4\uD328"
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2633210348711936
|
||||
m_Localized: "\uAD6C\uB9E4 \uC644\uB8CC"
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
- m_Id: 2659807046938624
|
||||
m_Localized: "\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC740 \uACE8\uB4DC\uB294 \uBAA8\uB450
|
||||
\uC18C\uBA78\uD569\uB2C8\uB2E4."
|
||||
m_Metadata:
|
||||
m_Items: []
|
||||
references:
|
||||
version: 2
|
||||
RefIds: []
|
||||
|
@ -7,10 +7,10 @@ EditorBuildSettings:
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/01.Scenes/00.TycoonTitle.unity
|
||||
guid: 6acccfdd4694531468dac7f6a77c3c1e
|
||||
guid: 2997aa81c0ec30a4282900ffaacaba5c
|
||||
- enabled: 1
|
||||
path: Assets/01.Scenes/01.Tycoon.unity
|
||||
guid: b2b07a151b44ee849a1d12d9dc5bc87a
|
||||
guid: 3ea738b777ba3f44d933ba8ef7ef1b00
|
||||
m_configObjects:
|
||||
com.unity.addressableassets: {fileID: 11400000, guid: f03eb8afe743ba2408eba2f226d4915f, type: 2}
|
||||
com.unity.input.settings: {fileID: 11400000, guid: c779df660591ce64c983341df1e4c85c, type: 2}
|
||||
|
@ -140,7 +140,7 @@ PlayerSettings:
|
||||
loadStoreDebugModeEnabled: 0
|
||||
visionOSBundleVersion: 1.0
|
||||
tvOSBundleVersion: 1.0
|
||||
bundleVersion: 0.3.2.8
|
||||
bundleVersion: 0.3.4.1
|
||||
preloadedAssets:
|
||||
- {fileID: -944628639613478452, guid: 4ed6540e2f7ce234888adf8deff1f241, type: 3}
|
||||
metroInputSource: 0
|
||||
|
Loading…
Reference in New Issue
Block a user