From 85a92b4fc459b46a8f780ac31a9425f87f48821f Mon Sep 17 00:00:00 2001
From: liuzhiwei <liuzhiwei@qq.com>
Date: Wed, 18 Nov 2020 13:54:12 +0800
Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master

---
 Assets/Scripts/Guide/GuidePanel.cs |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/Assets/Scripts/Guide/GuidePanel.cs b/Assets/Scripts/Guide/GuidePanel.cs
index 191700a..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(-3, -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放在最下面
 
@@ -159,7 +166,7 @@
             SetRimActive(true);
             AddButtonListener(towerBuyBtn, ac);
             Image btnImg = towerBuyBtn.GetComponent<Image>();
-            InitRectGuidance(btnImg, 189, 73.5f);
+            InitRectGuidance(btnImg, 159, 73.5f);
             SetRimPos(towerBuyBtn);
             //maskObj.ShowImmediately();
 
@@ -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>();
@@ -317,7 +324,7 @@
             AddButtonListener(towerBuyBtn, ac);
 
             Image btnImg = towerBuyBtn.GetComponent<Image>();
-            InitRectGuidance(btnImg, 189, 73.5f);
+            InitRectGuidance(btnImg, 159, 73.5f);
             SetRimPos(towerBuyBtn);
             //maskObj.ShowImmediately();
         }

--
Gitblit v1.9.1