public void Show()
 {
     gameObject.SetActive(true);
     active = true;
     ItemCanvasGroup.DOComplete();
     ItemCanvasGroup.DOFade(1, 0.15f);
 }
示例#2
0
        private void OnDisable()
        {
            if (GameManager.IsApplicationQuitting)
            {
                return;
            }

            GameManager.PauseGame(false);
            canvasGroupComponent.DOComplete();
        }
示例#3
0
    private IEnumerator CinematicEnd(float time)
    {
        yield return(new WaitForSeconds(time));

        canvas.DOComplete();
        gameObject.SetActive(false);
        Cursor.visible = true;
        Camera.main.GetComponent <CameraFollow>().ResetCameraDiff();
        timer.InitiateTime(100f);   // 1 minute and 40 seconds
        timer.SetPauseTimer(false); // set active
        timer.ShowTimer(true, true, 1f);
        waveManager.gameObject.SetActive(true);
    }
示例#4
0
    public void ShowAim(bool state)
    {
        aim.DOComplete();
        ringSlider.DOComplete();

        float alpha   = state ? 1 : 0;
        float fill    = state ? 1 : 0;
        float endFill = state ? 0 : 1;
        float time    = state ? 8 : 0;

        aim.alpha             = alpha;
        ringSlider.fillAmount = fill;
        ringSlider.DOFillAmount(endFill, time);
    }
示例#5
0
    public void Animate()
    {
        canvas.DOComplete();
        rect.DOComplete();
        transform.DOComplete();

        canvas.alpha   = 0;
        rect.sizeDelta = new Vector2(500, 500);
        transform.GetChild(0).localScale = Vector3.one * 10;

        rect.DOSizeDelta(new Vector2(100, 100), .2f).SetEase(Ease.InOutSine);
        transform.GetChild(0).DOScale(1, .4f);
        canvas.DOFade(1, .5f);
    }
示例#6
0
    public void SetVisible(bool isVisible)
    {
        choiceButtonGroup.DOComplete();

        if (isVisible)
        {
            choiceButtonGroup.DOFade(1.0f, 0.5f).SetEase(Ease.OutSine);
        }
        else
        {
            choiceButtonGroup.DOFade(0.0f, 0.1f).SetEase(Ease.InSine);
        }

        button.interactable = isVisible;
    }
示例#7
0
    public void SetVisible(bool isVisible)
    {
        eventPanelGroup.DOComplete();

        if (isVisible)
        {
            eventPanelGroup.DOFade(1.0f, 0.3f).SetEase(Ease.OutSine);
        }
        else
        {
            eventPanelGroup.DOFade(0.0f, 0.1f).SetEase(Ease.InSine);

            foreach (var button in choiceButtons)
            {
                button.ClearChoice();
            }
        }
    }
示例#8
0
        public void ToggleSelected(bool selectedValue)
        {
            if (IsSelected != selectedValue)
            {
                canvasGroup.DOComplete();
                if (selectedValue)
                {
                    canvasGroup.DOFade(1f, 0.6f);
                }
                else
                {
                    canvasGroup.DOFade(0.6f, 0.6f);
                }

                IsSelected = selectedValue;

                if (ContentTabSelectToggleEvent != null)
                {
                    ContentTabSelectToggleEvent(this);
                }
            }
        }
示例#9
0
 public static void Show(CanvasGroup cg)
 {
     cg.DOComplete();
     cg.DOFade(1f, AnimationSpeedDefault);
     cg.blocksRaycasts = true;
 }
示例#10
0
 public static void Hide(CanvasGroup cg)
 {
     cg.DOComplete();
     cg.DOFade(0f, AnimationSpeedDefault);
     cg.blocksRaycasts = false;
 }
示例#11
0
    private IEnumerator <float> _EnumeratorMessage(IList <string> message)
    {
        _IsShowingMessage = true;

        while (ApplicationManager.Instance.IsDialogEnable)
        {
            yield return(Timing.WaitForOneFrame);
        }

        yield return(Timing.WaitForSeconds(0.5f));

        this.PostActionEvent(ActionEnums.ActionID.SetStateInteractUI, false);
        this.PostActionEvent(ActionEnums.ActionID.SetStateInteractGame, false);

        if (_TransformBoardMessage.gameObject.activeSelf == false)
        {
            _TransformBoardMessage.gameObject.SetActive(true);
        }

        _PanelMaskMessage.DOComplete();
        _PanelMaskMessage.DOFade(1, Durations.DurationFade);

        _PanelMaskMessage.alpha = 0;

        yield return(Timing.WaitForSeconds(Durations.DurationFade));

        if (_TransformCars.gameObject.activeSelf == false)
        {
            _TransformCars.DOComplete();
            _TransformCars.DOScale(1, Durations.DurationScale).SetEase(Ease.OutBack);

            _TransformCars.localScale = Vector.Vector3Zero;
            _TransformCars.gameObject.SetActive(true);

            yield return(Timing.WaitForSeconds(1f));
        }

        this.PlayAudioSound(AudioEnums.SoundId.ItemTouchTalk);

        if (_TransformMessagePanel.gameObject.activeSelf == false)
        {
            _TransformMessagePanel.localScale = Vector.Vector3Zero;
            _TransformMessagePanel.gameObject.SetActive(true);
        }

        for (int i = 0; i < message.Count; i++)
        {
            _TransformMessagePanel.DOComplete();
            _TransformMessagePanel.DOScale(1, Durations.DurationScale).SetEase(Ease.OutBack);

            _TextMessageDisplay.text = message[i];

            this.PlayAudioSound(AudioEnums.SoundId.ItemTouchTalk);

            yield return(Timing.WaitForSeconds(0.5f));

            IsTapAnyWhere = false;

            while (!IsTapAnyWhere)
            {
                yield return(Timing.WaitForOneFrame);
            }

            _TransformMessagePanel.DOComplete();
            _TransformMessagePanel.DOScale(0, Durations.DurationScale).SetEase(Ease.InBack);

            yield return(Timing.WaitForSeconds(Durations.DurationScale));
        }

        _TransformBoardMessage.DOScale(0, Durations.DurationScale).SetEase(Ease.InBack);
        _TransformBoardMessage.DOScale(0, Durations.DurationScale).SetEase(Ease.InBack);

        yield return(Timing.WaitForSeconds(Durations.DurationScale));

        if (_TransformCars.gameObject.activeSelf)
        {
            _TransformCars.gameObject.SetActive(false);
        }

        if (_TransformMessagePanel.gameObject.activeSelf)
        {
            _TransformMessagePanel.gameObject.SetActive(false);
        }

        _PanelMaskMessage.DOFade(0, Durations.DurationScale);

        yield return(Timing.WaitForSeconds(Durations.DurationScale));

        if (_TransformBoardMessage.gameObject.activeSelf == true)
        {
            _TransformBoardMessage.gameObject.SetActive(false);
        }

        this.PostActionEvent(ActionEnums.ActionID.SetStateInteractUI, true);
        this.PostActionEvent(ActionEnums.ActionID.SetStateInteractGame, true);

        _TextMessageDisplay.text = string.Empty;
        _IsShowingMessage        = false;
    }