Commit 5f481bf0 authored by mercury233's avatar mercury233

fix deckDirty when begin dragging

parent 66d5a723
...@@ -1291,7 +1291,6 @@ public class DeckManager : ServantWithCardDescription ...@@ -1291,7 +1291,6 @@ public class DeckManager : ServantWithCardDescription
card.cardData = cardPicLoader_.data; card.cardData = cardPicLoader_.data;
card.gameObject.layer = 16; card.gameObject.layer = 16;
deck.IMain.Add(card); deck.IMain.Add(card);
deckDirty = true;
cardInDragging = card; cardInDragging = card;
card.beginDrag(); card.beginDrag();
} }
...@@ -1310,7 +1309,8 @@ public class DeckManager : ServantWithCardDescription ...@@ -1310,7 +1309,8 @@ public class DeckManager : ServantWithCardDescription
} }
else else
{ {
deckDirty = true; if (cardInDragging.getIfAlive())
deckDirty = true;
ArrangeObjectDeck(true); ArrangeObjectDeck(true);
ShowObjectDeck(); ShowObjectDeck();
} }
...@@ -1378,9 +1378,9 @@ public class DeckManager : ServantWithCardDescription ...@@ -1378,9 +1378,9 @@ public class DeckManager : ServantWithCardDescription
deck.ISide.Add(MonoCardInDeckManager_); deck.ISide.Add(MonoCardInDeckManager_);
deck.IMain.Remove(MonoCardInDeckManager_); deck.IMain.Remove(MonoCardInDeckManager_);
deck.IExtra.Remove(MonoCardInDeckManager_); deck.IExtra.Remove(MonoCardInDeckManager_);
} }
deckDirty = true; deckDirty = true;
ShowObjectDeck(); ShowObjectDeck();
} }
} }
} }
...@@ -1411,7 +1411,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1411,7 +1411,7 @@ public class DeckManager : ServantWithCardDescription
{ {
deck.IMain.Add(card); deck.IMain.Add(card);
deck.Main.Add(card.cardData.Id); deck.Main.Add(card.cardData.Id);
} }
deckDirty = true; deckDirty = true;
} }
} }
......
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