Преглед изворни кода

替换tv图标,隐藏砖石栏,引导中添加“打开新手指导”

lvjincheng пре 2 година
родитељ
комит
3138e6d5e6

+ 17 - 0
Assets/BowArrow/Modules/NewUserGuider/NewUserGuiderManager.cs

@@ -421,6 +421,22 @@ public class NewUserGuiderManager : MonoBehaviour
         };
         };
         configs.Add(config.key, config);
         configs.Add(config.key, config);
 
 
+        config = new NewUserGuiderConfig();
+        config.key = "查看新手指导";
+        config.frameTipPivot = "rt";
+        config.onPrepare = (g) => {
+            RectTransform btn = GameObject.Find("TopBarView/TopBar/IconGuider").GetComponent<RectTransform>();
+            g.hollowOutMask.SetTarget(btn);
+            g.hollowOutMask.isTargetRectCanThrough = false;
+            g.SetIconPointerHitOpacity(0.6f);
+            g.config.hitPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * 0.5f);
+            g.config.pointerRotZ = 180;
+            g.config.pointerPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.one * -0.1f);
+            g.config.frameTipPos = RectTransformUtils.GetPositionByPivot(btn, Vector2.zero) 
+                + RectTransformUtils.CanvasV3ToScreenV3(Vector3.down * 80f, g.iconPointer);
+        };
+        configs.Add(config.key, config);
+
 
 
         config = new NewUserGuiderConfig();
         config = new NewUserGuiderConfig();
         config.key = "切换好友/排行榜";
         config.key = "切换好友/排行榜";
@@ -791,6 +807,7 @@ public class NewUserGuiderManager : MonoBehaviour
         "地磁计校准-完成",
         "地磁计校准-完成",
         "查看设置",
         "查看设置",
         "查看商城",
         "查看商城",
+        "查看新手指导",
         "切换好友/排行榜",
         "切换好友/排行榜",
         "展开好友/排行榜",
         "展开好友/排行榜",
         "联机游戏",
         "联机游戏",

+ 1 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/cn.json

@@ -76,6 +76,7 @@
     "new-user-guider_tip_地磁计校准-完成": "瞄准模块已经初始化完成,请将瞄准模块重新装配到智能弓箭。",
     "new-user-guider_tip_地磁计校准-完成": "瞄准模块已经初始化完成,请将瞄准模块重新装配到智能弓箭。",
     "new-user-guider_tip_查看设置": "点击<color=#FFA500>设置</color>了解更多",
     "new-user-guider_tip_查看设置": "点击<color=#FFA500>设置</color>了解更多",
     "new-user-guider_tip_查看商城": "点击查看<color=#FFA500>商城</color>",
     "new-user-guider_tip_查看商城": "点击查看<color=#FFA500>商城</color>",
+    "new-user-guider_tip_查看新手指导": "打开<color=#FFA500>新手指导</color>",
     "new-user-guider_tip_切换好友/排行榜": "点击切换<color=#FFA500>好友/排行榜</color>",
     "new-user-guider_tip_切换好友/排行榜": "点击切换<color=#FFA500>好友/排行榜</color>",
     "new-user-guider_tip_展开好友/排行榜": "展开查看<color=#FFA500>更多详情</color>",
     "new-user-guider_tip_展开好友/排行榜": "展开查看<color=#FFA500>更多详情</color>",
     "new-user-guider_tip_联机游戏": "点击<color=#FFA500>联机游戏</color>进入游戏",
     "new-user-guider_tip_联机游戏": "点击<color=#FFA500>联机游戏</color>进入游戏",

+ 1 - 0
Assets/BowArrow/Scripts/Components/TextAutoLanguage2/Resources/TextAutoLanguage2/en.json

@@ -76,6 +76,7 @@
     "new-user-guider_tip_地磁计校准-完成": "The aiming module has been initialized. Please reassemble the aiming module to the smart bow.",
     "new-user-guider_tip_地磁计校准-完成": "The aiming module has been initialized. Please reassemble the aiming module to the smart bow.",
     "new-user-guider_tip_查看设置": "Click <color=#FFA500>SetUp</color> to learn more",
     "new-user-guider_tip_查看设置": "Click <color=#FFA500>SetUp</color> to learn more",
     "new-user-guider_tip_查看商城": "Click to view the <color=#FFA500>Shop</color>",
     "new-user-guider_tip_查看商城": "Click to view the <color=#FFA500>Shop</color>",
+    "new-user-guider_tip_查看新手指导": "Open the <color=#FFA500>Novice guidance</color>",
     "new-user-guider_tip_切换好友/排行榜": "Click to switch <color=#FFA500>friend/rand</color>",
     "new-user-guider_tip_切换好友/排行榜": "Click to switch <color=#FFA500>friend/rand</color>",
     "new-user-guider_tip_展开好友/排行榜": "Expand to see <color=#FFA500>more details</color>",
     "new-user-guider_tip_展开好友/排行榜": "Expand to see <color=#FFA500>more details</color>",
     "new-user-guider_tip_联机游戏": "Click <color=#FFA500>Online</color> to enter the game",
     "new-user-guider_tip_联机游戏": "Click <color=#FFA500>Online</color> to enter the game",

+ 18 - 0
Assets/BowArrow/Scripts/View/TopBarView.cs

@@ -38,6 +38,7 @@ public class TopBarView : JCUnityLib.ViewBase
             diamond.localPosition += Vector3.right * 87;
             diamond.localPosition += Vector3.right * 87;
             transform.Find("TopBar/IconLebo").gameObject.SetActive(false);
             transform.Find("TopBar/IconLebo").gameObject.SetActive(false);
         }
         }
+        CheckNeewShowDiamond();
     }
     }
 
 
     void Update()
     void Update()
@@ -56,15 +57,32 @@ public class TopBarView : JCUnityLib.ViewBase
         // }
         // }
     }
     }
 
 
+    void CheckNeewShowDiamond()
+    {
+        bool hasTarget = false;
+        foreach (var item in _needShowItLockers)
+        {
+            if (typeof(ShopView) == item.GetType())
+            {
+                hasTarget = true;
+                break;
+            }
+        }
+        try {
+            transform.Find("TopBar/Item").gameObject.SetActive(hasTarget);
+        } catch (System.Exception) {}
+    }
 
 
     private static HashSet<ViewBase> _needShowItLockers = new HashSet<ViewBase>();
     private static HashSet<ViewBase> _needShowItLockers = new HashSet<ViewBase>();
     public static void NeedShowIt(ViewBase locker) {
     public static void NeedShowIt(ViewBase locker) {
         _needShowItLockers.Add(locker);
         _needShowItLockers.Add(locker);
         ins?.ResetSiblingIndex();
         ins?.ResetSiblingIndex();
+        ins?.CheckNeewShowDiamond();
     }
     }
     public static void DontNeedShowIt(ViewBase locker) {
     public static void DontNeedShowIt(ViewBase locker) {
         _needShowItLockers.Remove(locker);
         _needShowItLockers.Remove(locker);
         ins?.ResetSiblingIndex();
         ins?.ResetSiblingIndex();
+        ins?.CheckNeewShowDiamond();
     }
     }
     private void ResetSiblingIndex()
     private void ResetSiblingIndex()
     {
     {

BIN
Assets/BowArrow/Textures/Home/TopBar/icon_tv.png


BIN
Assets/DuckHunter/Resources/DuckHunter/Audios/Btn.wav


+ 0 - 22
Assets/DuckHunter/Resources/DuckHunter/Audios/Btn.wav.meta

@@ -1,22 +0,0 @@
-fileFormatVersion: 2
-guid: 985f83519a6367440a7cff5441fee0df
-AudioImporter:
-  externalObjects: {}
-  serializedVersion: 6
-  defaultSettings:
-    loadType: 0
-    sampleRateSetting: 0
-    sampleRateOverride: 44100
-    compressionFormat: 1
-    quality: 1
-    conversionMode: 0
-  platformSettingOverrides: {}
-  forceToMono: 0
-  normalize: 1
-  preloadAudioData: 1
-  loadInBackground: 0
-  ambisonic: 0
-  3D: 1
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: