public CardLostCities MoveToAIDiscard(CardLostCities tCB) { WhichAIDiscard(tCB).Add(tCB); Vector3 pos; tCB.timeStart = 0; if (tCB.suit.Equals("R")) { tCB.SetSortingLayerName(layout.redPlayer2.layerName); tCB.SetSortOrder(redPlayer2.Count * 4); pos = layout.redPlayer2.pos; tCB.MoveTo(pos); tCB.state = CBState.toRedPlayer2; ArrangePlayer2Pile(); } if (tCB.suit.Equals("G")) { tCB.SetSortingLayerName(layout.greenPlayer2.layerName); tCB.SetSortOrder(greenPlayer2.Count * 4); pos = layout.greenPlayer2.pos; tCB.MoveTo(pos); tCB.state = CBState.toGreenPlayer2; ArrangePlayer2Pile(); } if (tCB.suit.Equals("W")) { tCB.SetSortingLayerName(layout.whitePlayer2.layerName); tCB.SetSortOrder(whitePlayer2.Count * 4); pos = layout.whitePlayer2.pos; tCB.MoveTo(pos); tCB.state = CBState.toWhitePlayer2; ArrangePlayer2Pile(); } if (tCB.suit.Equals("B")) { tCB.SetSortingLayerName(layout.bluePlayer2.layerName); tCB.SetSortOrder(bluePlayer2.Count * 4); pos = layout.bluePlayer2.pos; tCB.MoveTo(pos); tCB.state = CBState.toBluePlayer2;; ArrangePlayer2Pile(); } if (tCB.suit.Equals("Y")) { tCB.SetSortingLayerName(layout.yellowPlayer2.layerName); tCB.SetSortOrder(yellowPlayer2.Count * 4); pos = layout.yellowPlayer2.pos; tCB.MoveTo(pos); tCB.state = CBState.toYellowPlayer2; ArrangePlayer2Pile(); } players[1].RemoveCard(tCB); return(tCB); }
public CardLostCities MoveToPlayerDiscard(CardLostCities tCB) { WhichPlayerDiscard(tCB).Add(tCB); Vector3 pos; tCB.timeStart = 0; if (tCB.suit.Equals("R")) { tCB.SetSortingLayerName(layout.redPlayer1.layerName); tCB.SetSortOrder(redPlayer1.Count * 4); //tCB.transform.localPosition = layout.redPlayer1.pos + Vector3.back / 2; //tCB.transform.localRotation = Quaternion.Euler(Vector3.zero); pos = layout.redPlayer1.pos; tCB.MoveTo(pos); tCB.state = CBState.toRedPlayer1; ArrangePlayerPile(); } if (tCB.suit.Equals("G")) { tCB.SetSortingLayerName(layout.greenPlayer1.layerName); tCB.SetSortOrder(greenPlayer1.Count * 4); pos = layout.greenPlayer1.pos; tCB.MoveTo(pos); tCB.state = CBState.toGreenPlayer1; ArrangePlayerPile(); } if (tCB.suit.Equals("W")) { tCB.SetSortingLayerName(layout.whitePlayer1.layerName); tCB.SetSortOrder(whitePlayer1.Count * 4); pos = layout.whitePlayer1.pos; tCB.MoveTo(pos); tCB.state = CBState.toWhitePlayer1; ArrangePlayerPile(); } if (tCB.suit.Equals("B")) { tCB.SetSortingLayerName(layout.bluePlayer1.layerName); tCB.SetSortOrder(bluePlayer1.Count * 4); pos = layout.bluePlayer1.pos; tCB.MoveTo(pos); tCB.state = CBState.toBluePlayer1; ArrangePlayerPile(); } if (tCB.suit.Equals("Y")) { tCB.SetSortingLayerName(layout.yellowPlayer1.layerName); tCB.SetSortOrder(yellowPlayer1.Count * 4); pos = layout.yellowPlayer1.pos; tCB.MoveTo(pos); tCB.state = CBState.toYellowPlayer1; ArrangePlayerPile(); } players[0].RemoveCard(tCB); return(tCB); }