Commit 73d0a1d8 authored by 赤子奈落's avatar 赤子奈落

fix bug

原本设定为CardSelection isShowed时,额外、墓地等隐藏按钮点击时不会显示。
为避免不知名的bug,取消此限制。
parent 10ed9768
...@@ -3009,7 +3009,7 @@ MonoBehaviour: ...@@ -3009,7 +3009,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -3742,7 +3742,7 @@ MonoBehaviour: ...@@ -3742,7 +3742,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -21191,7 +21191,7 @@ MonoBehaviour: ...@@ -21191,7 +21191,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -39084,7 +39084,7 @@ MonoBehaviour: ...@@ -39084,7 +39084,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -64220,7 +64220,7 @@ MonoBehaviour: ...@@ -64220,7 +64220,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -88370,7 +88370,7 @@ MonoBehaviour: ...@@ -88370,7 +88370,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -104232,7 +104232,7 @@ MonoBehaviour: ...@@ -104232,7 +104232,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -106232,7 +106232,7 @@ MonoBehaviour: ...@@ -106232,7 +106232,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -107532,7 +107532,7 @@ MonoBehaviour: ...@@ -107532,7 +107532,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -124127,7 +124127,7 @@ MonoBehaviour: ...@@ -124127,7 +124127,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3029 startingRenderQueue: 3027
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -133916,7 +133916,7 @@ MonoBehaviour: ...@@ -133916,7 +133916,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -142815,7 +142815,7 @@ MonoBehaviour: ...@@ -142815,7 +142815,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -195283,7 +195283,7 @@ MonoBehaviour: ...@@ -195283,7 +195283,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -202409,7 +202409,7 @@ MonoBehaviour: ...@@ -202409,7 +202409,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -202576,7 +202576,7 @@ MonoBehaviour: ...@@ -202576,7 +202576,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -216954,7 +216954,7 @@ MonoBehaviour: ...@@ -216954,7 +216954,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -222731,7 +222731,7 @@ MonoBehaviour: ...@@ -222731,7 +222731,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -229365,7 +229365,7 @@ MonoBehaviour: ...@@ -229365,7 +229365,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -247294,7 +247294,7 @@ MonoBehaviour: ...@@ -247294,7 +247294,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 0 mAlpha: 0
mClipping: 0 mClipping: 0
...@@ -261597,7 +261597,7 @@ MonoBehaviour: ...@@ -261597,7 +261597,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3029 startingRenderQueue: 3027
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -276526,7 +276526,7 @@ MonoBehaviour: ...@@ -276526,7 +276526,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3029 startingRenderQueue: 3027
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -304385,7 +304385,7 @@ MonoBehaviour: ...@@ -304385,7 +304385,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3030 startingRenderQueue: 3028
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -332610,7 +332610,7 @@ MonoBehaviour: ...@@ -332610,7 +332610,7 @@ MonoBehaviour:
anchorOffset: 0 anchorOffset: 0
softBorderPadding: 1 softBorderPadding: 1
renderQueue: 0 renderQueue: 0
startingRenderQueue: 3026 startingRenderQueue: 3024
mClipTexture: {fileID: 0} mClipTexture: {fileID: 0}
mAlpha: 1 mAlpha: 1
mClipping: 3 mClipping: 3
...@@ -481,40 +481,70 @@ public class gameHiddenButton : OCGobject ...@@ -481,40 +481,70 @@ public class gameHiddenButton : OCGobject
{ {
showAll(); showAll();
if(!Program.I().cardSelection.isShowed) //if(!Program.I().cardSelection.isShowed)
{ //{
bool spsummon = false; // bool spsummon = false;
bool activate = false; // bool activate = false;
for (var i = 0; i < Program.I().ocgcore.cards.Count; i++) // for (var i = 0; i < Program.I().ocgcore.cards.Count; i++)
if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy) // if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy)
if ((Program.I().ocgcore.cards[i].p.location & (uint)location) > 0) // if ((Program.I().ocgcore.cards[i].p.location & (uint)location) > 0)
if (Program.I().ocgcore.cards[i].p.controller == player) // if (Program.I().ocgcore.cards[i].p.controller == player)
// {
// if (Program.I().ocgcore.cards[i].buttons.Count > 0)
// {
// foreach (var btn in Program.I().ocgcore.cards[i].buttons)
// {
// if (btn.type == superButtonType.spsummon)
// spsummon = true;
// else if (btn.type == superButtonType.act)
// activate = true;
// }
// }
// }
// var vector_of_begin = gameObject.transform.position;
// vector_of_begin = Program.I().main_camera.WorldToScreenPoint(vector_of_begin);
// if (spsummon && activate)
// {
// spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
// actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(1, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
// }
// else if (spsummon)
// spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
// else if (activate)
// actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
//}
bool spsummon = false;
bool activate = false;
for (var i = 0; i < Program.I().ocgcore.cards.Count; i++)
if (Program.I().ocgcore.cards[i].gameObject.activeInHierarchy)
if ((Program.I().ocgcore.cards[i].p.location & (uint)location) > 0)
if (Program.I().ocgcore.cards[i].p.controller == player)
{
if (Program.I().ocgcore.cards[i].buttons.Count > 0)
{
foreach (var btn in Program.I().ocgcore.cards[i].buttons)
{ {
if (Program.I().ocgcore.cards[i].buttons.Count > 0) if (btn.type == superButtonType.spsummon)
{ spsummon = true;
foreach (var btn in Program.I().ocgcore.cards[i].buttons) else if (btn.type == superButtonType.act)
{ activate = true;
if (btn.type == superButtonType.spsummon)
spsummon = true;
else if (btn.type == superButtonType.act)
activate = true;
}
}
} }
var vector_of_begin = gameObject.transform.position; }
vector_of_begin = Program.I().main_camera.WorldToScreenPoint(vector_of_begin); }
if (spsummon && activate) var vector_of_begin = gameObject.transform.position;
{ vector_of_begin = Program.I().main_camera.WorldToScreenPoint(vector_of_begin);
spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f)); if (spsummon && activate)
actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(1, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f)); {
} spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
else if (spsummon) actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(1, 2, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
else if (activate)
actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
}
} }
else if (spsummon)
spButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
else if (activate)
actButton.show(vector_of_begin + new Vector3(gameCard.SortLine(0, 1, 180 * Screen.height / 1080f), 150f * Screen.height / 1080f, 0f));
}
} }
private void showAll() private void showAll()
......
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