Commit fc32ab1e authored by SherryChaos's avatar SherryChaos

new logic for confirmCards

parent d6adff5c
...@@ -75,6 +75,85 @@ MonoBehaviour: ...@@ -75,6 +75,85 @@ MonoBehaviour:
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1 m_PixelsPerUnitMultiplier: 1
--- !u!1 &1362503075090133112
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9131026428974051513}
- component: {fileID: 8874319226260703613}
- component: {fileID: 3577896527850464538}
m_Layer: 5
m_Name: '#Text'
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &9131026428974051513
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1362503075090133112}
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_Children: []
m_Father: {fileID: 757299944955314651}
m_RootOrder: 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: 2}
m_SizeDelta: {x: 220, y: 66}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8874319226260703613
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1362503075090133112}
m_CullTransparentMesh: 1
--- !u!114 &3577896527850464538
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1362503075090133112}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.8, g: 1, b: 0, 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_FontData:
m_Font: {fileID: 12800000, guid: cdf4c81f8bf6eb248a105d8a5edf19fd, type: 3}
m_FontSize: 23
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u7ED3\u675F"
--- !u!1 &2824050888097002308 --- !u!1 &2824050888097002308
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -176,6 +255,156 @@ Animator: ...@@ -176,6 +255,156 @@ Animator:
m_AllowConstantClipSamplingOptimization: 1 m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorStateOnDisable: 0 m_KeepAnimatorStateOnDisable: 0
m_WriteDefaultValuesOnDisable: 0 m_WriteDefaultValuesOnDisable: 0
--- !u!1 &4388755673887167683
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 757299944955314651}
- component: {fileID: 2083120995922498704}
- component: {fileID: 6036844036580089040}
- component: {fileID: 8477769426423604880}
- component: {fileID: 2874907292559580355}
m_Layer: 5
m_Name: ButtonFinish
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &757299944955314651
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388755673887167683}
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_Children:
- {fileID: 9131026428974051513}
m_Father: {fileID: 9149400913812470570}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 1}
m_AnchorMax: {x: 0.5, y: 1}
m_AnchoredPosition: {x: 0, y: -320}
m_SizeDelta: {x: 270, y: 62}
m_Pivot: {x: 0.5, y: 1}
--- !u!222 &2083120995922498704
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388755673887167683}
m_CullTransparentMesh: 1
--- !u!114 &6036844036580089040
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388755673887167683}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 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: 3f3530d278caa714dac3fa1ca2b32382, type: 3}
m_Type: 1
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 &8477769426423604880
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388755673887167683}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 0
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 2
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0, g: 1, b: 0.1521349, a: 1}
m_PressedColor: {r: 0, g: 0.5188679, b: 0.0793563, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 21300000, guid: 5e62e74ba6b88c644964166e68a1a8cb, type: 3}
m_PressedSprite: {fileID: 21300000, guid: 5e62e74ba6b88c644964166e68a1a8cb, type: 3}
m_SelectedSprite: {fileID: 21300000, guid: 5e62e74ba6b88c644964166e68a1a8cb, type: 3}
m_DisabledSprite: {fileID: 21300000, guid: 3f3530d278caa714dac3fa1ca2b32382, type: 3}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6036844036580089040}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 9149400914150427127}
m_TargetAssemblyTypeName: MDPro3.UI.PopupDuelSelectCard, Assembly-CSharp
m_MethodName: OnFinish
m_Mode: 1
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
--- !u!114 &2874907292559580355
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388755673887167683}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e0fb4b52f774bc84b91e8b296e15849a, type: 3}
m_Name:
m_EditorClassIdentifier:
icon: {fileID: 0}
text: {fileID: 3577896527850464538}
pressColor: 0.5
disableColor: 0.5
--- !u!1 &5053186932054640071 --- !u!1 &5053186932054640071
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -283,7 +512,7 @@ RectTransform: ...@@ -283,7 +512,7 @@ RectTransform:
m_Children: m_Children:
- {fileID: 4492659906776470918} - {fileID: 4492659906776470918}
m_Father: {fileID: 9149400913812470570} m_Father: {fileID: 9149400913812470570}
m_RootOrder: 5 m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1} m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
...@@ -1226,6 +1455,7 @@ RectTransform: ...@@ -1226,6 +1455,7 @@ RectTransform:
- {fileID: 9149400914606224887} - {fileID: 9149400914606224887}
- {fileID: 9149400913087694877} - {fileID: 9149400913087694877}
- {fileID: 9149400914617502443} - {fileID: 9149400914617502443}
- {fileID: 757299944955314651}
- {fileID: 9149400914228132156} - {fileID: 9149400914228132156}
- {fileID: 4254301853415427211} - {fileID: 4254301853415427211}
m_Father: {fileID: 9149400913178371289} m_Father: {fileID: 9149400913178371289}
...@@ -1521,6 +1751,7 @@ MonoBehaviour: ...@@ -1521,6 +1751,7 @@ MonoBehaviour:
tempHideHeight: -390 tempHideHeight: -390
scrollView: {fileID: 9149400914606224884} scrollView: {fileID: 9149400914606224884}
baseRect: {fileID: 9149400913178371289} baseRect: {fileID: 9149400913178371289}
btnFinish: {fileID: 8477769426423604880}
hint: hint:
cards: [] cards: []
min: 0 min: 0
...@@ -1560,7 +1791,7 @@ RectTransform: ...@@ -1560,7 +1791,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 9149400913812470570} m_Father: {fileID: 9149400913812470570}
m_RootOrder: 4 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1}
......
...@@ -3569,6 +3569,10 @@ namespace MDPro3 ...@@ -3569,6 +3569,10 @@ namespace MDPro3
case GameMessage.ConfirmCards: case GameMessage.ConfirmCards:
player = LocalPlayer(r.ReadByte()); player = LocalPlayer(r.ReadByte());
count = r.ReadByte(); count = r.ReadByte();
var listShow = false;
if(count > 3 && condition == Condition.Duel)
listShow = true;
var confirmCards = new List<GameCard>();
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
code = r.ReadInt32(); code = r.ReadInt32();
...@@ -3577,10 +3581,19 @@ namespace MDPro3 ...@@ -3577,10 +3581,19 @@ namespace MDPro3
if (card != null) if (card != null)
{ {
card.SetCode(code); card.SetCode(code);
card.AnimationConfirm(i); if(listShow)
confirmCards.Add(card);
else
card.AnimationConfirm(i);
} }
} }
Sleep(100 * count); if (listShow)
{
messagePass = false;
ShowPopupSelectCard(InterString.Get("确认卡片:[?]张。", count.ToString()), confirmCards, 0, 0, true, true);
}
else
Sleep(100 * count);
break; break;
case GameMessage.DeckTop: case GameMessage.DeckTop:
player = LocalPlayer(r.ReadByte()); player = LocalPlayer(r.ReadByte());
......
...@@ -16,7 +16,7 @@ namespace MDPro3.UI ...@@ -16,7 +16,7 @@ namespace MDPro3.UI
[Header("Popup Duel SelectCard Reference")] [Header("Popup Duel SelectCard Reference")]
public ScrollRect scrollView; public ScrollRect scrollView;
public RectTransform baseRect; public RectTransform baseRect;
public Button btnFinish;
public string hint; public string hint;
public List<GameCard> cards; public List<GameCard> cards;
public int min; public int min;
...@@ -48,8 +48,17 @@ namespace MDPro3.UI ...@@ -48,8 +48,17 @@ namespace MDPro3.UI
public override void InitializeSelections() public override void InitializeSelections()
{ {
core = Program.I().ocgcore; core = Program.I().ocgcore;
btnCancel.GetComponent<ButtonPress>().SetInteractable(exitable); if(core.currentMessage == GameMessage.ConfirmCards)
btnConfirm.GetComponent<ButtonPress>().SetInteractable(sendable); {
btnConfirm.gameObject.SetActive(false);
btnCancel.gameObject.SetActive(false);
btnFinish.gameObject.SetActive(true);
}
else
{
btnCancel.GetComponent<ButtonPress>().SetInteractable(exitable);
btnConfirm.GetComponent<ButtonPress>().SetInteractable(sendable);
}
if (cards.Count <= 4) if (cards.Count <= 4)
{ {
baseRect.sizeDelta = new Vector2(650, 420); baseRect.sizeDelta = new Vector2(650, 420);
...@@ -162,6 +171,10 @@ namespace MDPro3.UI ...@@ -162,6 +171,10 @@ namespace MDPro3.UI
btnConfirm.GetComponent<ButtonPress>().SetInteractable(false); btnConfirm.GetComponent<ButtonPress>().SetInteractable(false);
} }
title.text = hint + "-" + selectedSum[0].ToString() + Program.slash + core.ES_level; title.text = hint + "-" + selectedSum[0].ToString() + Program.slash + core.ES_level;
}
else if(core.currentMessage == GameMessage.ConfirmCards)
{
} }
else else
{ {
...@@ -395,6 +408,14 @@ namespace MDPro3.UI ...@@ -395,6 +408,14 @@ namespace MDPro3.UI
Hide(); Hide();
} }
public void OnFinish()
{
AudioManager.PlaySE("SE_DUEL_DECIDE");
core.Sleep(20);
OcgCore.messagePass = true;
Hide();
}
public override void Hide() public override void Hide()
{ {
base.Hide(); base.Hide();
......
...@@ -54,7 +54,8 @@ namespace MDPro3.UI ...@@ -54,7 +54,8 @@ namespace MDPro3.UI
bool showHead = false; bool showHead = false;
if (id == 0) if (id == 0)
showHead = true; showHead = true;
else if (card.p.location != cards[id - 1].p.location) else if (card.p.location != cards[id - 1].p.location
|| card.p.controller != cards[id - 1].p.controller)
showHead = true; showHead = true;
if (showHead) if (showHead)
locationIcon.sprite = TextureManager.GetCardLocationIcon(card.p); locationIcon.sprite = TextureManager.GetCardLocationIcon(card.p);
...@@ -64,7 +65,8 @@ namespace MDPro3.UI ...@@ -64,7 +65,8 @@ namespace MDPro3.UI
bool isEnd = false; bool isEnd = false;
if (id == cards.Count - 1) if (id == cards.Count - 1)
isEnd = true; isEnd = true;
else if (card.p.location != cards[id + 1].p.location) else if (card.p.location != cards[id + 1].p.location
|| card.p.controller != cards[id + 1].p.controller)
isEnd = true; isEnd = true;
if (isEnd) if (isEnd)
GetComponent<RectTransform>().sizeDelta = new Vector2(145, 180); GetComponent<RectTransform>().sizeDelta = new Vector2(145, 180);
...@@ -185,7 +187,10 @@ namespace MDPro3.UI ...@@ -185,7 +187,10 @@ namespace MDPro3.UI
selected = true; selected = true;
manager.selectedCount++; manager.selectedCount++;
if (!manager.order) if(Program.I().ocgcore.currentMessage == GameMessage.ConfirmCards)
{
}
else if (!manager.order)
checkOn.SetActive(true); checkOn.SetActive(true);
else else
{ {
......
...@@ -475,3 +475,6 @@ Off->Off ...@@ -475,3 +475,6 @@ Off->Off
检测到新版先行卡,请至 [游戏设置]-[先行卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[先行卡包]-[更新先行卡] 处进行更新。 检测到新版先行卡,请至 [游戏设置]-[先行卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[先行卡包]-[更新先行卡] 处进行更新。
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。 检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。
[?],请选择效果发动。->[?],请选择效果发动。 [?],请选择效果发动。->[?],请选择效果发动。
确认卡片。->确认卡片。
结束->结束
确认卡片:[?]张。->确认卡片:[?]张。
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