Exemple #1
0
    private void Confirm()
    {
        if (moveTween.IsPlaying())
        {
            return;
        }

        TeamNumber team = currentPos < 1 ? TeamNumber.ONE : TeamNumber.TWO;

        if (PlayerToTeamMap.AssignPlayerToTeam(playerNumber, team))
        {
            confirmed          = true;
            leftArrow.enabled  = false;
            rightArrow.enabled = false;
            playerTextElement.DOShakeAnchorPos(confirmTime, confirmShakeStrength, confirmShakeVibrato);
            playerTextElement.DOScale(1.5f, confirmTime);
        }
        else
        {
            Sequence failConfirm = DOTween.Sequence();
            failConfirm.Append(playerTextElement.DOScale(1.2f, confirmTime / 2));
            failConfirm.Append(playerTextElement.DOScale(1f, confirmTime / 2));
        }
    }