private void CastAOESkill() { if (this.combatMain == null) { this.combatMain = GameUIManager.mInstance.GetSession<GUICombatMain>(); } if (this.combatMain == null) { return; } TutorialInitParams tutorialInitParams = new TutorialInitParams(); tutorialInitParams.MaskParent = this.combatMain.gameObject; if (this.aoeSkillBtn == null) { return; } tutorialInitParams.TargetObj = GameUITools.FindGameObject("skill_btn", this.aoeSkillBtn.gameObject); tutorialInitParams.TargetParent = this.combatMain.gameObject; tutorialInitParams.HandDirection = TutorialEntity.ETutorialHandDirection.ETHD_RightDown; tutorialInitParams.IsRemovePanel = true; tutorialInitParams.FreeTutorial = true; tutorialInitParams.Tips = Singleton<StringManager>.Instance.GetString("tutorialUseSkill2"); base.InitGuideMask(tutorialInitParams); this.guideAnimation.transform.localPosition = Vector3.zero; this.tips.gameObject.SetActive(true); this.guideAnimation.SetActive(true); List<ActorController> actors = Globals.Instance.ActorMgr.Actors; ActorController actorController = null; foreach (ActorController current in actors) { if (current != null && current.ActorType == ActorController.EActorType.EMonster && current.gameObject.activeInHierarchy && !current.IsDead) { if (actorController == null) { actorController = current; } else if (this.player.ActorCtrler.GetDistance2D(actorController) > this.player.ActorCtrler.GetDistance2D(current)) { actorController = current; } } } if (actorController == null) { this.SkillTutorialEnd(); return; } if (this.singleSkillBtn != null) { this.singleSkillBtn.TutorialUsing = true; } Vector3 position = Camera.main.WorldToViewportPoint(new Vector3(actorController.transform.position.x, actorController.transform.position.y, actorController.transform.position.z)); position = GameUIManager.mInstance.uiCamera.camera.ViewportToWorldPoint(position); TweenPosition component = this.hand.GetComponent<TweenPosition>(); component.from = this.hand.transform.localPosition; this.hand.transform.position = position; component.to = this.hand.transform.localPosition; component.duration = 3f; component.style = UITweener.Style.Loop; this.hand.GetComponent<UIWidget>().depth += 5; this.freshTime = Time.time; this.status = 7; base.PlaySound("tutorial_018"); }
private void Step_04() { if (Globals.Instance.TutorialMgr.CurrentScene is GUIPVP4ReadyScene) { this.pvp4ReadyScene = TutorialEntity.ConvertObject2UnityOrPrefab<GUIPVP4ReadyScene>(); } if (this.pvp4ReadyScene == null) { return; } TutorialInitParams tutorialInitParams = new TutorialInitParams(); tutorialInitParams.MaskParent = GameUIManager.mInstance.GetTopGoods().gameObject; tutorialInitParams.HandDirection = TutorialEntity.ETutorialHandDirection.ETHD_RightDown; tutorialInitParams.ScaleFactor = 1.42857146f; tutorialInitParams.CloneScale = 0.7f; tutorialInitParams.Tips = Singleton<StringManager>.Instance.GetString("tutorial32"); PVPTargetGrid mTargetTable = this.pvp4ReadyScene.mTargetTable; if (mTargetTable == null || mTargetTable.gridItems.Length == 0) { global::Debug.LogError(new object[] { "PVP gridItems length is 0" }); TutorialEntity.SetNextTutorialStep(1, TutorialManager.ETutorialNum.Tutorial_PVP, true, true, true); return; } int num = 0; UICustomGridItem[] gridItems = mTargetTable.gridItems; for (int i = 0; i < gridItems.Length; i++) { GUIPVP4TargetItem gUIPVP4TargetItem = (GUIPVP4TargetItem)gridItems[i]; if (gUIPVP4TargetItem.data != null && gUIPVP4TargetItem.data.RankData != null && gUIPVP4TargetItem.data.RankData.Rank > num && gUIPVP4TargetItem.data.GetID() != Globals.Instance.Player.Data.ID) { num = gUIPVP4TargetItem.data.RankData.Rank; tutorialInitParams.TargetObj = gUIPVP4TargetItem.pk.gameObject; } } if (tutorialInitParams.TargetObj == null) { global::Debug.LogError(new object[] { "pvp target is null" }); TutorialEntity.SetNextTutorialStep(1, TutorialManager.ETutorialNum.Tutorial_PVP, true, true, true); return; } base.InitGuideMask(tutorialInitParams); UIEventListener expr_1B1 = UIEventListener.Get(this.area.gameObject); expr_1B1.onClick = (UIEventListener.VoidDelegate)Delegate.Combine(expr_1B1.onClick, new UIEventListener.VoidDelegate(this.OnStep_04MaskAreaClick)); base.PlaySound("tutorial_070"); }