alphaCanvas() публичный статический Метод

public static alphaCanvas ( CanvasGroup canvasGroup, float to, float time ) : LTDescr,
canvasGroup UnityEngine.CanvasGroup
to float
time float
Результат LTDescr,
        public IEnumerator ShowViewOfGame()
        {
            var id = LeanTween.alphaCanvas(loadingCover, 0, fadeDuration / 4).id;

            while (LeanTween.isTweening(id))
            {
                yield return(new WaitForEndOfFrame());
            }
        }
Пример #2
0
    protected void HideScores()
    {
        var scoreTags = FindObjectsOfType <ScoreTag>();

        foreach (var tag in scoreTags)
        {
            LeanTween.alphaCanvas(tag.GetComponentInChildren <CanvasGroup>(), 0, scoreTagAnimationDuration);
        }
    }
Пример #3
0
    IEnumerator DoActionQuickHide()
    {
        bool _tmpFinished = false;

        LeanTween.alphaCanvas(myCanvasGroup, 0f, timeHideScreen).setEase(LeanTweenType.easeInBack).setOnComplete(() => {
            _tmpFinished = true;
        });
        yield return(new WaitUntil(() => _tmpFinished));
    }
    // When fading in UI, position is relative to player's
    public void FadeIn()
    {
        gameObject.SetActive(true);
        updatePositionAndRotation();

        CanvasGroup canvGroup = gameObject.GetComponent <CanvasGroup>();

        LeanTween.alphaCanvas(canvGroup, 1f, fadeInDuration).setEase(LeanTweenType.easeInQuad).setDelay(fadeInDelay);
    }
Пример #5
0
        public void StartAlphaTween(float targetAlpha, float duration, bool ignoreTimeScale)
        {
            if (this._canvasGroup == null)
            {
                return;
            }

            LeanTween.alphaCanvas(_canvasGroup, targetAlpha, duration);
        }
Пример #6
0
 public void HideBtns()
 {
     for (int i = 0; i < btns.Length; i++)
     {
         btns[i].onClick.RemoveAllListeners();
     }
     LeanTween.alphaCanvas(cg, 0, 0.2f);
     LeanTween.moveY(rectTrans, -360 * 2, 0.2f);
 }
Пример #7
0
    IEnumerator DelayFadeOutCo()
    {
        float delayTime = 2;
        float fadeTime  = 1;

        yield return(new WaitForSeconds(delayTime));

        LeanTween.alphaCanvas(GetComponent <CanvasGroup>(), 0, fadeTime);
    }
Пример #8
0
 /// <summary>
 /// 리스트 위치를 정렬한다
 /// </summary>
 public void RefreshDistractorPosition()
 {
     for (int i = 0; i < _distactorList.Count; i++)
     {
         _distactorList[i].transform.position = new Vector2(540, -((80 * _distactorList.Count) / 2) + (80 / 2) + 80 * i + 410);
         LeanTween.move(_distactorList[i].gameObject, new Vector2(640, -((80 * _distactorList.Count) / 2) + (80 / 2) + 80 * i + 410), 0.5f + i * 0.1f).setEase(LeanTweenType.easeInOutSine);
         LeanTween.alphaCanvas(_distactorList[i].GetComponent <CanvasGroup>(), 1, 0.5f + i * 0.1f).setEase(LeanTweenType.easeInOutSine);
     }
 }
Пример #9
0
 /// <summary>
 /// 화면 상에서 지움
 /// </summary>
 public void VanishDistractorButton(float time = 0.5f)
 {
     CancelInvoke();
     for (int i = 0; i < _distactorList.Count; i++)
     {
         LeanTween.move(_distactorList[i].gameObject, new Vector2(540, -((80 * _distactorList.Count) / 2) + (80 / 2) + 80 * i + 410), time + i * 0.1f).setEase(LeanTweenType.easeInOutSine);
         LeanTween.alphaCanvas(_distactorList[i].GetComponent <CanvasGroup>(), 0, time + i * 0.1f).setEase(LeanTweenType.easeInOutSine);
     }
 }
Пример #10
0
    private void UpdateGame()
    {
        switch (_taixiu.CurrentState)
        {
        case TaiXiuGameState.Betting:

            //_keyboard.SetTextView(currentGate == 0 ? txtXiuInput : txtTaiInput);

            vkCountDown.gameObject.SetActive(true);
            vkCountDown.SetSeconds(_taixiu.Ellapsed);
            vkCountDown.StartCoundown(_taixiu.Ellapsed);

            if (_taixiu.Ellapsed > 1f)
            {
                StartCoroutine(WaitBetting());
            }

            UpdateGameInfo();
            break;

        case TaiXiuGameState.ShowResult:
            animContentBottom.SetTrigger("Idle");

            dragonAlpha.alpha = 1f;
            LeanTween.alphaCanvas(dragonAlpha, 0f, 1f);

            UpdateGameInfo();
            if (_taixiu.GetPoint() > 0)
            {
                if (_taixiu.Ellapsed > 1f)
                {
                    vkCountDown.gameObject.SetActive(false);
                    StartCoroutine(WaitShowResult(_taixiu.Ellapsed));
                }
            }
            break;

        case TaiXiuGameState.PrepareNewRound:
            ClearUI();
            _taixiu.StartNewGame();
            ShowNotify("Bắt đầu phiên mới");
            vkCountDown.gameObject.SetActive(true);
            vkCountDown.SetSeconds(0);

            SendRequest.SendCheckTaiXiuEvent(_APIEVENT);
            break;
            //            case TaiXiuGameState.EndBetting:
            //                ShowNotify("Trả tiền cân kèo");
            //                UpdateGameInfo();

            //                txtTaiInput.text = "0";
            //                txtXiuInput.text = "0";

            //                UpdateCanKeo();
            //                break;
        }
    }
Пример #11
0
 private void SkipLore()
 {
     skipTutorial.onClick.RemoveListener(() => SkipLore());
     StopAllCoroutines();
     startedTutorial = true;
     openingMusic.Stop();
     LeanTween.alphaCanvas(blackPanel, 0f, 0.5f);
     tutorial.StartTutorial();
 }
 private void HandleFinishLoadEvent()
 {
     LeanTween.cancel(gameObject);
     LeanTween.alphaCanvas(group, 0f, fadeOutDuration)
     .setEaseOutBack()
     .setOnComplete(() => {
         cameraObject?.SetActive(false);
     });
 }
Пример #13
0
 private void BtnTakePictureClick()
 {
     // audioSource.PlayOneShot(ClipButton);
     SoundManager.Instance.PlayClip(ClipButton);
     LeanTween.alphaCanvas(gameObject.GetComponent <CanvasGroup>(), 0, 0.3f).setOnComplete(() => {
         this.gameObject.SetActive(false);
         this.TakePictureScreen.SetActive(true);
     });
 }
Пример #14
0
 public override void Init()
 {
     base.Init();
     for (int i = 0; i < renderers.Length; i++)
     {
         //LeanTween.alpha(renderers[i].gameObject, 0, 0);
         LeanTween.alphaCanvas(renderers[i], 0, 0);
     }
 }
Пример #15
0
 //public void FadeOutToLevel(int levelIndex)
 public void FadeOutToLevel(GameObject Menu)
 {
     MenuScene = Menu;
     //levelToLoad = levelIndex;
     //LeanTween.alphaCanvas(canvasGroup, to: 1, fadetime).setOnComplete(OnFadeComplete);
     LeanTween.alphaCanvas(canvasGroup, to: 1, fadetime);
     Invoke("FadeInToLevel", fadetime);
     Invoke("ShowMenu", fadetime);
 }
Пример #16
0
 public void Hide()
 {
     LeanTween.delayedCall(gameObject, 0.21F, () => gameObject.SetActive(false));
     LeanTween.scale(gameObject.GetComponent <RectTransform>(), new Vector3(0.2F, 0.2F, 0.2F), 0.075F)
     .setDelay(0.1F);
     LeanTween.alphaCanvas(GetComponent <CanvasGroup>(), 0, 0.1F)
     .setDelay(0.1F)
     .setEaseInOutCubic();
 }
 public void Resume()
 {
     if (!inOption)
     {
         Time.timeScale = 1f;
         LeanTween.alphaCanvas(this.GetComponent <CanvasGroup>(), 0f, 0.2f);
         Destroy(this.gameObject, 0.2f);
     }
 }
 public void Show()
 {
     if (!UiCanvasGroup.Instance.visible && active)
     {
         LeanTween.alphaCanvas(canvgroup, 1f, 0.3f);
         LeanTween.scale(transform.GetComponent <RectTransform> (), new Vector3(1f, 1f, 1f), 0.3f);
         LeanTween.color(SettingsButton, normalColorButton, 0.3f);
     }
 }
Пример #19
0
    public void TemporarilyHide()
    {
        //	LeanTween.alphaCanvas(canvGroup, 0f, 0.3f).setOnComplete(DeactivateMenus);

        LeanTween.alphaCanvas(canvGroup, 0f, 0.3f).setOnComplete(DeactivateMenus);
        LeanTween.alphaCanvas(MenuBG, 0f, 0.3f);

        visible = false;
    }
 public void Hide()
 {
     if (active)
     {
         LeanTween.alphaCanvas(canvgroup, 0.4f, 0.3f);
         LeanTween.scale(transform.GetComponent <RectTransform>(), new Vector3(0.85f, 0.85f, 0.85f), 0.3f);
         LeanTween.color(SettingsButton, inactiveColorButton, 0.3f);
     }
 }
Пример #21
0
 void SetCanvasEnabled(bool enabled, int leanId)
 {
     LeanTween.cancel(ids[leanId]);
     canvases[leanId].gameObject.SetActive(true);
     ids[leanId] = LeanTween.alphaCanvas(canvases[leanId], enabled?1:0, .03f).setOnComplete(() =>
     {
         canvases[leanId].gameObject.SetActive(enabled);
     }).id;
 }
 /// <summary>
 /// Trae a la Pantalla el Último Panel.
 /// </summary>
 public void ShowUpLastPanel()
 {
     if (interfaceDepth >= 1)
     {
         GameObject obj = GetLastActivePanel();
         obj.SetActive(true);
         LeanTween.alphaCanvas(obj.GetComponent <CanvasGroup>(), 1f, 0.2f);
     }
 }
Пример #23
0
    void Start()
    {
        var seq = LeanTween.sequence();

        seq.append(1f);
        seq.append(LeanTween.scale(rectTransformDialog, Vector3.one, 1.7f).setEase(LeanTweenType.easeOutElastic));

        LeanTween.alphaCanvas(canvasGroupBG, 1, 0.5f);
    }
Пример #24
0
        void OnEnable()
        {
            if (!canvasGroup)
            {
                canvasGroup = GetComponent <CanvasGroup>();
            }

            LeanTween.alphaCanvas(canvasGroup, 1, 0.2f).setOnComplete(() => canvasGroup.blocksRaycasts = true);
        }
Пример #25
0
        public IEnumerator WaitAndActive(float time)
        {
            yield return(new WaitForSeconds(time));

            GetComponent <CanvasGroup>().interactable = true;
            LeanTween.alphaCanvas(GetComponent <CanvasGroup>(), 1, 0.1F)
            .setDelay(0.1F)
            .setEaseInOutCubic();
        }
Пример #26
0
 void Init()
 {
     if (charges < 1 && sp < 1)
     {
         Empty();
         LeanTween.alphaCanvas(canvas, 0, fade_duration);
         return;
     }
 }
Пример #27
0
    private IEnumerator CanvasAnimation()
    {
        PanelGroup.interactable   = false;
        PanelGroup.blocksRaycasts = false;

        LeanTween.alphaCanvas(PanelGroup, 0f, 1f);
        yield return(new WaitForSeconds(1f));
        //PanelGroup.gameObject.SetActive(false);
    }
Пример #28
0
 private void buttonFunctionPanel2(Button b)
 {
     Subtitulo.text = "Lo segundo que vas a hacer:";
     GameStatus.Instance.playerActions.Actions = "Ha seleccionado" + b.GetComponentInChildren <Text>().text;
     LeanTween.alphaCanvas(p2.GetComponent <CanvasGroup>(), 0, 0.25f);
     p2.SetActive(false);
     p3.SetActive(true);
     LeanTween.alphaCanvas(p3.GetComponent <CanvasGroup>(), 1, 0.45f);
 }
        public IEnumerator ShowPopup(float gainedExperience)
        {
            text.text = "Experience + " + gainedExperience;

            experiencePopupCanvas.alpha = 1;
            yield return(new WaitForSeconds(3f));

            LeanTween.alphaCanvas(experiencePopupCanvas, 0, 0.5f);
        }
Пример #30
0
    IEnumerator StartWinMenu()
    {
        LeanTween.moveX(transictionLeft, -12.03f, 1f);
        LeanTween.moveX(transictionRight, 20.30f, 1f);
        yield return(new WaitForSeconds(1f));

        LeanTween.alphaCanvas(buttonMenu, 1f, 1f);
        LeanTween.alphaCanvas(buttonExit, 1f, 1f);
        LeanTween.alphaCanvas(msg, 1f, 1f);
    }