Exemplo n.º 1
0
    public void ToggleOff()
    {
        toggled = false;
        button.selectedColor = TOGGLE_OFF;
        button.passiveColor  = LIGHT_PASSIVE;
        button.hoveringColor = LIGHT_HOVERING;

        text.text     = "Contribute";
        text.fontSize = defaultFontSize;
        text.color    = Color.black;

        button.SetState(1);

        Tippies.FadeDestroyTippy("Please Lift Headset");
    }
    public void ToggleOff()
    {
        toggled = false;

        flexButtonComponent.selectedColor = ToggleOffColor;
        flexButtonComponent.passiveColor  = LightPassiveColor;
        flexButtonComponent.hoveringColor = LightHoveringColor;

        spriteRenderer.sprite = defaultSprite;
        labelText.text        = "Create\nTournament";

        flexButtonComponent.SetState(1);

        Tippies.FadeDestroyTippy("Please Lift Headset");
    }
    public void ToggleOff()
    {
        toggled = false;
        button.selectedColor = TOGGLE_OFF;
        button.passiveColor  = LIGHT_PASSIVE;
        button.hoveringColor = LIGHT_HOVERING;

        text.fontSize = defaultFontSize;
        text.color    = Color.black;

        button.SetState(1);

        switch (tournamentMenu.actionState)
        {
        case TournamentMenu.ActionState.NoAction:
            break;

        case TournamentMenu.ActionState.Contribute:
            canvasSubmitMenu.gameObject.SetActive(false);
            text.text = "Contribute";
            Tippies.FadeDestroyTippy("Please Lift Headset");
            break;

        case TournamentMenu.ActionState.SelectWinners:
            text.text = "Select Winners";
            foreach (KeyValuePair <string, GameObject> pair in tournamentMenu.submissionsPanel.selected)
            {
                var submissionContainer = pair.Value.GetComponent <SubmissionContainer>();
                submissionContainer.distributionPicker.Toggle(false);
            }
            if (tournamentMenu == null || tournamentMenu.submissionsPanel == null)
            {
                Debug.Log("here");
            }
            tournamentMenu.submissionsPanel.SwitchToSingleSelect();
            tournamentMenu.continueButton.gameObject.SetActive(false);
            break;

        case TournamentMenu.ActionState.ManageTournament:
            text.text = "Manage";
            TournamentMenu.Instance.manageTournamentMenu.GetComponent <AnimationHandler>().CloseMenu();
            break;
        }
    }