protected override void OnPostLoadGUI() { if (GameUIPopupManager.GetInstance().GetCurrentPopup() != null) { GameUIPopupManager.GetInstance().PopState(true, null); } GUIChatWindowV2.TryCloseMe(); GameUIManager.mInstance.DestroyGameUIOptionPopUp(); this.mEffectGo = base.transform.Find("endBackground/ui04").gameObject; NGUITools.SetActive(this.mEffectGo, false); this.mBg = base.transform.Find("endBackground/BackGround").GetComponent<UISprite>(); this.mVictorySp = base.transform.Find("endBackground/Sprite").GetComponent<UISprite>(); this.mVictorySp.transform.localScale = new Vector3(6f, 6f, 6f); this.mVictorySp.color = new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 0.3f); Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence.Append(HOTween.To(this.mVictorySp.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutSine))); sequence.Insert(0f, HOTween.To(this.mVictorySp, 0.2f, new TweenParms().Prop("color", new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 1f)))); sequence.AppendCallback(new TweenDelegate.TweenCallback(this.ShowEffectGo)); sequence.AppendInterval(1.5f); sequence.Append(HOTween.To(this.mBg, 1f, new TweenParms().Prop("color", new Color(this.mBg.color.r, this.mBg.color.g, this.mBg.color.b, 0f)))); sequence.Insert(2f, HOTween.To(this.mVictorySp, 1f, new TweenParms().Prop("color", new Color(this.mVictorySp.color.r, this.mVictorySp.color.g, this.mVictorySp.color.b, 0f)))); sequence.Play(); this.isPvp = GameUIManager.mInstance.uiState.IsPvp; if (!this.isPvp) { base.Invoke("ReservedReadyProcess", 1.5f); } Globals.Instance.BackgroundMusicMgr.PlayGameClearSound(); Globals.Instance.BackgroundMusicMgr.StopWarmingSound(); Globals.Instance.BackgroundMusicMgr.ClearGameBGM(); }
public void ShowMe(int curLvl) { this.Refresh(curLvl); Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate).OnComplete(new TweenDelegate.TweenCallback(this.OnAnimEnd))); sequence.Append(HOTween.To(this.mWinBgSp, 0.25f, new TweenParms().Prop("color", new Color(this.mWinBgSp.color.r, this.mWinBgSp.color.g, this.mWinBgSp.color.b, 1f)))); sequence.Insert(0f, HOTween.To(this.mWinBg, 0.25f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence.AppendInterval(3f); sequence.Append(HOTween.To(this.mWinBgSp, 0.25f, new TweenParms().Prop("color", new Color(this.mWinBgSp.color.r, this.mWinBgSp.color.g, this.mWinBgSp.color.b, 0f)))); sequence.Play(); }
public void AddOneRecord(D2MData data) { this.mGUID2MRecordTable.AddData(new GUID2MRecordData(data)); if (data.Crit > 1) { this.mD2MCriticalLayer.Refresh(data.Crit); this.mD2MCriticalLayer.PlayD2MCriticalAnim(); } this.mGold.SetActive(true); this.mGoldTxt.text = data.Money.ToString(); Sequence sequence = new Sequence(); sequence.Append(HOTween.To(this.mGold.transform, 0f, new TweenParms().Prop("localPosition", Vector3.zero))); sequence.Insert(0f, HOTween.To(this.mGold.transform, 0.01f, new TweenParms().Prop("localScale", new Vector3(3f, 3f, 3f)))); sequence.Append(HOTween.To(this.mGold.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseInBack))); sequence.AppendInterval(0.5f); sequence.Append(HOTween.To(this.mGold.transform, 0.5f, new TweenParms().Prop("localPosition", new Vector3(0f, 120f, 0f)).Ease(EaseType.EaseOutQuad))); sequence.Append(HOTween.To(this.mGold.transform, 0f, new TweenParms().Prop("localScale", Vector3.zero))); sequence.Play(); this.mGUID2MRecordTable.Reposition(true); if (this.mGUID2MRecordTable.mDatas.Count >= 3) { base.StartCoroutine(this.UpdateScrollBar()); } }
private void Refresh() { int num = 0; int num2 = 0; int num3 = 0; if (GameUIManager.mInstance.uiState.TrailCurLvl < Globals.Instance.Player.Data.TrialWave) { for (int i = GameUIManager.mInstance.uiState.TrailCurLvl + 1; i <= Globals.Instance.Player.Data.TrialWave; i++) { TrialInfo info = Globals.Instance.AttDB.TrialDict.GetInfo(i); if (info != null) { num += info.Value; num2 += info.Money; for (int j = 0; j < info.RewardType.Count; j++) { int num4 = info.RewardType[j]; if (num4 != 0) { if (num4 == 3) { if (j < info.RewardValue1.Count && j < info.RewardValue2.Count) { int num5 = info.RewardValue1[j]; if (num5 != 0) { ItemInfo info2 = Globals.Instance.AttDB.ItemDict.GetInfo(num5); if (info2 != null) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_Item, info2, info.RewardValue2[j], 0)); num3++; } } } } else if (num4 == 15) { if (j < info.RewardValue1.Count) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_Item, null, 0, info.RewardValue1[j])); } } else if (num4 == 17 && j < info.RewardValue1.Count) { this.mGUITrialRewardItemTable.AddData(new GUITrialRewardItemData(ERewardType.EReward_LopetSoul, null, 0, info.RewardValue1[j])); } } } } } } ActivityValueData valueMod = Globals.Instance.Player.ActivitySystem.GetValueMod(4); if (valueMod != null) { num *= valueMod.Value1 / 100; } Sequence sequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence.Append(HOTween.To(this, 1f, new TweenParms().Prop("mMaxRecordNum", Globals.Instance.Player.Data.TrialMaxWave).OnUpdate(new TweenDelegate.TweenCallback(this.OnMaxRecordNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mWaveNum", Globals.Instance.Player.Data.TrialWave).OnUpdate(new TweenDelegate.TweenCallback(this.OnWaveNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mMoJingNum", num).OnUpdate(new TweenDelegate.TweenCallback(this.OnMoJingNumUpdate)))); sequence.Insert(0f, HOTween.To(this, 1f, new TweenParms().Prop("mMoneyNum", num2).OnUpdate(new TweenDelegate.TweenCallback(this.OnMoneyNumUpdate)))); Sequence sequence2 = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mTitle.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mMidBg.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.AppendInterval(0.2f); sequence2.Append(sequence); if (num3 > 0) { sequence2.AppendInterval(0.1f); sequence2.Append(HOTween.To(this.mGUITrialRewardItemTable.transform, 0.15f, new TweenParms().Prop("localScale", Vector3.one))); } if (Globals.Instance.Player.Data.TrialMaxWave > GameUIManager.mInstance.uiState.TrailMaxRecord) { sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mMaxRecord.transform, 0.001f, new TweenParms().Prop("localScale", new Vector3(8f, 8f, 8f)))); sequence2.Append(HOTween.To(this.mMaxRecord.transform, 0.2f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseInCubic))); sequence2.AppendCallback(new TweenDelegate.TweenCallback(this.ShowMaxRecordEffect)); } sequence2.AppendInterval(0.2f); sequence2.Append(HOTween.To(this.mSureBtn.transform, 0.1f, new TweenParms().Prop("localScale", Vector3.one).Ease(EaseType.EaseOutBack))); sequence2.Play(); }
public object CreateSequence(NTweenSequence sequence) { Sequence hoTweenSequence = new Sequence (); foreach (var tween in sequence.GetTweens()) { // yuck if (tween is SequenceTweenHolder) { var nTween = (SequenceTweenHolder)tween; var tweenParms = SetAttributes (nTween.attribute); tweenParms.Prop (nTween.builder.GetProperty (), nTween.builder.GetTweenValueTo ()); var hoTween = HOTween.To (nTween.builder.GetObject (), nTween.builder.GetDuration (), tweenParms); hoTweenSequence.Append (hoTween); } else if (tween is SequenceCallBack) { hoTweenSequence.AppendCallback (((SequenceCallBack)tween).Callback.Invoke); } else if (tween is SequenceInterval) { hoTweenSequence.AppendInterval (((SequenceInterval)tween).Duration); } } return hoTweenSequence; }
public void Win() { State = GameState.Winning; Time.timeScale = 0; pauseButton.SetActive(false); SaveManager.Instance.SaveNutrientsForCurrentLevel(nutrientsCollected); Sequence winSequence = new Sequence(new SequenceParms().UpdateType(UpdateType.TimeScaleIndependentUpdate)); winSequence.Append(HOTween.To(Camera.mainCamera.transform, 3, new TweenParms() .Prop("position", new Vector3(Camera.mainCamera.transform.position.x, flower.transform.position.y - tkCam.nativeResolutionHeight/2, Camera.mainCamera.transform.position.z)) .Ease(EaseType.EaseOutQuad) )); winSequence.AppendCallback(GrowFlower); winSequence.AppendInterval(1.5f); winSequence.Append(levelCompleteInTween); winSequence.Play(); }