void FirstCardPlacement(DominoCard dominoCard, DominoDirection dominoDirection, Vector3 localPosition, Vector2 addTorightMost, Vector2 addToLefttMost, bool AddLast, int TheLastLeftNum, int TheLastRightNum, float RightY = 0, float LeftY = 0) { dominoCard.transform.localScale = Vector3.one; dominoCard.ownership = GameRole.Board; dominoCard.transform.SetParent(GameBoard); RectTransform domRect = dominoCard.GetComponent <RectTransform>(); dominoCard.DominoDirection = dominoDirection; domRect.localPosition = localPosition; rightMost += addTorightMost; leftMost += addToLefttMost; if (AddLast) { linkedDominoes.AddLast(dominoCard); } else { linkedDominoes.AddFirst(dominoCard); } LastLeftNum = TheLastLeftNum; LastRightNum = TheLastRightNum; if (RightY != 0) { rightMost.y = RightY; } if (LeftY != 0) { leftMost.y = LeftY; } }
Domino(int value1, int value2, bool isObservableByAll, DominoDirection isHorizontal, DominoOwnership ownership) { Value1 = value1; Value2 = value2; IsObservableByAll = isObservableByAll; IsHorizontal = isHorizontal; Ownership = ownership; }