IEnumerator StartMiddleObsoleteTimer(float seconds, CardTypes type, int PlayerID) { float InitialSeconds = seconds; bool Shaked = false; while (seconds > 0) { seconds -= Time.deltaTime; if (seconds <= InitialSeconds / 1.5f) { if (!Shaked) { MiddleSet.ShakeMiddleSet(InitialSeconds / 1.5f); Shaked = true; } } yield return(new WaitForEndOfFrame()); } if (propertiesObject.SameTypeInMiddle) { //The players failed to click the middle within time, continuing the game. Debug.Log("The player has failed to middle click, playing the card again. FOR FOCKS SAKE GAME PLEASE DONT BREAK FOR FOCKS SAKE"); Server.PlayedCard(PlayerID, type, false); } }
public Card DrawLocalCard() { MiddleSet.AddLatestCardFromPlayerCardSet(OwnerPlayerID); Cards.Peek().DrawCard(); CmdPopAllButLocalCard(); DecrementNumberOfCards(); return(Cards.Pop()); }
public void RpcPopAllButLocalCard() { if (!OwnerPlayer.isLocalPlayer) { MiddleSet.AddLatestCardFromPlayerCardSet(OwnerPlayerID); Cards.Pop(); DecrementNumberOfCards(); } }
private void RpcClaimMiddleCards() { MiddleSet.TransferAllToSet(OwnerPlayerID); }