Commit 727cbd30 authored by SherryChaos's avatar SherryChaos

adapt to diy puzzle

parent 2d3477ab
...@@ -172,12 +172,23 @@ namespace MDPro3.UI ...@@ -172,12 +172,23 @@ namespace MDPro3.UI
gps.sequence = sequence; gps.sequence = sequence;
var position = GameCard.GetCardPosition(gps); var position = GameCard.GetCardPosition(gps);
uiPoint = UIManager.WorldToScreenPoint(Program.I().camera_.cameraMain, position); uiPoint = UIManager.WorldToScreenPoint(Program.I().camera_.cameraMain, position);
if ((location & ((uint)CardLocation.Deck + (uint)CardLocation.Extra)) > 0
&& controller != 0)
height = -100;
} }
else else
{ {
uiPoint = UIManager.WorldToScreenPoint(Program.I().camera_.cameraMain, cookieCard.model.transform.position); uiPoint = UIManager.WorldToScreenPoint(Program.I().camera_.cameraMain, cookieCard.model.transform.position);
if (cookieCard != null && (cookieCard.p.location & (uint)CardLocation.Hand) > 0) if (cookieCard != null)
height = 250; {
if((cookieCard.p.location & (uint)CardLocation.Hand) > 0)
{
if(cookieCard.p.controller == 0)
height = 250f;
else
height = -100;
}
}
} }
GetComponent<RectTransform>().anchoredPosition = new Vector2(uiPoint.x - (buttonsCount - 1) * 80 + id * 160, uiPoint.y + height); GetComponent<RectTransform>().anchoredPosition = new Vector2(uiPoint.x - (buttonsCount - 1) * 80 + id * 160, uiPoint.y + height);
} }
......
...@@ -406,6 +406,9 @@ namespace MDPro3 ...@@ -406,6 +406,9 @@ namespace MDPro3
else if ((p.location & (uint)CardLocation.Hand) > 0) else if ((p.location & (uint)CardLocation.Hand) > 0)
{ {
int handsCount; int handsCount;
if(c == null)
return Vector3.zero;
if (c.p.controller == 0) if (c.p.controller == 0)
handsCount = Program.I().ocgcore.GetMyHandCount(); handsCount = Program.I().ocgcore.GetMyHandCount();
else else
......
...@@ -1906,12 +1906,15 @@ namespace MDPro3 ...@@ -1906,12 +1906,15 @@ namespace MDPro3
if (card != null) if (card != null)
{ {
card.CacheData(); card.CacheData();
card.SetCode(code);
to.reason = reason;
Sleep((int)(card.Move(to) * 100));
} }
else else
{
Debug.LogFormat("GCS_Get: not found, location: {0:X}, sequence: {1:X}, position: {2:X}", from.location, from.sequence, from.position); Debug.LogFormat("GCS_Get: not found, location: {0:X}, sequence: {1:X}, position: {2:X}", from.location, from.sequence, from.position);
card = GCS_Create(from);
}
card.SetCode(code);
to.reason = reason;
Sleep((int)(card.Move(to) * 100));
break; break;
case GameMessage.PosChange: case GameMessage.PosChange:
ES_hint = StringHelper.GetUnsafe(1600);//卡片改变了表示形式 ES_hint = StringHelper.GetUnsafe(1600);//卡片改变了表示形式
......
...@@ -135,7 +135,8 @@ PlayerSettings: ...@@ -135,7 +135,8 @@ PlayerSettings:
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 0.5.2 bundleVersion: 0.5.2
preloadedAssets: [] preloadedAssets:
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1 m_HolographicPauseOnTrackingLoss: 1
......
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