private void SpawnStackHeaders() { for (int i = 0; i < 10; i++) { StackHeader header = Instantiate(stackHeaderPrefab); header.Initialize(i); Positioner.Instance.PositionStackHeader(header, i); } }
public void UndoMove() { if (pastMoves.Count == 0) { return; } var lastMove = pastMoves.Pop(); StackHeader stackHeader = new StackHeader(); stackHeader.Initialize(lastMove.originalStack); if (lastMove.cardBelowTurned) { stacks[lastMove.originalStack].Last().TurnCard(); } MoveCard(lastMove.movedCard, stackHeader, true); }