コード例 #1
0
    public void OnCardPressed(UICard cardUi)
    {
        if (selectedCardUi != null)
        {
            selectedCardUi.UnHighlight();
        }

        selectedCardUi = cardUi;
        cardUi.Highlight();

        timerSpeedMod = GameSettings.Instance.CardSelectTimerSpeedUpModifier;

        AudioManager.PlaySFX("ui-select");

        /*Card lowestCard = null;
         * float lowestScore = float.MaxValue;
         *
         * // Get the lowest card score to add to the dictators score.
         * for (int i = 0; i < cardUis.Length; i++)
         * {
         *      if (cardUis[i].cardIndex != cardUi.cardIndex)
         *      {
         *              Card card = currentCards[cardUis[i].cardIndex];
         *              if (card.value < lowestScore)
         *              {
         *                      lowestScore = card.value;
         *                      lowestCard = card;
         *              }
         *      }
         * }
         * Debug.Log("Update dictator " + lowestCard.idealType.ToString() + " " + lowestCard.value);
         * dictator.Ideals.AddToIdealValue(lowestCard.idealType, lowestCard.value);*/
    }