From d7b6928e043de5eab9427b48705a4320e2ed50b5 Mon Sep 17 00:00:00 2001 From: wangguan <wangguan@kt007.com> Date: Wed, 18 Nov 2020 12:00:32 +0800 Subject: [PATCH] 新手引导适配 --- Assets/Scripts/Guide/GuidePanel.cs | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Guide/GuidePanel.cs b/Assets/Scripts/Guide/GuidePanel.cs index 9eff3c9..3d1eafd 100644 --- a/Assets/Scripts/Guide/GuidePanel.cs +++ b/Assets/Scripts/Guide/GuidePanel.cs @@ -67,7 +67,14 @@ backgroundImg = transform.Find("Button").GetComponent<Image>(); towerBuyBtn = GameObject.Find("UICamera/BottomCanvas/Panel/TowerBuyBtn"); - towerBuyBtnPos = new Vector2(215, -862); + RectTransform tmpTs = towerBuyBtn.GetComponent<RectTransform>(); + + float tmpOffect = tmpTs.anchoredPosition.y - (transform.parent.parent.GetComponent<RectTransform>().sizeDelta.y * 0.5f); + towerBuyBtnPos = new Vector2(215, tmpOffect); + //towerBuyBtnPos = new Vector2(215, -862); + Debug.Log(tmpOffect); + + tipsUI = transform.Find("Tips").gameObject; tipsUI.transform.SetAsLastSibling();//把tips放在最下面 @@ -216,7 +223,7 @@ { tmpMask.enabled = true; - offectBackground.SetActive(true); + offectBackground.SetActive(true); SetGuideUI(false); @@ -244,7 +251,7 @@ if (currentIndex == 0) { tmpMask.enabled = false; - offectBackground.SetActive(false); + offectBackground.SetActive(false); SetRimActive(true); Image btnImg = transform.Find("Image_TowerPos").GetComponent<Image>(); -- Gitblit v1.9.1