Example #1
0
 void moveToDiscard(CardProspector cd)
 {
     cd.state = CardState.discard;
     discardPile.Add(cd);
     cd.transform.parent        = layoutAnchor;
     cd.transform.localPosition = new Vector3(layout.multiplier.x * layout.discardPile.x, layout.multiplier.y * layout.discardPile.y, -layout.discardPile.layerID + 0.5f);
     cd.faceUp = true;
     cd.setSortingLayerName(layout.discardPile.layerName);
     cd.setSortOrder(-100 + discardPile.Count);
 }
Example #2
0
 void moveToTarget(CardProspector cd)
 {
     if (target != null)
     {
         moveToDiscard(target);
     }
     target                     = cd;
     cd.state                   = CardState.target;
     cd.transform.parent        = layoutAnchor;
     cd.transform.localPosition = new Vector3(
         layout.multiplier.x * layout.discardPile.x, layout.multiplier.y * layout.discardPile.y, -layout.discardPile.layerID);
     cd.faceUp = true;
     cd.setSortingLayerName(layout.discardPile.layerName);
     cd.setSortOrder(0);
 }