public void MoveTo(int FakeinternalCounter) { if (DOTween.IsTweening(ContentParent)) { ContentParent.DOKill(); } float newPosX = Steps[FakeinternalCounter]; InternalCounter = FakeinternalCounter; ContentParent.DOLocalMoveX(newPosX, MoveTime).SetEase(Ease.InQuad); }
private void Update() { #if UNITY_STANDALONE || UNITY_EDITOR if (Input.GetMouseButton(0) && Player.S.GetCurrentBubble().state != BubbleState.Shooting && Input.mousePosition.y > Screen.height * MIN_TOUCH_HEIGHT && Player.S.GetCurrentBubble() && !UIHandler.S.endLevelPanelIsDisplayed && !DOTween.IsTweening(Player.S.GetCurrentBubble().transform)) { Player.S.DrawBeam(Player.S.Aim(GetCurrentWorldPosition())); } else if (Input.GetMouseButtonUp(0) && Player.S.GetCurrentBubble().state != BubbleState.Shooting && Input.mousePosition.y > Screen.height * MIN_TOUCH_HEIGHT && Player.S.GetCurrentBubble() && !UIHandler.S.endLevelPanelIsDisplayed && !DOTween.IsTweening(Player.S.GetCurrentBubble().transform)) { if (OnTouchUp != null) { OnTouchUp(); } } else if (Input.GetMouseButton(0) && Input.mousePosition.y <= Screen.height * MIN_TOUCH_HEIGHT) { Beam.S.ResetBeam(); } #elif UNITY_ANDROID || UNITY_IOS if (Input.touchCount == 1 && Player.S.GetCurrentBubble().state != BubbleState.Shooting && Input.GetTouch(0).position.y > Screen.height * MIN_TOUCH_HEIGHT && Player.S.GetCurrentBubble() && !UIHandler.S.endLevelPanelIsDisplayed && !DOTween.IsTweening(Player.S.GetCurrentBubble().transform)) { Player.S.DrawBeam(Player.S.Aim(GetCurrentWorldPosition())); if (Input.GetTouch(0).phase == TouchPhase.Ended && Player.S.GetCurrentBubble().state != BubbleState.Shooting && !DOTween.IsTweening(Player.S.GetCurrentBubble().transform)) { if (OnTouchUp != null) { OnTouchUp(); } } } else if (Input.touchCount > 0 && Input.GetTouch(0).position.y <= Screen.height * MIN_TOUCH_HEIGHT) { Beam.S.ResetBeam(); } if (Input.GetKey(KeyCode.Escape)) { Application.Quit(); } #endif }
protected override void OnDestroyEvent() { base.OnDestroyEvent(); if (DOTween.IsTweening(this)) { DOTween.Kill(this); } UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Smoke_0); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Smoke_1); UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Smoke_2); }
private void Down() { bool flag = DOTween.IsTweening(this); if (flag) { DOTween.Kill(this, false); } SoundUtils.PlaySE(this.mAudioClip_Down); this.mTexture_Main.mainTexture = this.mTexture2d_Frame_2; }
private void OnDestroy() { if (DOTween.IsTweening(this)) { DOTween.Kill(this, false); } UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture_Ship, false); UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture_LevelUp, false); UserInterfacePortManager.ReleaseUtils.Release(ref this.mWidgetThis); this.Model = null; }
public void StartState() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } DOVirtual.Float(mPanelThis.alpha, 1f, 0.3f, delegate(float alpha) { mPanelThis.alpha = alpha; }).SetId(this); }
public void HideDialog(UnityAction hideFinishCallback) { hideCallback = hideFinishCallback; if (DOTween.IsTweening(dialogPopup.transform)) { return; } Tweener.HideFinishCallback = onTweenHideComplete; Tweener.HideDialog(dialogPopup.transform, tweenTime); }
public void Flip() { if ((_isBaking || _wasBaking) && !DOTween.IsTweening(transform)) { _currentFace = (_currentFace + 1) % 2; transform.DOPunchPosition(new Vector3(0, _flipHeight, 0), 0.7f, 0); transform.DORotate(new Vector3(180, 0, 0), 0.4f, RotateMode.WorldAxisAdd); _smokeParticles.transform.rotation = Quaternion.identity; Notify(new BakingFlipEvent(this)); } }
private void OnDestroy() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } mTexture_SlotItemCard = null; mLabel_Number = null; mWidgetThis = null; mAlbumModel = null; mOnSelectedListener = null; }
public void StartState() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } DOVirtual.Float(mPanelThis.alpha, 1f, 0.3f, delegate(float alpha) { mPanelThis.alpha = alpha; }).SetId(this); mStateManager.PushState(State.MusicSelect); }
public void Show() { if (DOTween.IsTweening(UIInteriorFurnitureDetail.TweenAnimationType.ShowHide)) { DOTween.Kill(UIInteriorFurnitureDetail.TweenAnimationType.ShowHide, false); } TweenPosition tweenPosition = UITweener.Begin <TweenPosition>(base.get_gameObject(), 0.3f); tweenPosition.from = base.get_transform().get_localPosition(); tweenPosition.to = new Vector3(0f, base.get_transform().get_localPosition().y, base.get_transform().get_localPosition().z); tweenPosition.ignoreTimeScale = true; }
private void OnDestroy() { bool flag = DOTween.IsTweening(this); if (flag) { DOTween.Kill(this, false); } this.mTexture_SplayTail = null; this.mTexture_SplayTail_Delay = null; this.mTexture_SplayHead = null; }
public void OnPointerEnter(PointerEventData eventData) { if (currentSite == bigSite && !DOTween.IsTweening("ChangingPhase")) { audioSource.PlayOneShot(EnterHover); audioSource.clip = Drop; audioSource.PlayDelayed(delayedIn); DOTween.Kill("HideInfo"); transform.DOScale(currentSite.localScale * 1.1f, GameData.INTERACTIVE_TIME_DEFAULT); info.transform.DOLocalMoveY(0, GameData.ANIMATION_TIME_DEFAULT * 2).SetEase(Ease.OutBounce).SetId("ShowInfo"); } }
private void OnDestroy() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } mYouseiSwitchActionCallBack = null; mSprite_Background = null; mSprite_Thumb = null; mSpriteAnimation_Yousei = null; mSleepParticle = null; }
public void ShowBubble() { var canvasGroup = GetComponent <CanvasGroup>(); if (!DOTween.IsTweening(canvasGroup)) { canvasGroup.DOFade(1, 0.5f).OnComplete(() => { canvasGroup.DOFade(0, 0.5f).SetDelay(showDurationOnCollision); }); } }
IEnumerator Exit() { yield return(new WaitWhile(() => DOTween.IsTweening("ColumnRend" + GetInstanceID()))); if (tag == "DeadZone") { yield break; } transform.DOScale(scale, duration); rend.material.DOColor(color * arenaDeadzones.normalEmission, "_EmissionColor", duration).SetId("ColumnRend" + GetInstanceID()); }
private void OnDestroy() { if (DOTween.IsTweening(this)) { DOTween.Kill(this, false); } UserInterfacePortManager.ReleaseUtils.Release(ref this.mLabel_Message); UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture_Deck, false); UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture_Yousei, false); UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture2d_Yousei_Off, false); UserInterfacePortManager.ReleaseUtils.Release(ref this.mTexture2d_Yousei_On, false); }
public void OnPointerExit(PointerEventData eventData) { if (currentSite == bigSite && !DOTween.IsTweening("ChangingPhase")) { audioSource.PlayOneShot(ExitHover); audioSource.clip = Return; audioSource.PlayDelayed(delayedOut); DOTween.Kill("ShowInfo"); transform.DOScale(currentSite.localScale, GameData.INTERACTIVE_TIME_DEFAULT); info.transform.DOLocalMoveY(textDisplacement, GameData.ANIMATION_TIME_DEFAULT).SetEase(Ease.OutCubic).SetId("HideInfo"); } }
private void Jump() { StopExhaustParticles(); onGround = false; GetComponent <Rigidbody>().AddForce(Vector3.up * jumpSpeed, ForceMode.Impulse); deliveryGuy.PlayJumpAnimation(); if (!DOTween.IsTweening(cargoDecor)) { cargoDecor.DOLocalMoveY(cargoDecor.transform.localPosition.y + 5, 0.3f, true).SetLoops(2, LoopType.Yoyo); } SFXController.instance.PlayJumpSFX(); }
public void Show() { _Stc_R = false; if (DOTween.IsTweening(this)) { DOTween.Kill(this, complete: true); } DOVirtual.Float(mPanelThis.alpha, 1f, 0.3f, delegate(float alpha) { mPanelThis.alpha = alpha; }).SetId(this); }
/*****************************************************************************************/ protected override IEnumerator ActionLogic() { foreach (CardComponent card in GameControl.AllCardComponents.FindAll(c => c.IsExausted)) { yield return(new ExaustCardAction(card, false, withPause: false).RunNow()); } foreach (InvestigatorComponent investigator in GameControl.AllInvestigatorsInGame) { yield return(new UpdateActionsLeft(investigator, investigator.InitialActions).RunNow()); } yield return(new WaitWhile(() => DOTween.IsTweening("Exhausting"))); }
/// <summary> /// This function helper for shift some hexagons like gravity.. /// </summary> /// <returns></returns> public async UniTask Gravity() { isGravity = true; Debug.Log("Gravity Progress Started."); foreach (List <SlotController> verticalSlots in seperateSlotControllers) { int emptyCount = 0; int interactedCount = 1; foreach (SlotController slotController in verticalSlots.AsEnumerable().Reverse().ToList()) { if (slotController.GetHexagonController() == null) { emptyCount++; continue; } if (emptyCount == 0) { continue; } HexagonController hexagonController = slotController.GetHexagonController(); SlotController oldSlotController = hexagonController.GetSlotController(); SlotController targetSlotController = GetSlotControllerByCoordinate(new Coordinate(hexagonController.GetCoordinate().x, hexagonController.GetCoordinate().y + emptyCount)); if (targetSlotController == null) { continue; } oldSlotController.SetHexagonController(null); hexagonController.SetSlotController(targetSlotController); ((HexagonView)hexagonController.GetView()).DrawDefaultLayer(true, (float)interactedCount / 10); interactedCount++; } } await UniTask.WaitUntil(() => !DOTween.IsTweening(CommonTypes.HEXAGON_GRAVITY_TWEEN_KEY)); FillEmptySlots(); await UniTask.WaitUntil(() => !DOTween.IsTweening(CommonTypes.HEXAGON_GRAVITY_TWEEN_KEY)); await CheckHexagons(hexagonControllers); await CheckGameOver(); isGravity = false; Debug.Log("Gravity Progress Completed."); }
public bool PositionAbsMove(Vector3 pos) { if (DOTween.IsTweening("isAbsMove") == false) { IsControl = false; this.transform.DOMove(pos, 0.75f) .SetEase(Ease.Linear) .OnComplete(() => { IsControl = true; }) .SetId("isAbsMove"); return(true); } return(false); }
private void OnDestroy() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } mOnCompleteListener = null; mesh = null; mat = null; outline = null; outMesh = null; outMat = null; }
public override void DoAnimation() { if (!DOTween.IsTweening(transform)) { Sequence mySequence = DOTween.Sequence(); mySequence.Append(transform.DOScale(1.5f, 1.0f)); mySequence.Append(transform.DOScale(0.1f, 0.8f)); mySequence.Insert(0, transform.DOLocalRotate(new Vector3(transform.localEulerAngles.x, 1080, transform.localEulerAngles.z), 1.8f, RotateMode.LocalAxisAdd).SetEase(Ease.OutSine)); mySequence.Insert(0, transform.DOLocalMove(Vector3.zero, 0.4f)); mySequence.OnComplete(Disappear); } }
public void Update() { if (!DOTween.IsTweening(notification.transform) && notificationQueue.Count > 0) { NotificationItem item = notificationQueue[0]; notificationQueue.RemoveAt(0); notification.transform.Find("Title").GetComponent <Text>().text = item.title; notification.transform.Find("Text").GetComponent <Text>().text = item.text; notification.transform.Find("Img").GetComponent <Image>().sprite = item.image; notification.transform.DOMoveY(Screen.height - 85, 0.5f, false).SetEase(Ease.InOutQuad).OnComplete(PauseCallback); } }
/*****************************************************************************************/ protected override IEnumerator ActionLogic() { chooseMultiCast = new ChooseMultiCast(ListCardsEffect, isOptionalChoice: isOptionalChoice); yield return(chooseMultiCast.RunNow()); yield return(new WaitWhile(() => DOTween.IsTweening("MoveFast"))); if (chooseMultiCast.IsCancel) { IsCancel = true; } yield return(Destroying()); }
private void FinishAnimation() { if (_animationCoroutine != null) { if (DOTween.IsTweening(_animationId)) { DOTween.Complete(_animationId); } StopCoroutine(_animationCoroutine); _animationCoroutine = null; } }
private Tween GenerateTweenClose() { if (DOTween.IsTweening(this)) { DOTween.Kill(this, complete: true); } SingletonMonoBehaviour <SoundManager> .Instance.StopVoice(); return(DOVirtual.Float(mPanelThis.alpha, 0f, 0.3f, delegate(float alpha) { mPanelThis.alpha = alpha; }).SetId(this)); }
void IPointerExitHandler.OnPointerExit(PointerEventData eventData) { if (eventData.dragging) { return; } if (DOTween.IsTweening(InvestigatorSelectorView.MOVE_ANIMATION)) { return; } audioInteractable.HoverOffSound(); Card.DOScale(1f, ViewValues.STANDARD_TIME).SetId(HOVEROFF); }