public void InitializeSinglePlayerGame() { ResetPlayers(); // DUMMY CONDITIONS object[] endingConditionParams = new object[2]; endingConditionParams[0] = gameTable; endingConditionParams[1] = (object)5; gameTable.ChangeGameMode(Common.Enums.GameMode.RoundCount, endingConditionParams); UIDeck.Show(); player.InitializePlayer(gameTable); UIComputer player2 = computer1.InitializeComputer(); UIComputer player3 = computer2.InitializeComputer(); UIComputer player4 = computer3.InitializeComputer(); AddPlayer(player.getInternalPlayer()); AddPlayer(player2); AddPlayer(player3); AddPlayer(player4); gameTable.InitializeGame(); }
public static void PlayCard(Card card, int playedBy, UIComputer playerComputer) { destinationPosition = Cards[playedCardCount].position; destinationRotation = Cards[playedCardCount].rotation; GameObject newCardObject = Instantiate(cardPrefab, playerPositions[playedBy].position, cardPrefab.transform.rotation) as GameObject; newCardObject.transform.parent = playedCardsTransform; UICard cardScript = newCardObject.transform.GetComponent <UICard>(); newCardObject.transform.GetComponent <SpriteRenderer>().sortingOrder = 8; cardScript.BindCard(card); Cards[playedCardCount] = newCardObject.transform; playedCardCount++; cardToPlay = card; cardPlayer = playerComputer; moveCard = true; SoundManagerInstance.PlayCardPlaySound(); }
public void InitializeSinglePlayerGame(Common.Enums.GameMode gameMode, object endingCondition) { ResetPlayers(); object[] endingConditionParams = new object[2]; endingConditionParams[0] = gameTable; endingConditionParams[1] = endingCondition; gameTable.ChangeGameMode(gameMode, endingConditionParams); UIDeck.Show(); player.InitializePlayer(gameTable); UIComputer player2 = computer1.InitializeComputer(); UIComputer player3 = computer2.InitializeComputer(); UIComputer player4 = computer3.InitializeComputer(); AddPlayer(player.getInternalPlayer()); AddPlayer(player2); AddPlayer(player3); AddPlayer(player4); gameTable.InitializeGame(); }
public UIComputer InitializeComputer() { computer = new UIComputer(gameTable.gameTable, this); return(computer); }