public void SellCard(int cardPrice, Queue <Card> cards) { pointBar.AddPlayerPointValue(cardPrice); cards.Enqueue(this.CardOnHand); object[] sellCardData = new object[] { this.CardOnHand }; PhotonNetwork.RaiseEvent(RaiseEventCode.PLAYER_SELL_CARD, sellCardData, RaiseEventOptions.Default, SendOptions.SendReliable); cardInfoAndButtonVisibility(false, false); }
public void PlayerMove(int playerCurrentPosition, int RollDiceResult) { gameplayManager.EndTurnButton.interactable = false; PlayerNextWaypointIndex = playerCurrentPosition + RollDiceResult; if (PlayerNextWaypointIndex > 100) { newDice.DiceValueLeft = PlayerNextWaypointIndex % 100; gameplayManager.PawnMoveExceedLastSquare = true; PlayerNextWaypointIndex = 100; } else { gameplayManager.PawnMoveExceedLastSquare = false; } transform.position = Vector2.MoveTowards(transform.position, gameplayManager.waypoints[PlayerMovingWaypointIndex].position, MoveSpeed * Time.deltaTime); if (transform.position == gameplayManager.waypoints[PlayerMovingWaypointIndex].position && transform.position != gameplayManager.waypoints[PlayerNextWaypointIndex].position) { PlayerMovingWaypointIndex += 1; pointBar.AddPlayerPointValue(1); gameplayManager.WaypointsLeft--; } else if (transform.position == gameplayManager.waypoints[PlayerNextWaypointIndex].position) { SetCurrentPositionPlayer(RollDiceResult); if (!gameplayManager.PawnMoveExceedLastSquare) { gameplayManager.IsMove = false; newDice.RollDiceIsDone = false; } playerEndMove(); } }