public void TributeCard(int playerId, SmallCardController card) { IncreasePlayerResource(playerId, 9, 1); // gain 1 FOUNDATION CardViewerController.instance.HideFullSizeCard(); Destroy(card.gameObject); UpdatePlayersResources(); }
public void AddCardToContract(SmallCardController card) { if (card._card.fractionType > 0) { _playerBoardPanel.GetComponent <PlayerBoardPanelController>().AddCardToContractPanel(card); } }
public void PlunderCard(int playerId, SmallCardController card) { IncreasePlayerResource(playerId, 4, -1); // cost 1 PILLAGE foreach (int r in card._card.gain) { IncreasePlayerResource(playerId, r, 1); } CardViewerController.instance.HideFullSizeCard(); Destroy(card.gameObject); UpdatePlayersResources(); ChangePlayersTurn(); }
public void AddCardToContract(int playerId, SmallCardController card) { if (card._card.fractionType > 0) { _playerControllers[playerId - 1].AddCardToContract(card); IncreasePlayerResource(playerId, 6, -1); // cost 1 FOOD IncreasePlayerResource(playerId, card._card.contract, 1); IncreasePlayerResourceInGrowthMatrix(playerId, card._card.contract, 1); CardViewerController.instance.HideFullSizeCard(); UpdatePlayersResources(); ChangePlayersTurn(); } }
public void ShowFullSizeCard(SmallCardController card) { if (_isShowed) { Destroy(_fullSizeCard); } else { _isShowed = true; } _fullSizeCard = Instantiate(_fullSizeCardPrefab, _parent) as GameObject; _fullSizeCard.GetComponent <BigCardController> ().InitData(card); }
public void AddCardToBoard(SmallCardController card) { GameObject newParent; if (card._card.fractionType > 0) { newParent = _fractionDropzones[card._card.actionType - 1]; } else { newParent = _defaultDropzones[card._card.actionType - 1]; } card.transform.SetParent(newParent.transform); }
public void InitData(SmallCardController cardController) { _cardController = cardController; _card = cardController._card; Debug.Log("check player turn"); Debug.Log("playerId " + cardController._playerId); if (!GameController.instance.IsPlayerTurn(cardController._playerId)) { Debug.Log("Is not player turn"); foreach (Button b in GetComponentsInChildren <Button>()) { b.gameObject.SetActive(false); } } }
public void AddCardToBoard(SmallCardController card) { _playerBoardPanel.GetComponent <PlayerBoardPanelController>().AddCardToBoard(card); }
public BigCardController(SmallCardController cardController, CardData card) : base(card) { _cardController = cardController; }
public void BuildCardREQ(int playerId, SmallCardController card) { Debug.Log("BuildCard " + playerId + " | " + card._card.ToString()); Server.instance.BuildCardREQ(playerId, card._card.fractionType, card._card.cardId); }
public void AddCardToContractPanel(SmallCardController card) { card.transform.SetParent(_contractsPanel.transform); card.transform.Rotate(new Vector3(0, 0, 180)); }