private void ListOptionClick(int index, int selIndex)
    {
        UIManager.Instance.soundManager.PlaySound("PlayLowToneButton");

        if (selectedIndex == -1)
        {
            // When user selects a tire, show submit button (first time only)
            root.UpdateSubmitButton("SUBMIT");
            root.submitButton.GetComponent <Button>().onClick.AddListener(delegate { OnListOptionSubmitButtonClick(); });

            if (root.isGamePadEnabled)
            {
                root.submitButton.GetComponent <Button>().Select();
            }
        }

        selectedIndex = selIndex;

        root.FlickerAnimation(optionDataList[index].transform.GetComponent <RectTransform>(), 0.15f, 4, false);

        // Show ring around selected tire (by using its disabledSprite)
        for (int i = 0; i < optionList.Length; i++)
        {
            optionList[i].GetComponent <Button>().interactable = (i != index);
        }
    }
Пример #2
0
    private void TransitionInCompleted()
    {
        root.UpdateSubmitButton("GOT IT!");
        root.submitButton.GetComponent <Button>().onClick.AddListener(OnGotItButtonClick);

        if (root.isGamePadEnabled)
        {
            root.submitButton.GetComponent <Button>().Select();
        }
    }
Пример #3
0
    private void TransitionInCompleted()
    {
        LeanTween.alpha(billboardImage.GetComponent <RectTransform>(), 1f, 0.5f)
        .setEase(LeanTweenType.easeOutQuad)
        .setFrom(0)
        .setDelay(0f);

        LeanTween.alpha(selectedTireImage.GetComponent <RectTransform>(), 1f, 0.5f)
        .setEase(LeanTweenType.easeOutQuad)
        .setFrom(0)
        .setDelay(0.25f)
        .setOnComplete(() => {
            // raceTrackBanner.GetComponent<Image>().color = root.elementShowColor;
            // raceTrackBannerGlow.GetComponent<Image>().color = root.elementShowColor;
            // trackRecordCircle.GetComponent<Image>().color = root.elementShowColor;
            // trackRecordText.GetComponent<Text>().color = root.elementShowColor;

            LeanTween.alpha(raceTrackBannerGlow, 1f, 0.5f)
            .setEase(LeanTweenType.easeInQuad)
            .setFrom(0)
            .setDelay(0.0f);

            LeanTween.alpha(raceTrackBannerGlow, 0f, 0.75f)
            .setEase(LeanTweenType.easeOutSine)
            .setFrom(1)
            .setDelay(0.55f);

            LeanTween.alpha(raceTrackBanner, 1f, 0.75f)
            .setEase(LeanTweenType.easeOutSine)
            .setFrom(0)
            .setDelay(0.55f);

            LeanTween.alpha(trackRecordCircle, 1f, 0.75f)
            .setEase(LeanTweenType.easeOutSine)
            .setFrom(0)
            .setDelay(0.5f);

            LeanTween.alpha(trackRecordText, 1f, 0.75f)
            .setEase(LeanTweenType.easeOutSine)
            .setFrom(0)
            .setDelay(0.5f);

            root.UpdateSubmitButton("LET'S ROLL");
            root.submitButton.GetComponent <Button>().onClick.AddListener(OnLetsRollButtonClick);
        });
    }