public static alphaCanvas ( |
||
canvasGroup | ||
to | float | |
time | float | |
return | LTDescr, |
public IEnumerator ShowViewOfGame() { var id = LeanTween.alphaCanvas(loadingCover, 0, fadeDuration / 4).id; while (LeanTween.isTweening(id)) { yield return(new WaitForEndOfFrame()); } }
protected void HideScores() { var scoreTags = FindObjectsOfType <ScoreTag>(); foreach (var tag in scoreTags) { LeanTween.alphaCanvas(tag.GetComponentInChildren <CanvasGroup>(), 0, scoreTagAnimationDuration); } }
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); }
public void StartAlphaTween(float targetAlpha, float duration, bool ignoreTimeScale) { if (this._canvasGroup == null) { return; } LeanTween.alphaCanvas(_canvasGroup, targetAlpha, duration); }
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); }
IEnumerator DelayFadeOutCo() { float delayTime = 2; float fadeTime = 1; yield return(new WaitForSeconds(delayTime)); LeanTween.alphaCanvas(GetComponent <CanvasGroup>(), 0, fadeTime); }
/// <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); } }
/// <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); } }
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; } }
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); }); }
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); }); }
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); } }
//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); }
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); } }
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); } }
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); } }
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); }
void OnEnable() { if (!canvasGroup) { canvasGroup = GetComponent <CanvasGroup>(); } LeanTween.alphaCanvas(canvasGroup, 1, 0.2f).setOnComplete(() => canvasGroup.blocksRaycasts = true); }
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(); }
void Init() { if (charges < 1 && sp < 1) { Empty(); LeanTween.alphaCanvas(canvas, 0, fade_duration); return; } }
private IEnumerator CanvasAnimation() { PanelGroup.interactable = false; PanelGroup.blocksRaycasts = false; LeanTween.alphaCanvas(PanelGroup, 0f, 1f); yield return(new WaitForSeconds(1f)); //PanelGroup.gameObject.SetActive(false); }
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); }
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); }