| | |
| | | Vector2 rimOffset = new Vector2(30, 30);//边框要比按钮大一些 |
| | | |
| | | Vector2 towerBuyBtnPos;//动态生成按钮抠图位置 |
| | | Vector2 skillBtnPos = new Vector2(459, 44.6f); |
| | | Vector2 skillBtnPos = new Vector2(459, 121f); |
| | | |
| | | private Image warningImg;//大波敌人来袭提示 |
| | | |
| | |
| | | ImageTowerPos towerPos3;//塔位标识 |
| | | |
| | | Image tmpMask;//自身的阻挡射线Panel |
| | | ParticleSystem finishPS; |
| | | //ParticleSystem finishPS; |
| | | Button finishBtn; |
| | | Image finishImg; |
| | | Canvas skillCanvasGroup; |
| | | void Awake() |
| | | { |
| | | |
| | | tmpMask = transform.GetComponent<Image>(); |
| | | tipsUI = transform.Find("Tips").gameObject; |
| | | tipsUI.transform.SetAsLastSibling();//把tips放在最下面 |
| | |
| | | skillBtn = GameObject.Find("UICamera/BottomCanvas/Panel/Energy/FireSkillBg/SkillBtn").GetComponent<Button>(); |
| | | skillBtn.interactable = false; |
| | | |
| | | finishPS = transform.Find("Effect_UI_YinDaoJieShu/Particle System (3)").GetComponent<ParticleSystem>(); |
| | | finishBtn = transform.Find("FinishImageBtn").GetComponent<Button>(); |
| | | finishImg = finishBtn.transform.Find("FinishImage").GetComponent<Image>(); |
| | | finishImg.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); |
| | | finishBtn.onClick.AddListener(OnClickFinish); |
| | | finishBtn.gameObject.SetActive(false); |
| | | //finishPS = transform.Find("Effect_UI_YinDaoJieShu/Particle System (3)").GetComponent<ParticleSystem>(); |
| | | towerBuyBtn.gameObject.SetActive(false); |
| | | } |
| | | |
| | |
| | | StopShowDragPath(true); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 关闭技能X1的显示优先级 |
| | | /// </summary> |
| | | public void CloseSkillImage() |
| | | { |
| | | GameObject go1 = GameObject.Find("UICamera/BottomCanvas/Panel/Energy/FireSkillBg/SkillCount1"); |
| | | if (go1 != null) |
| | | { |
| | | skillCanvasGroup = go1.GetComponent<Canvas>(); |
| | | skillCanvasGroup.overrideSorting = false; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 步骤3 :对话---出兵后杀光---对话---展示火鸡 |
| | |
| | | { |
| | | colorCount++; |
| | | warningImg.DOFade(colorCount % 2, 1.0f).OnComplete(SetWarningColor); |
| | | CommonDebugHelper.Debug($"执行了{colorCount}次"); |
| | | } |
| | | else |
| | | { |
| | |
| | | public void Step7Talk(string[] str, Action ac) |
| | | { |
| | | callBack = ac; |
| | | GameObject.Find("UICamera/MainUI/BloodUI").SetActive(false); |
| | | |
| | | SetGuideUI(true); |
| | | StartShowWord(str, GuideEnergyUp); |
| | | } |
| | |
| | | /// </summary> |
| | | public void GuideEnergyUp() |
| | | { |
| | | GameObject.Find("UICamera/MainUI/BloodUI").SetActive(false); |
| | | EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.GuideEnergyUp, 100); |
| | | |
| | | tmpMask.enabled = false; |
| | |
| | | CloseGuidance(); |
| | | |
| | | SetGuideUI(true); |
| | | //StartShowWord(str, ac); |
| | | callBack = ac; |
| | | StartShowWord(str, ShowFinishPanel); |
| | | // charForeach.StartFinalShowWord(str, ac, () => |
| | | // { |
| | | // finishPS.Play(); |
| | | // }); |
| | | |
| | | charForeach.StartFinalShowWord(str, ac, () => |
| | | { |
| | | finishPS.Play(); |
| | | }); |
| | | } |
| | | |
| | | private void ShowFinishPanel() |
| | | { |
| | | SetGuideUI(false); |
| | | //显示引导结束面板,再次点击按钮关闭 |
| | | finishBtn.gameObject.SetActive(true); |
| | | finishImg.transform.DOScale(Vector3.one, 0.5f); |
| | | } |
| | | |
| | | private void OnClickFinish() |
| | | { |
| | | callBack?.Invoke(); |
| | | } |
| | | |
| | | |
| | | public void FinishGuide() |
| | | { |
| | | if (skillCanvasGroup != null) |
| | | skillCanvasGroup.overrideSorting = true; |
| | | towerBuyBtn.gameObject.SetActive(true); |
| | | } |
| | | |