Example #1
0
    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);
        }
    }
Example #2
0
 public Card DrawLocalCard()
 {
     MiddleSet.AddLatestCardFromPlayerCardSet(OwnerPlayerID);
     Cards.Peek().DrawCard();
     CmdPopAllButLocalCard();
     DecrementNumberOfCards();
     return(Cards.Pop());
 }
Example #3
0
 public void RpcPopAllButLocalCard()
 {
     if (!OwnerPlayer.isLocalPlayer)
     {
         MiddleSet.AddLatestCardFromPlayerCardSet(OwnerPlayerID);
         Cards.Pop();
         DecrementNumberOfCards();
     }
 }
Example #4
0
 private void RpcClaimMiddleCards()
 {
     MiddleSet.TransferAllToSet(OwnerPlayerID);
 }