Commit 6ea1f06a authored by ElderLich's avatar ElderLich

Bug Fix: Hand Card Shows Sleeve/Color Overlay Until Hover

When a card is added from Deck to Hand, it can briefly render as blue/gold/sleeve instead of the card face. Hovering or clicking the card refreshes it and fixes the display.
parent 29de43a8
...@@ -441,6 +441,8 @@ namespace MDPro3 ...@@ -441,6 +441,8 @@ namespace MDPro3
} }
} }
data = d; data = d;
if (model != null && p.InLocation(CardLocation.Hand) && !inAnimation)
RefreshHandTurnByCode();
RefreshLabel(); RefreshLabel();
UpdateExDeckTop(); UpdateExDeckTop();
} }
...@@ -1547,6 +1549,7 @@ namespace MDPro3 ...@@ -1547,6 +1549,7 @@ namespace MDPro3
Program.instance.ocgcore.SetExDeckTop(this); Program.instance.ocgcore.SetExDeckTop(this);
ShowFaceDownCardOrNot(NeedShowFaceDownCard()); ShowFaceDownCardOrNot(NeedShowFaceDownCard());
RefreshHandTurnByCode();
if (p.InLocation(CardLocation.Deck, CardLocation.Extra)) if (p.InLocation(CardLocation.Deck, CardLocation.Extra))
Program.instance.ocgcore.DuelBGManager.ResizeDecks(); Program.instance.ocgcore.DuelBGManager.ResizeDecks();
...@@ -1554,6 +1557,13 @@ namespace MDPro3 ...@@ -1554,6 +1557,13 @@ namespace MDPro3
Program.instance.ocgcore.DuelBGManager.RefreshGravesState(); Program.instance.ocgcore.DuelBGManager.RefreshGravesState();
} }
private void RefreshHandTurnByCode()
{
if (model == null || !p.InLocation(CardLocation.Hand))
return;
manager.GetElement<Transform>("Turn").localEulerAngles = new Vector3(0, 0, data.Id == 0 ? 180 : 0);
}
public Sequence StartCardSequence(Vector3 fromPosition, Vector3 fromRotation, float interval = 0f) public Sequence StartCardSequence(Vector3 fromPosition, Vector3 fromRotation, float interval = 0f)
{ {
if (model == null) if (model == null)
......
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