public void SetDrawingMode(bool state) { Cursor.lockState = state ? CursorLockMode.None : CursorLockMode.Locked; if (state == true) { Camera.main.cullingMask &= ~(1 << LayerMask.NameToLayer("Default")); Camera.main.cullingMask &= ~(1 << LayerMask.NameToLayer("Interactables")); //brush.GetChild(0).localPosition.Set(brush.GetChild(0).localPosition.x, 0.17f, brush.GetChild(0).localPosition.z); brush.GetChild(0).DOLocalMoveY(0.17f, .3f).SetUpdate(true).From(); } else { Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("Default"); Camera.main.cullingMask |= 1 << LayerMask.NameToLayer("Interactables"); } isDrawing = state; //determine if time is running or not Time.timeScale = isDrawing ? 0 : 1; //determine if the freelook camera is active freeLook.enabled = !state; drawingRenderer.enabled = state; drawingRenderer.transform.GetChild(0).gameObject.SetActive(state); brushCamera.gameObject.SetActive(state); //effects float effectAmount = isDrawing ? 1 : 0; drawingRenderer.transform.DOLocalRotate(new Vector3(isDrawing ? 60 : 90, 180, 0), .5f, RotateMode.Fast).SetUpdate(true); DOVirtual.Float(grainVolume.weight, effectAmount, .5f, (x) => grainVolume.weight = x).SetUpdate(true); drawingRenderer.material.DOFloat(effectAmount, "SepiaAmount", .5f).SetUpdate(true); if (state == false) { FindObjectOfType <Demo>().TryRecognize(); } }
private void SetTime() { var timeRemaining = (float)_time.Minutes * 60 + _time.Seconds; UpdateTimer(); if (timeRemaining < 0) { var timeContainer = new TimeContainer(); OnTimeChange?.Invoke(timeContainer); OnFinish?.Invoke(); } DOVirtual.DelayedCall(1, UpdateTimer).SetLoops((int)timeRemaining + 1); void UpdateTimer() { // var fromMinutes = TimeSpan.FromMinutes(timeRemaining); int minutes = Mathf.FloorToInt(timeRemaining / 60); int seconds = Mathf.FloorToInt(timeRemaining % 60); var timeContainer = new TimeContainer { Minutes = minutes, Seconds = seconds }; OnTimeChange?.Invoke(timeContainer); if (timeRemaining <= 0) { OnFinish?.Invoke(); } timeRemaining -= 1; } }
public void PlayerTurnEnded(List <Vector2> movements, int ballId) { lastTurnMoves = movements; lastTurnBallId = ballId; Cell cell = modelGrid.GetCellFromModel((int)movements[movements.Count - 1].x, (int)movements[movements.Count - 1].y); bool justWon = Utils.CheckWin(modelGrid, cell, false); if (justWon || isEqualityTurn) { if (justWon) { DOVirtual.DelayedCall(timeBeforeVictoryAnimation, PlayVictoryAnimation); //SendLastTurnData(); //AlreadySentLastTurnData = true; } if (!isEqualityTurn && (PlayerManager.Instance.Player1.NbOfTurn != PlayerManager.Instance.Player2.NbOfTurn)) { isEqualityTurn = true; } else { EndGame(justWon); return; } } if (PlayerManager.Instance.GetPlayer(BallColor.Black).NbOfTurn == 10 && PlayerManager.Instance.GetPlayer(BallColor.White).NbOfTurn == 10 && isPlayingTutorial) { OnPhase2Begin(); return; } if (!justWon && !isEqualityTurn) { NextTurn(); } }
public void WarpStrike() { GameObject clone = Instantiate(gameObject, transform.position, transform.rotation); Destroy(clone.GetComponent <Animator>()); Destroy(clone.GetComponent <WarpController>().sword.gameObject); Destroy(clone.GetComponent <ThirdPersonController>()); Destroy(clone.GetComponent <WarpController>()); Destroy(clone.GetComponent <CharacterController>()); SkinnedMeshRenderer[] cloneSkinMeshList = clone.GetComponentsInChildren <SkinnedMeshRenderer>(); foreach (SkinnedMeshRenderer smr in cloneSkinMeshList) { smr.material = glowMaterial; smr.material.DOFloat(1.2f, "AlphaThreshold", 4f).OnComplete(() => Destroy(clone)); } ShowBody(false); anim.speed = 0f; transform.DOMove(target.position, warpDuration).SetEase(Ease.InExpo).OnComplete(() => FinishWarpStrike()); sword.parent = null; sword.DOMove(target.position + targetOffset, warpDuration / 1.2f); whiteTrail.Play(); blueTrail.Play(); //Motion Blur if (enableMotionBlur) { SetMotionBlur(1f); } //Lens Distortion if (enableLensDistortion) { DOVirtual.Float(0f, -0.5f, lensDistortionDur, SetLensDitortionIntensity); DOVirtual.Float(1f, 1.5f, lensDistortionDur, SetLensDitortionScale); } }
void Awake() { restartButton.OnClickAsObservable() .Subscribe(_ => OnRestart()); tweetButton.OnClickAsObservable().Subscribe(_ => { Tweet(tweetText.Replace("[score]", scoreCounter.Score.Value.ToString())); }); rankingButton.OnClickAsObservable().Subscribe(_ => { Blink(); DOVirtual.DelayedCall(0.5f, () => { BG.gameObject.SetActive(false); scoreViewBody.gameObject.SetActive(false); rankingButton.gameObject.SetActive(false); tweetButton.gameObject.SetActive(false); restartButton.gameObject.SetActive(false); dead.gameObject.SetActive(false); gameObject.SetActive(false); ranking.Enter(scoreCounter.Score.Value); ranking.IsActive.Where(active => !active).Take(1) .Subscribe(__ => { BG.gameObject.SetActive(true); scoreViewBody.gameObject.SetActive(true); rankingButton.gameObject.SetActive(true); tweetButton.gameObject.SetActive(true); restartButton.gameObject.SetActive(true); dead.gameObject.SetActive(true); dead.Play("dead_loop", 0, 0); gameObject.SetActive(true); }); }); }); }
public void DoAnimationIn(Action callback) { gameObject.SetActive(true); canvasManager._AnimationTransitionInStart(); Color c = cam.backgroundColor; leftImage.color = c; rightImage.color = c; var posL = leftImage.rectTransform.anchoredPosition; posL.x = -ratio * Screen.width / divide; leftImage.rectTransform.anchoredPosition = posL; var posR = rightImage.rectTransform.anchoredPosition; posR.x = +ratio * Screen.width / divide; rightImage.rectTransform.anchoredPosition = posR; #if AADOTWEEN leftImage.rectTransform.DOLocalMoveX(0, timeAnim) .SetEase(Ease.InQuad) .OnComplete(() => { GC.Collect(); Application.targetFrameRate = 60; DOVirtual.DelayedCall(0.2f, () => { canvasManager._AnimationTransitionInEnd(); if (callback != null) { callback(); } }); }); rightImage.rectTransform.DOLocalMoveX(0, timeAnim) .SetEase(Ease.InQuad); #endif }
private void Continue(bool select) { DataHolder.PlayedTime = 0; audioSource.DOFade(0, 1); Countdown.Kill(); DOTween.ToAlpha(() => ContinueCheckColor[0].color, color => ContinueCheckColor[0].color = color, 0f, 0.5f ); DOTween.ToAlpha(() => ContinueCheckColor[1].color, color => ContinueCheckColor[1].color = color, 0f, 0.5f ); Button.transform.DOLocalMoveY(-100f, 0.5f).SetEase(Ease.OutQuint); DOVirtual.DelayedCall(0.5f, () => Button.SetActive(false)); if (select) //コンティニューする { DOVirtual.DelayedCall(2f, () => SceneChangeOut()); } else //コンティニューしない { DataHolder.Logout(); DOVirtual.DelayedCall(1f, () => { DOTween.ToAlpha(() => ThankyouMessage.color, color => ThankyouMessage.color = color, 1f, 1f ); }); DOVirtual.DelayedCall(3.5f, () => { DOTween.ToAlpha(() => ThankyouMessage.color, color => ThankyouMessage.color = color, 0f, 0.5f ); }); DOVirtual.DelayedCall(5f, () => { SceneManager.LoadScene("Title"); }); } }
private void Activate(bool value) { DOVirtual.DelayedCall(0, () => { bttn.SetActive(!value); bttn.transform.localScale = Vector3.one; if (bttn.activeSelf) { twn = bttn.transform.DOScale(bttn.transform.localScale + new Vector3(0.15f, 0.15f, 0.15f), 0.5f).SetLoops(-1, LoopType.Yoyo); } else { if (twn != null) { twn.Kill(); twn = null; } } }); }
private void CardAnim() { if (!endLoop) { for (int i = 0; i < cards.Count; i++) { cards[i].transform.DOMove(cardsOriginPosition[GetRandomInCardsExcept(i)], animCardTime); } DOVirtual.DelayedCall(animCardTime, () => { CardAnim(); }); } else { int x = 0; if (!PlayerPrefs.HasKey("destiny")) { x = Random.Range(0, cards.Count); PlayerPrefs.SetInt("destiny", x); } else { x = PlayerPrefs.GetInt("destiny"); } for (int i = 0; i < cards.Count; i++) { if (i != x) { cards[i].GetComponent <Renderer>().material.DOFade(0, animCardTime); } } cards[x].transform.DOMove(highlightCardSpace.transform.position, animCardTime * 2).OnComplete(() => { DecideDestiny(x); }); } }
private void Start() { var pos = transform.position; var scale = transform.localScale; transform.position = new Vector3(m_startPos.x, m_startPos.y, 0); transform.localScale = new Vector3(m_startScale, m_startScale, m_startScale); transform.DOMove(pos, m_duration).OnComplete(() => { m_ready = true; SoundSystem.Instance().play(m_bamSound); DOVirtual.DelayedCall(m_punchlineDelay, () => { if (this == null) { return; } SoundSystem.Instance().play(m_punchline); }); }); transform.DOScale(scale, m_duration); }
public void Show(Action onFinishedanimation) { this.ChangeFocus(this.mUIPracticeDeckTypeSelectChildrenFocusable[0]); if (this.mTweenShowHide != null && TweenExtensions.IsPlaying(this.mTweenShowHide)) { TweenExtensions.Kill(this.mTweenShowHide, false); } this.mTweenShowHide = TweenSettingsExtensions.OnComplete <Sequence>(TweenSettingsExtensions.Join(TweenSettingsExtensions.Append(DOTween.Sequence(), DOVirtual.Float(this.mPanelThis.alpha, 1f, 0.3f, delegate(float alpha) { this.mPanelThis.alpha = alpha; })), TweenSettingsExtensions.SetEase <Tweener>(DOVirtual.Float(0f, 72f, 0.4f, delegate(float cellHeight) { this.mGridFocasable.cellHeight = cellHeight; this.mGridFocasable.Reposition(); }), 12)), delegate { if (onFinishedanimation != null) { onFinishedanimation.Invoke(); } }); }
//コインの保存とカウントアップ private void RewardCountUpCoin(int currentCoin, int coin) { int finalVal = currentCoin + coin; if (finalVal > Const.MAX_COIN) { finalVal = Const.MAX_COIN; } EncryptedPlayerPrefs.SaveInt(Const.KEY_COIN, finalVal); TextMeshProUGUI text = currentCoinText.GetComponent <TextMeshProUGUI> (); DOVirtual.DelayedCall(2.5f, () => { DOTween.To( () => currentCoin, it => text.text = it.ToString(), finalVal, 0.3f); }).OnComplete(() => { rewardButtonObj.GetComponent <RectTransform>().DOScaleY(0, 0.5f); rewardImage.GetComponent <RectTransform>().DOScaleY(0, 0.5f); }); }
public static void ShowTips(string tipText, float delytime = 5.0f) { if (item != null) { GameObject.Destroy(item); } item = GameObject.Instantiate(Resources.Load <GameObject>("UI/MessageTips")); item.transform.SetParent(GetRootCanvas()); item.GetComponentInChildren <Text>().text = tipText; item.GetComponent <RectTransform>().anchoredPosition = Vector2.zero; item.GetComponent <CanvasGroup>().alpha = 0; item.GetComponent <CanvasGroup>().DOFade(1, 1.5f); DOVirtual.DelayedCall(delytime, () => { item.GetComponent <CanvasGroup>().DOFade(0, 1.5f); DOVirtual.DelayedCall(1.5f, () => { GameObject.Destroy(item); }); }); }
private void Die(GameObject target, Vector2 direction, float power, float torque, bool destroy = true) { var col = target.GetComponent <Collider2D>(); Destroy(col); var rig = target.GetComponent <Rigidbody2D>(); if (!rig) { rig = target.AddComponent <Rigidbody2D>(); } rig.constraints = RigidbodyConstraints2D.None; rig.velocity = Vector2.zero; rig.AddForce(power * direction, ForceMode2D.Impulse); if (destroy) { DOVirtual.DelayedCall(2f, () => { Destroy(target); }); } rig.AddTorque(torque, ForceMode2D.Impulse); }
// Use this for initialization void Start() { DOVirtual.DelayedCall(.5f, () => { int offsetY = quatity / 2; Vector2 offsetPos = new Vector2(20, screenHeight * offsetY); for (int i = 0; i < quatity; i++) { Unit2D unit = Instantiate(prefab); unit.transform.ScreenPlacement(ScreenPosition.Left, offsetPos); unit.transform.parent = transform; offsetPos -= new Vector2(0, screenHeight); units.Add(unit); if (OnUnit2DSpawned != null) { OnUnit2DSpawned(unit); } } }); //StartCoroutine(CheckRenderSortingOrder()); }
override public void Activate(AbstractGameState previousState) { base.Activate(previousState); const float fadeDuration = 1f; SteamVR_Fade.Start(Color.black, 0); DOVirtual.DelayedCall(1 + fadeDuration, () => { SteamVR_Fade.Start(Color.clear, fadeDuration); if (Application.isEditor && skipToAssignment != Assignments.NO_CHEAT) { context.SetSailToAssignmentState((int)skipToAssignment, 1f); } else { context.StateMachine.SetState(new GameStateNavigatorIntro(context)); } }); }
// Update is called once per frame void Update() { if (is_float) { oldPos = transform.position; radian += perRadian; float dy = Mathf.Cos(radian) * radius; transform.position = oldPos + new Vector3(0, dy, 0); } if (!is_portal) { if (is_exit) { Exit_Time -= Time.deltaTime; if (Exit_Time <= 0) { transform.DOScale(new Vector3(old_x, old_y, old_z), SmallerTime); // RuntimeUtilities.DestroyVolume(m_Volume, true, true); DOVirtual.Float(0.30f, 0.15f, SmallerTime, ca.intensity.Override).OnComplete(DestroyVolume); is_exit = false; Exit_Time = Static_Exit_Time; Collider2D[] col; col = transform.parent.gameObject.GetComponentsInChildren <Collider2D>(); foreach (var child in col) { if (child != GetComponent <Collider2D>()) { child.enabled = false; } } } } else { Exit_Time = Static_Exit_Time; } } }
void Crash(Vector3 impactPos, Transform otherTransform) { if (!hasCrashed) { hasCrashed = true; transform.SetParent(otherTransform); Sequence powerDown = DOTween.Sequence(); powerDown.Append(DOVirtual.Float(1.0f, 0.0f, 0.5f, SetVelocity).SetEase(Ease.OutQuad).OnComplete(() => { StopAll(); canInput = false; rb.constraints = RigidbodyConstraints.FreezePosition; })); smokingParticles.Play(); GameObject crashParticlesGO = Instantiate(crashParticles, impactPos, Quaternion.LookRotation(Vector3.forward, impactPos - otherTransform.position)); crashParticlesGO.transform.SetParent(otherTransform); Destroy(crashParticlesGO, 5.0f); } }
public Tween GenerateTweenExpAndLevel() { if (DOTween.IsTweening(this)) { DOTween.Kill(this); } int expRateAfterAll = (from num in mShipExpModel.ExpRateAfter where true select num).Sum(); return(DOVirtual.Float(0f, 1f, 1.3f, delegate(float percentage) { float num2 = mShipExpModel.ExpRateBefore + (int)((float)(expRateAfterAll - mShipExpModel.ExpRateBefore) * percentage); float value = (num2 != 0f) ? (num2 / 100f % 1f) : 0f; int num3 = (int)num2 / 100; mSlider_Exp.value = value; if (mLabel_Level.text != (mShipExpModel.LevelBefore + num3).ToString()) { mLabel_Level.text = (mShipExpModel.LevelBefore + num3).ToString(); } }).SetId(this)); }
public void SequenceAppear(float appearRate) { WhiteFade fader = GetComponent <WhiteFade>(); if (fader == null) { return; } fader.gameObject.SetActive(true); for (int i = 0; i < fader.rends.Count; i++) { fader.rends[i].gameObject.SetActive(false); fader.rends[i].transform.localPosition += Vector3.up; int cp_i = i; DOVirtual.DelayedCall(cp_i * appearRate, () => { fader.rends[cp_i].gameObject.SetActive(true); fader.PlayFadeRend(cp_i, 1); }, false); } }
protected void Start() { for (int a = 0; a < tmMachines.Length; ++a) { tmKiosks[a].linkId = tmMachines[a].name; } enabledTmMachineCount = 1; for (int a = 0; a < satDishes.Length; ++a) { satKiosks[a].linkId = satDishes[a].name; } enabledSatDishCount = 1; serviceStatuses = new List <ServiceStatus> (); DOVirtual.DelayedCall(1f, () => { RestartGame(); }); AudioController.PlayAmbienceSound("factory_ambience"); }
protected void OnKilled(IEvent @event) { const float r = 2000f; const float duration = 0.8f; const float shackDelay = 0.5f; const float nerveDelay = 0.8f; const float shackStrong = 50f; const int vibrto = 200; const float startAo = 180f; var ao = 180f / m_nerves.Count(); var idx = 0; foreach (var cell in m_allCells) { cell.transform.DOShakePosition(duration, shackStrong, vibrto).SetDelay(shackDelay); } foreach (var nerve in m_nerves) { if (nerve == null) { continue; } var x = r * Math.Cos((startAo + ao * idx) * Math.PI / 180); var y = r * Math.Sin((startAo + ao * idx) * Math.PI / 180); var rotate = Random.Range(0, 720); nerve.transform.DOLocalMove(new Vector3((float)x, (float)y), duration).SetDelay(nerveDelay); nerve.transform.DOLocalRotate(new Vector3(0, 0, rotate), duration).SetDelay(nerveDelay); idx++; } DOVirtual.DelayedCall(nerveDelay, () => { EventEmitter.Emit(GameEvent.PlaySound, new SoundEvent(SoundType.Cartoon_Boing, 7)); }); }
public void AddOneNewProgressionMessage(int index, List <string> listMessages, Action callback) { if (index >= listMessages.Count) { currentlyInProgressionMessages = false; callback?.Invoke(); return; } string text = listMessages[index]; GameObject newText = Instantiate(textMessagePrefab, scrollContentTransform); newText.GetComponent <Text>().text = System.DateTime.Now.Hour + ":" + System.DateTime.Now.Minute + " " + text; scrollRect.DOVerticalNormalizedPos(0f, 1f, true).SetDelay(0.01f); scrollBackground.DOKill(true); scrollBackground.DOColor(notifyColor, 0.2f).OnComplete(() => { scrollBackground.DOColor(normalColor, 0.2f).OnComplete(() => { scrollBackground.DOColor(notifyColor, 0.2f).SetDelay(0.3f).OnComplete(() => { scrollBackground.DOColor(normalColor, 0.2f); }); }); }); scrollBackground.transform.parent.DOKill(true); scrollBackground.transform.parent.DOLocalMoveY(originalPos.y + 20f, 0.2f).OnComplete(() => { scrollBackground.transform.parent.DOLocalMoveY(originalPos.y, 0.2f); }); DOVirtual.DelayedCall(2f, () => { AddOneNewProgressionMessage(index + 1, listMessages, callback); }); }
public void Enter(IReadOnlyList <bool> draftsSelectable) { gameObject.SetActive(true); var canvasGroup = GetComponent <CanvasGroup>(); canvasGroup.alpha = 0; transform.SetLocalX(100); waku.FadeOut(0, Ease.Linear); ApplySelectableDrafts(draftsSelectable); float dur = 0.4f; canvasGroup.DOFade(1, dur).SetEase(Ease.OutCubic); transform.DOLocalMoveX(0, dur).SetEase(Ease.OutCubic); DOVirtual.DelayedCall(dur, () => { focusManager.OnEnter(); waku.Start_(); waku.FadeIn(0.4f, Ease.Linear); }); }
void animeDead( ) { if (driveBox) { useBoxWeapon( ); } WeaponPos.gameObject.SetActive(false); GameObject[] getList = AllItem.ToArray( ); for (int a = 0; a < getList.Length; a++) { Destroy(getList[a]); } AllItem.Clear(); thisTrans.SetParent(getBoxWeapon); thisTrans.DOKill( ); thisTrans.DOLocalMove(Vector3.zero, 1f); thisTrans.DOScale(Vector3.zero, 1f).OnComplete(() => { DOVirtual.DelayedCall(3, () => { thisTrans.SetParent(null); thisTrans.DOLocalMove(thisTrans.localPosition + Vector3.right, 0.25f); thisTrans.DOScale(Vector3.one, 0.25f).OnComplete(() => { WeaponPos.gameObject.SetActive(true); lifePlayer = LifePlayer; dead = false; thisWeapon.canShoot = true; }); }); }); }
public Tween GenerateTweenExpAndLevel() { bool flag = DOTween.IsTweening(this); if (flag) { DOTween.Kill(this, false); } int expRateAfterAll = Enumerable.Sum(Enumerable.Where <int>(this.mShipExpModel.ExpRateAfter, (int num) => true)); return(TweenSettingsExtensions.SetId <Tweener>(DOVirtual.Float(0f, 1f, 1.3f, delegate(float percentage) { float num = (float)(this.mShipExpModel.ExpRateBefore + (int)((float)(expRateAfterAll - this.mShipExpModel.ExpRateBefore) * percentage)); float value = (num != 0f) ? (num / 100f % 1f) : 0f; int num2 = (int)num / 100; this.mSlider_Exp.value = value; if (this.mLabel_Level.text != (this.mShipExpModel.LevelBefore + num2).ToString()) { this.mLabel_Level.text = (this.mShipExpModel.LevelBefore + num2).ToString(); } }), this)); }
public void Init(Sequence sequence) { gameObject.SetActive(true); rankingViewManager.NewScore(); var group = GetComponent <CanvasGroup>(); group.alpha = 0; group.DOFade(1, 1f).SetEase(Ease.OutQuint); awakeSound.Play(); sequenceNameText.text = sequence.Data.Name; totalScoreUI.Init(sequence.Scores.ScoreSum, sequence.Scores.BestScoreSum); for (int i = 0; i < sequence.Scores.Scores.Count; i++) { StageScoreHolder stageholder = sequence.Scores.Scores[i]; stageScoreUIs[i].StageIndexText.text = (i + 1).ToString(); stageScoreUIs[i].ScoreText.text = stageholder.score.ToString(); stageScoreUIs[i].BestScoreText.text = stageholder.bestScore.ToString(); stageScoreUIs[i].SetIsBestScore(stageholder.score > stageholder.bestScore); } this.sequence = sequence; var scoreCloneToSend = sequence.Scores.Clone(); scoreCloneToSend.ApplyBestScores(); PlayfabAccesssor.Instance.RequestSendData(sequence.Data.Name + DebugParameters.Instance.BestScoreSuffix, scoreCloneToSend); DOVirtual.DelayedCall(3f, () => { if (gameObject.activeInHierarchy) { StartCoroutine(NextAnim(nextButtonImage.material)); } }); }
private void CheckClickedBaloon(Baloon _baloon) { if (_isComplete) { Debug.Log("게임이 종료되었습니다."); return; } Debug.Log(_baloon.correctInfo); //아이템인지 판별 if (_baloon.type != Baloon.BaloonType.Correct && _baloon.type != Baloon.BaloonType.InCorrect) { //아이템 처리 OnClickItem(_baloon.type); } else { if (_baloon.correctInfo) { if (bisAddScoreTime) { nScore += 200; } else { nScore += 100; } txtScore.text = nScore.ToString(); correctCount++; if (checkComplete()) { //결과 데이터 저장 _isComplete = true; bIsClear = true; DOVirtual.DelayedCall(1.5f, EndGame); } } } }
private void Execute_performed(InputAction.CallbackContext obj) { var targets = currentTargeter.ExecuteTargeting(); if (currentTargetingType == TargetingType.Single && currentTargetGroup.Contains(UnitRelativeOwner.None) && targets.unitIdentifiers.Count > 0) { invalidTargetInfoGO.SetActive(true); DOVirtual.DelayedCall(1f, () => invalidTargetInfoGO.SetActive(false)); Debug.Log("[TargeterMaster] Targeter expecting space you can walk to and no targets"); return; } else if (!currentTargetGroup.Contains(UnitRelativeOwner.None) && targets.unitIdentifiers.Count == 0) { invalidTargetInfoGO.SetActive(true); DOVirtual.DelayedCall(1f, () => invalidTargetInfoGO.SetActive(false)); Debug.Log("[TargeterMaster] Targeter at least one Unit target"); return; } CancelTargeting(); targetingResultCallback?.Invoke(targets); }
public void Show(Action onFinishedanimation) { this.ChangeFocus(this.mUIPracticeBattleListChildren_Focasable[0], false); if (DOTween.IsTweening(UIPracticeBattleList.AnimationType.ShowHide)) { DOTween.Kill(UIPracticeBattleList.AnimationType.ShowHide, false); } Tween tween = TweenSettingsExtensions.OnComplete <Sequence>(TweenSettingsExtensions.Join(TweenSettingsExtensions.Append(TweenSettingsExtensions.SetId <Sequence>(DOTween.Sequence(), UIPracticeBattleList.AnimationType.ShowHide), DOVirtual.Float(this.mWidgetThis.alpha, 1f, 0.3f, delegate(float alpha) { this.mWidgetThis.alpha = alpha; })), DOVirtual.Float(0f, 66f, 0.4f, delegate(float cellHeight) { this.mGrid_Focasable.cellHeight = cellHeight; this.mGrid_Focasable.Reposition(); })), delegate { if (onFinishedanimation != null) { onFinishedanimation.Invoke(); } }); }