Merge branch 'lmg' of http://gitea.capers.co.kr:3000/capers/CapersRepo into ntg
This commit is contained in:
commit
1672cf03b6
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b833bcae75f3f004684676cf4de35160
|
||||
guid: 61138f3cb5a646049b07b230edd40727
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
@ -20,7 +21,7 @@ using UnityEngine.UI;
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonCardArea : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler,
|
||||
IPointerMoveHandler
|
||||
IPointerMoveHandler , ISelectHandler , IDeselectHandler
|
||||
{
|
||||
private Coroutine _currentRotationCoroutine;
|
||||
|
||||
@ -42,7 +43,16 @@ namespace BlueWater.Uis
|
||||
private bool _enable = false;
|
||||
|
||||
private Action<TycoonCard> _onSelectAction;
|
||||
public void OnSelect(BaseEventData eventData)
|
||||
{
|
||||
OnPointerEnter(null);
|
||||
}
|
||||
|
||||
public void OnDeselect(BaseEventData eventData)
|
||||
{
|
||||
OnPointerExit(null);
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_tycoonCard = transform.parent.GetComponent<TycoonCard>();
|
||||
@ -67,10 +77,11 @@ namespace BlueWater.Uis
|
||||
{
|
||||
_onSelectAction = action;
|
||||
}
|
||||
|
||||
|
||||
// 마우스가 이미지 위에 올라갔을 때 호출
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
|
||||
if (_endRotationCoroutine != null)
|
||||
{
|
||||
StopCoroutine(_endRotationCoroutine);
|
||||
@ -120,6 +131,11 @@ namespace BlueWater.Uis
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectCard()
|
||||
{
|
||||
OnPointerClick(null);
|
||||
}
|
||||
|
||||
// 마우스 클릭 시 호출
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
|
@ -84,11 +84,13 @@ namespace BlueWater.Uis
|
||||
public override void EnableInput()
|
||||
{
|
||||
_interactionEAction.performed += OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().EnableAutoNavigate();
|
||||
}
|
||||
|
||||
public override void DisableInput()
|
||||
{
|
||||
_interactionEAction.performed -= OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().DisableAutoNavigate();
|
||||
}
|
||||
|
||||
|
||||
@ -146,6 +148,8 @@ namespace BlueWater.Uis
|
||||
|
||||
_tycoonCardController.SelectCard(element);
|
||||
}
|
||||
|
||||
this.GetComponent<UiEventsController>().SetSelectObject(_tycoonCards[2].CardArea.gameObject);
|
||||
}
|
||||
|
||||
private void OpenCard(TycoonCard tycoonCard)
|
||||
|
@ -1,15 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using BlueWater.Audios;
|
||||
using BlueWater.Tycoons;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
{
|
||||
public class TycoonSelectCard : PopupUi
|
||||
public class TycoonSelectCard : PopupUi
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _panel;
|
||||
@ -26,10 +29,14 @@ namespace BlueWater.Uis
|
||||
private TycoonManager _tycoonManager;
|
||||
private TycoonCardController _tycoonCardController;
|
||||
|
||||
private InputAction _interactionEAction;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
|
||||
_interactionEAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, TycoonUiActions.InteractionE);
|
||||
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonCardController = _tycoonManager.TycoonCardController;
|
||||
|
||||
@ -39,6 +46,11 @@ namespace BlueWater.Uis
|
||||
private void OnDestroy()
|
||||
{
|
||||
EventManager.OnOpenedNormalRewardBox -= CreateCard;
|
||||
|
||||
if (_interactionEAction != null)
|
||||
{
|
||||
_interactionEAction.performed -= OnInteractionE;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
@ -60,6 +72,28 @@ namespace BlueWater.Uis
|
||||
VisualFeedbackManager.Instance.ResetTimeScale();
|
||||
}
|
||||
|
||||
|
||||
public override void EnableInput()
|
||||
{
|
||||
_interactionEAction.performed += OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().EnableAutoNavigate();
|
||||
}
|
||||
|
||||
public override void DisableInput()
|
||||
{
|
||||
_interactionEAction.performed -= OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().DisableAutoNavigate();
|
||||
}
|
||||
|
||||
public void OnInteractionE(InputAction.CallbackContext context)
|
||||
{
|
||||
var current = EventSystem.current.currentSelectedGameObject;
|
||||
if (!current) return;
|
||||
|
||||
var currenButton = current.GetComponent<Button>();
|
||||
currenButton.onClick.Invoke();
|
||||
}
|
||||
|
||||
[Button("카드 생성하기(레벨업)")]
|
||||
private void CreateCard()
|
||||
{
|
||||
@ -104,8 +138,10 @@ namespace BlueWater.Uis
|
||||
|
||||
StartCoroutine(FadeInPanel());
|
||||
}
|
||||
|
||||
this.GetComponent<UiEventsController>().SetSelectObject(_tycoonCards[0].CardArea.gameObject);
|
||||
}
|
||||
|
||||
|
||||
private IEnumerator FadeInPanel()
|
||||
{
|
||||
float time = 0.0f; // 타이머 초기화
|
||||
@ -122,10 +158,13 @@ namespace BlueWater.Uis
|
||||
|
||||
yield return null;
|
||||
}
|
||||
|
||||
// _tycoonCards[1].CardArea.OnSelect(null);
|
||||
}
|
||||
|
||||
private void SelectedCard(TycoonCard currentTycoonCard)
|
||||
{
|
||||
DisableInput();
|
||||
_tycoonCardController.SelectCard(currentTycoonCard);
|
||||
currentTycoonCard.CardArea.SuccessClick();
|
||||
StartCoroutine(SelectedAnimation(currentTycoonCard));
|
||||
@ -171,7 +210,7 @@ namespace BlueWater.Uis
|
||||
|
||||
float time = 0.0f; // 타이머 초기화
|
||||
|
||||
while (time < 1.0f)
|
||||
while (time < 0.5f)
|
||||
{
|
||||
time += Time.unscaledDeltaTime; // 시간 업데이트
|
||||
|
||||
@ -189,12 +228,12 @@ namespace BlueWater.Uis
|
||||
time = 0.0f; // 타이머 초기화
|
||||
startScale03 = rect03.localScale; // 시작 위치
|
||||
|
||||
while (time < 1.0f)
|
||||
while (time < 0.5f)
|
||||
{
|
||||
time += Time.unscaledDeltaTime; // 시간 업데이트
|
||||
|
||||
float _Time = time / 0.5f;
|
||||
float _FadeTime = time / 1.0f;
|
||||
float _Time = time / 0.25f;
|
||||
float _FadeTime = time / 0.5f;
|
||||
|
||||
float easedTIn = EaseEffect.ExpoIn(_Time);
|
||||
rect03.localScale = Vector3.Lerp(startScale03, new Vector3(0.0f, 0.0f, 0.0f), easedTIn);
|
||||
@ -208,5 +247,6 @@ namespace BlueWater.Uis
|
||||
_tycoonCardController.DestroyCardList(_tycoonCards);
|
||||
Close();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ using UnityEngine;
|
||||
using Sirenix.OdinInspector;
|
||||
using TMPro;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BlueWater.Uis
|
||||
@ -64,6 +65,8 @@ namespace BlueWater.Uis
|
||||
private Sequence _failedPurchaseSequence;
|
||||
private Coroutine _changeGoldInstance;
|
||||
|
||||
private InputAction _interactionEAction;
|
||||
|
||||
private Color _originalColor;
|
||||
|
||||
private void OnValidate()
|
||||
@ -78,6 +81,8 @@ namespace BlueWater.Uis
|
||||
{
|
||||
_panel.SetActive(false);
|
||||
|
||||
_interactionEAction = PlayerInputKeyManager.Instance.GetAction(InputActionMaps.TycoonUi, TycoonUiActions.InteractionE);
|
||||
|
||||
_tycoonManager = TycoonManager.Instance;
|
||||
_tycoonCardController = _tycoonManager.TycoonCardController;
|
||||
_endGold = ES3.Load(SaveData.EndGold, 0);
|
||||
@ -116,6 +121,7 @@ namespace BlueWater.Uis
|
||||
private void OnDestroy()
|
||||
{
|
||||
_failedPurchaseSequence.Kill();
|
||||
_interactionEAction = null;
|
||||
}
|
||||
|
||||
public override void Open()
|
||||
@ -143,6 +149,19 @@ namespace BlueWater.Uis
|
||||
EventManager.InvokeTycoonGameStarted();
|
||||
}
|
||||
|
||||
public override void EnableInput()
|
||||
{
|
||||
_interactionEAction.performed += OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().EnableAutoNavigate();
|
||||
}
|
||||
|
||||
public override void DisableInput()
|
||||
{
|
||||
_interactionEAction.performed -= OnInteractionE;
|
||||
this.GetComponent<UiEventsController>().DisableAutoNavigate();
|
||||
}
|
||||
|
||||
|
||||
[Button("상점 열기")]
|
||||
private void CreateCard()
|
||||
{
|
||||
@ -182,6 +201,8 @@ namespace BlueWater.Uis
|
||||
element.SetPrice(cardShopData.Price);
|
||||
element.Rotation_Start();
|
||||
}
|
||||
|
||||
this.GetComponent<UiEventsController>().SetSelectObject(_tycoonCards[0].CardArea.gameObject);
|
||||
}
|
||||
|
||||
private void SelectedCard(TycoonCard currentTycoonCard)
|
||||
@ -219,5 +240,16 @@ namespace BlueWater.Uis
|
||||
}
|
||||
_endGoldText.text = targetGold.ToString("N0");
|
||||
}
|
||||
|
||||
|
||||
public void OnInteractionE(InputAction.CallbackContext context)
|
||||
{
|
||||
var current = EventSystem.current.currentSelectedGameObject;
|
||||
if (!current) return;
|
||||
|
||||
var currenButton = current.GetComponent<Button>();
|
||||
currenButton?.onClick?.Invoke();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -987,7 +987,7 @@ MonoBehaviour:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2953333486680660764}
|
||||
m_TargetAssemblyTypeName: BlueWater.Uis.TycoonCardArea, Assembly-CSharp
|
||||
m_MethodName: OnClick
|
||||
m_MethodName: SelectCard
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
@ -1,66 +1,65 @@
|
||||
CardUpgradeSpine.png
|
||||
size:2034,1903
|
||||
size:1931,1818
|
||||
filter:Linear,Linear
|
||||
1
|
||||
bounds:2,1133,287,353
|
||||
bounds:2,1047,287,360
|
||||
rotate:90
|
||||
10
|
||||
bounds:433,1675,485,226
|
||||
bounds:437,1592,487,224
|
||||
11
|
||||
bounds:846,1379,500,280
|
||||
bounds:842,1295,511,281
|
||||
12
|
||||
bounds:1525,665,372,359
|
||||
bounds:2,357,370,358
|
||||
13
|
||||
bounds:2,1686,215,429
|
||||
bounds:2,1601,215,433
|
||||
rotate:90
|
||||
14
|
||||
bounds:1448,1648,253,372
|
||||
bounds:1453,1563,253,370
|
||||
rotate:90
|
||||
15
|
||||
bounds:1724,1026,335,308
|
||||
rotate:90
|
||||
bounds:360,717,335,308
|
||||
16
|
||||
bounds:2,1422,370,262
|
||||
bounds:2,1336,368,263
|
||||
17
|
||||
bounds:2,799,356,306
|
||||
bounds:2,740,356,305
|
||||
18
|
||||
bounds:775,760,331,393
|
||||
bounds:1113,650,329,391
|
||||
rotate:90
|
||||
19
|
||||
bounds:812,1093,284,490
|
||||
bounds:817,1008,285,488
|
||||
rotate:90
|
||||
2
|
||||
bounds:360,785,320,413
|
||||
bounds:697,688,318,414
|
||||
rotate:90
|
||||
20
|
||||
bounds:477,90,642,712
|
||||
bounds:849,2,642,710
|
||||
rotate:90
|
||||
21
|
||||
bounds:1191,2,701,661
|
||||
3
|
||||
bounds:1304,1068,293,418
|
||||
bounds:1307,981,297,438
|
||||
rotate:90
|
||||
4
|
||||
bounds:374,1396,277,470
|
||||
bounds:372,1315,275,468
|
||||
rotate:90
|
||||
5
|
||||
bounds:1170,734,332,353
|
||||
bounds:1506,646,333,352
|
||||
rotate:90
|
||||
6
|
||||
bounds:1348,1363,573,283
|
||||
bounds:1355,1280,574,281
|
||||
7
|
||||
bounds:2,314,473,469
|
||||
bounds:374,217,473,469
|
||||
8
|
||||
bounds:357,1107,453,287
|
||||
bounds:364,1027,451,286
|
||||
9
|
||||
bounds:920,1661,526,240
|
||||
bounds:926,1578,525,238
|
||||
|
||||
CardUpgradeSpine_2.png
|
||||
size:1950,1460
|
||||
size:1960,1712
|
||||
filter:Linear,Linear
|
||||
21
|
||||
bounds:1084,2,700,660
|
||||
22
|
||||
bounds:1077,415,1043,871
|
||||
bounds:1084,664,1046,874
|
||||
rotate:90
|
||||
23
|
||||
bounds:2,2,1456,1073
|
||||
bounds:2,256,1454,1080
|
||||
rotate:90
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 2.9 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.2 MiB |
Loading…
Reference in New Issue
Block a user