Commit 762d21f1 authored by SherryChaos's avatar SherryChaos

add swipe function for CardActionMenu

parent dd104817
MDPro3 v1.3.8更新:
1.非中文的卡片渲染的属性球添加了注音文字;
2.决斗中点击魔陷区会缩回对应玩家的手卡以展示魔陷区(屏幕比例16:9以上的缩回);
3.为移动端的卡组编辑界面的卡片详情页添加了左右滑动的功能;
4.修复移动端的卡组编辑界面的卡片详情页缺少Genesys点数图标的错误;
MDPro3 v1.3.7更新: MDPro3 v1.3.7更新:
1.卡组编辑界面的[测试]按钮恢复功能,并以第一位WindBot为对手,不洗牌进行决斗; 1.卡组编辑界面的[测试]按钮恢复功能,并以第一位WindBot为对手,不洗牌进行决斗;
2.减少开机加载时间。 2.减少开机加载时间。
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: 33907426eea5ee34b8d64f1ed059155e
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -2455,9 +2455,9 @@ RectTransform: ...@@ -2455,9 +2455,9 @@ RectTransform:
- {fileID: 224650453916092378} - {fileID: 224650453916092378}
m_Father: {fileID: 224623248622095704} m_Father: {fileID: 224623248622095704}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 18, y: -52} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 208, y: 42} m_SizeDelta: {x: 208, y: 42}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!114 &114432190137694342 --- !u!114 &114432190137694342
...@@ -8168,7 +8168,7 @@ MonoBehaviour: ...@@ -8168,7 +8168,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 224719449395354517} m_HandleRect: {fileID: 224719449395354517}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 0
m_Size: 1 m_Size: 0.80701756
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
...@@ -9968,7 +9968,7 @@ MonoBehaviour: ...@@ -9968,7 +9968,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 224939849324573562} m_HandleRect: {fileID: 224939849324573562}
m_Direction: 2 m_Direction: 2
m_Value: 0 m_Value: 0
m_Size: 1 m_Size: 0.71794873
m_NumberOfSteps: 0 m_NumberOfSteps: 0
m_OnValueChanged: m_OnValueChanged:
m_PersistentCalls: m_PersistentCalls:
...@@ -15369,9 +15369,9 @@ RectTransform: ...@@ -15369,9 +15369,9 @@ RectTransform:
- {fileID: 224299202191277751} - {fileID: 224299202191277751}
m_Father: {fileID: 224623248622095704} m_Father: {fileID: 224623248622095704}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 238, y: -52} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 208, y: 42} m_SizeDelta: {x: 208, y: 42}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!114 &114867095108582714 --- !u!114 &114867095108582714
...@@ -20150,9 +20150,9 @@ RectTransform: ...@@ -20150,9 +20150,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 584, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &9150139952031509180 --- !u!114 &9150139952031509180
...@@ -20689,9 +20689,9 @@ RectTransform: ...@@ -20689,9 +20689,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 784, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2318537164940282873 --- !u!114 &2318537164940282873
...@@ -20799,9 +20799,9 @@ RectTransform: ...@@ -20799,9 +20799,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 984, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3090956439444166884 --- !u!114 &3090956439444166884
...@@ -21471,9 +21471,9 @@ RectTransform: ...@@ -21471,9 +21471,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 684, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1096901667250210284 --- !u!114 &1096901667250210284
...@@ -21582,9 +21582,9 @@ RectTransform: ...@@ -21582,9 +21582,9 @@ RectTransform:
- {fileID: 2534668861936280417} - {fileID: 2534668861936280417}
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 1084, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2355830908432269729 --- !u!114 &2355830908432269729
...@@ -21775,9 +21775,9 @@ RectTransform: ...@@ -21775,9 +21775,9 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 7791176924581710415} m_Father: {fileID: 7791176924581710415}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 884, y: -31} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 84, y: 42} m_SizeDelta: {x: 84, y: 42}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5968262412313107696 --- !u!114 &5968262412313107696
...@@ -21963,7 +21963,7 @@ MonoBehaviour: ...@@ -21963,7 +21963,7 @@ MonoBehaviour:
m_enableAutoSizing: 1 m_enableAutoSizing: 1
m_fontSizeMin: 5 m_fontSizeMin: 5
m_fontSizeMax: 20 m_fontSizeMax: 20
m_fontStyle: 0 m_fontStyle: 1
m_HorizontalAlignment: 2 m_HorizontalAlignment: 2
m_VerticalAlignment: 512 m_VerticalAlignment: 512
m_textAlignment: 65535 m_textAlignment: 65535
......
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
using UnityEngine.Events; using UnityEngine.Events;
using UnityEngine.EventSystems; using UnityEngine.EventSystems;
...@@ -5,7 +6,7 @@ using UnityEngine.UI; ...@@ -5,7 +6,7 @@ using UnityEngine.UI;
namespace MDPro3.UI namespace MDPro3.UI
{ {
public class SwipeArea : MonoBehaviour public class SwipeArea : MonoBehaviour, ICanvasRaycastFilter
{ {
public UnityEvent OnSwipeLeft; public UnityEvent OnSwipeLeft;
public UnityEvent OnSwipeRight; public UnityEvent OnSwipeRight;
...@@ -14,8 +15,7 @@ namespace MDPro3.UI ...@@ -14,8 +15,7 @@ namespace MDPro3.UI
private Vector2 currentTouchPosition; private Vector2 currentTouchPosition;
private bool stopTouch = false; private bool stopTouch = false;
private float swipeRange = 50f; // 滑动范围 public float swipeRange = 50f;
private float tapRange = 10f; // 轻触范围
public void OnPointerDown(BaseEventData data) public void OnPointerDown(BaseEventData data)
{ {
...@@ -52,5 +52,16 @@ namespace MDPro3.UI ...@@ -52,5 +52,16 @@ namespace MDPro3.UI
} }
} }
} }
public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
{
if (UserInput.MouseLeftUp)
{
OnPointerUp(new BaseEventData(EventSystem.current));
}
return true;
}
} }
} }
using UnityEngine;
using UnityEngine.EventSystems;
namespace MDPro3.UI
{
public class SwipeThroughFilter : MonoBehaviour, ICanvasRaycastFilter
{
private SwipeArea parent;
private void Start()
{
parent = GetComponentInParent<SwipeArea>();
}
public bool IsRaycastLocationValid(Vector2 screenPoint, Camera eventCamera)
{
if (UserInput.MouseLeftDown)
{
if (parent != null)
parent.OnPointerDown(new BaseEventData(EventSystem.current));
}
else if (UserInput.MouseLeftUp)
{
if (parent != null)
parent.OnPointerUp(new BaseEventData(EventSystem.current));
}
return true;
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: d05595236ab69d649aa9a6dc0b6d879b
\ No newline at end of file
using DG.Tweening;
using MDPro3.Duel.YGOSharp;
using MDPro3.Net;
using MDPro3.Servant;
using MDPro3.UI.ServantUI;
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI; using UnityEngine.UI;
using TMPro;
using MDPro3.Duel.YGOSharp;
using YgomSystem.ElementSystem; using YgomSystem.ElementSystem;
using DG.Tweening;
using UnityEngine.Events;
using MDPro3.Servant;
using MDPro3.UI.ServantUI;
namespace MDPro3.UI namespace MDPro3.UI
{ {
...@@ -251,6 +252,12 @@ namespace MDPro3.UI ...@@ -251,6 +252,12 @@ namespace MDPro3.UI
m_IconPRE = m_IconPRE != null ? m_IconPRE m_IconPRE = m_IconPRE != null ? m_IconPRE
: Manager.GetNestedElement<Image>(LABEL_IMG_ICONPRE); : Manager.GetNestedElement<Image>(LABEL_IMG_ICONPRE);
private const string LABEL_TXT_GP = "CardArea/TextGP";
private TextMeshProUGUI m_TextGP;
protected TextMeshProUGUI TextGP =>
m_TextGP = m_TextGP != null ? m_TextGP
: Manager.GetNestedElement<TextMeshProUGUI>(LABEL_TXT_GP);
#endregion #endregion
#region MenuArea #region MenuArea
...@@ -384,6 +391,13 @@ namespace MDPro3.UI ...@@ -384,6 +391,13 @@ namespace MDPro3.UI
IconSCCG.gameObject.SetActive((data.Ot & 8) > 0); IconSCCG.gameObject.SetActive((data.Ot & 8) > 0);
IconDIY.gameObject.SetActive((data.Ot & 4) > 0); IconDIY.gameObject.SetActive((data.Ot & 4) > 0);
IconPRE.gameObject.SetActive(data.isPre); IconPRE.gameObject.SetActive(data.isPre);
if (TextGP != null)
{
var gp = OnlineService.GetGenesysPoint(data.GetOriginalID());
var gpString = OnlineService.GetGenesysPointString(data.GetOriginalID());
TextGP.text = string.Format("G:{0}", gpString);
TextGP.color = OnlineService.GetGenesysPointColor(gp);
}
} }
#endregion #endregion
......
...@@ -140,7 +140,7 @@ PlayerSettings: ...@@ -140,7 +140,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 1.3.7 bundleVersion: 1.3.8
preloadedAssets: preloadedAssets:
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2} - {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
- {fileID: -944628639613478452, guid: a916821eb5eea2842a69be6041bcdb82, type: 3} - {fileID: -944628639613478452, guid: a916821eb5eea2842a69be6041bcdb82, type: 3}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment