瀏覽代碼

商店加一个解锁

lzx 13 小時之前
父節點
當前提交
3021024690

+ 8 - 0
Assets/Res/Config/LanguageChineseConfig.json

@@ -40235,6 +40235,14 @@
     {
       "ID": 10799,
       "txt": "重置会完全返还升级消耗的经验和灵石(不影响星级),确认么?"
+    },
+    {
+      "ID": 10800,
+      "txt": "可获得双倍奖励,但需要再看一次广告,确认吗?"
+    },
+    {
+      "ID": 10801,
+      "txt": "达到{0}解锁!"
     }
   ]
 }

+ 12 - 3
Assets/Res/Config/SkiptoConfig.json

@@ -32,7 +32,10 @@
         6
       ],
       "SkipTxt": 10357,
-      "UnlockType": 0,
+      "UnlockType": 1,
+      "UnlockPara1": [
+        2
+      ],
       "UnlockPara2": 0
     },
     {
@@ -62,7 +65,10 @@
         6
       ],
       "SkipTxt": 10356,
-      "UnlockType": 0,
+      "UnlockType": 1,
+      "UnlockPara1": [
+        2
+      ],
       "UnlockPara2": 0
     },
     {
@@ -81,7 +87,10 @@
         4
       ],
       "SkipTxt": 10359,
-      "UnlockType": 0,
+      "UnlockType": 1,
+      "UnlockPara1": [
+        2
+      ],
       "UnlockPara2": 0
     },
     {

+ 8 - 0
Assets/Res/Config/UnlockConfig.json

@@ -7,6 +7,14 @@
       "ulockValue": 21,
       "lockType": 1,
       "UnlockTipsID": 0
+    },
+    {
+      "ID": 2,
+      "ulockFunction": 2,
+      "ulockCondition": 1,
+      "ulockValue": 10,
+      "lockType": 2,
+      "UnlockTipsID": 10801
     }
   ]
 }

+ 14 - 0
Assets/Res/UI/AppBarPanel/AppBarPanel.prefab

@@ -2973,6 +2973,7 @@ GameObject:
   - component: {fileID: 7753631802842447130}
   - component: {fileID: 553848956453578161}
   - component: {fileID: 5335756367815044491}
+  - component: {fileID: 8385758576203364448}
   m_Layer: 0
   m_HasEditorInfo: 1
   m_Name: Btn_Shop
@@ -3184,6 +3185,19 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   audioName: ui_button
+--- !u!114 &8385758576203364448
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 4816422879295191460}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 7334e4a874a3af244b6ba80884842db4, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  uLockFunction: 2
 --- !u!1 &4883639511437899985
 GameObject:
   m_ObjectHideFlags: 0

+ 1 - 1
Assets/Res/UI/ShopPanel/ShopPanel.prefab

@@ -441,7 +441,7 @@ RectTransform:
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 2518, y: -1942}
-  m_SizeDelta: {x: 1200, y: 1241}
+  m_SizeDelta: {x: 750, y: 1624}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!114 &6128091390146622782
 MonoBehaviour:

+ 13 - 7
Assets/Scripts/GameLogic/Player/AccountFileInfo.cs

@@ -59,7 +59,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         /// 洞府经验丹使用数量
         /// </summary>
         public int todayUseExpElixrPanelCount = 0;
-        
+
         public string playerName = "";
 
         /// <summary>
@@ -128,7 +128,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
 
         //招募数据
         public List<SummonData> SummonDatas = new List<SummonData>();
-        
+
         public List<RedDot> RedDotDatas = new List<RedDot>();
 
 
@@ -141,7 +141,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         /// 领取挂机每日掉落时间
         /// </summary>
         public long QiankundaiLingQuDailyDropTime;
-        
+
         /// <summary>
         /// 乾坤袋领取时间
         /// </summary>
@@ -159,7 +159,13 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         public List<int> phaseValue = new List<int>();
         public bool isAutoCombat;
         public string playerId;
+
+        /// <summary>
+        /// 今天看广告的次数
+        /// </summary>
+        public int todayPlayAdsCount;
     }
+
     [System.Serializable]
     public class RedDot
     {
@@ -439,7 +445,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         public int curStep;
 
         public bool isCompleted;
-        
+
         public bool isCompleted1;
     }
 
@@ -474,10 +480,10 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
         public int score;
 
         public List<SummonSocreData> summonSocreData = new List<SummonSocreData>();
-        
+
         public bool isSummonSocre;
     }
-    
+
     [System.Serializable]
     public class IntList
     {
@@ -708,7 +714,7 @@ public class AccountFileInfo : Singleton<AccountFileInfo>
             {
                 skillData.useIndex = 9;
             }
-          
+
             playerData.AllSkillDatas.Add(skillData);
         }
 

+ 3 - 3
Assets/Scripts/GameLogic/Shop/ShopManger.cs

@@ -101,9 +101,9 @@ public class ShopManger : Singleton<ShopManger>
         {
             if (!productDic.ContainsKey(adsIdentifier))
             {
-                string price = IAPManager.Instance.GetPrice(adsIdentifier);
-                if (price != "")
-                    productDic.Add(adsIdentifier, price);
+                // string price = IAPManager.Instance.GetPrice(adsIdentifier);
+                // if (price != "")
+                //     productDic.Add(adsIdentifier, price);
             }
         }
 #endif

+ 6 - 2
Assets/Scripts/GameLogic/UnLock/ULockManager.cs

@@ -127,8 +127,12 @@ public class ULockManager : Singleton<ULockManager>
         switch (unLockCondition)
         {
             case 1: //玩家境界
-                // LevelBattleConfig levelBattleConfig = ConfigComponent.Instance.Get<LevelBattleConfig>(unLockValue);
-                // tips = LanguageManager.Instance.Text(_config.UnlockTipsID, levelBattleConfig.levelName);
+                HeroPowerUpConfig levelBattleConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(unLockValue);
+                string jingjie =
+                    LanguageManager.Instance.Text(levelBattleConfig.jingjieLanIDs[0]) +
+                    LanguageManager.Instance.Text(levelBattleConfig.jingjieLanIDs[1]) +
+                    LanguageManager.Instance.Text(levelBattleConfig.jingjieLanIDs[2]);
+                tips = LanguageManager.Instance.Text(_config.UnlockTipsID, jingjie);
                 break;
 
         }

+ 5 - 0
Assets/Scripts/GameUI/UI/AppBarPanel/AppBarPanel.cs

@@ -113,6 +113,11 @@ namespace Fort23.Mono
 
         public async void Btn_Shop_Click(int shopId = 0)
         {
+            if (!ULockManager.Instance.IsULock(2))
+            {
+                return;
+            }
+
             CloseMenu();
             if (currentOpenUIPanel is ShopPanel)
             {

+ 6 - 1
Assets/Scripts/GameUI/UI/DivineSence/DivineSenceEventPreviewPanel.cs

@@ -262,7 +262,12 @@ namespace Fort23.Mono
 
         private void DivineSenceHuoQuWidgetOnClick(ItemWidgetBasic obj)
         {
-            SkiptoHelper.Skipto(5);
+            if(SkiptoHelper.IsSkipto(5))
+                SkiptoHelper.Skipto(5);
+            else
+            {
+                TipMessagePanel.OpenTipMessagePanel(SkiptoHelper.SkiptoTips(5));
+            }
         }
 
         private void GoOnClick(ItemWidgetBasic obj)

+ 5 - 0
Assets/Scripts/GameUI/UI/DivineSence/EventTipsPanel.cs

@@ -91,6 +91,11 @@ namespace Fort23.Mono
         private async void OnClick(ItemWidgetBasic obj)
         {
             SkipToWidget skipToWidget = obj as SkipToWidget;
+            if (!SkiptoHelper.IsSkipto(skipToWidget.SkiptoConfig.ID))
+            {
+                TipMessagePanel.OpenTipMessagePanel(SkiptoHelper.SkiptoTips(skipToWidget.SkiptoConfig.ID));
+                return;
+            }
             isSkipto = true;
             await UIManager.Instance.HideUIUIPanel(this);
             SkiptoHelper.Skipto(skipToWidget.SkiptoConfig.ID);

+ 34 - 25
Assets/Scripts/GameUI/UI/DivineSence/SkipToWidget.cs

@@ -1,36 +1,45 @@
 using Core.Language;
 using Excel2Json;
 using Fort23.UTool;
+using Mono.Utility;
 
 namespace Fort23.Mono
 {
-	[UIBinding(prefab = "SkipToWidget"  )]
-	public partial class SkipToWidget : ItemWidgetBasic
-	{
-		public SkiptoConfig SkiptoConfig;
-		private void Init()
-		{
+    [UIBinding(prefab = "SkipToWidget")]
+    public partial class SkipToWidget : ItemWidgetBasic
+    {
+        public SkiptoConfig SkiptoConfig;
 
-		}
-		public override void AddEvent()
-		{
+        private void Init()
+        {
+        }
 
-		}
-		public override void DelEvent()
-		{
+        public override void AddEvent()
+        {
+        }
 
-		}
-		public override void AddButtonEvent()
-		{
-			base.AddButtonEvent();
+        public override void DelEvent()
+        {
+        }
 
-		}
-		
-		public void CustonInit(int skiptoId)
-		{
-			SkiptoConfig = ConfigComponent.Instance.Get<SkiptoConfig>(skiptoId);
-			Text_Name.text = LanguageManager.Instance.Text(SkiptoConfig.SkipTxt);
-		}
+        public override void AddButtonEvent()
+        {
+            base.AddButtonEvent();
+        }
 
-	}
-}
+        public void CustonInit(int skiptoId)
+        {
+            if (!SkiptoHelper.IsSkipto(skiptoId))
+            {
+                transform.Gray();
+            }
+            else
+            {
+                transform.RecoverColor();
+            }
+
+            SkiptoConfig = ConfigComponent.Instance.Get<SkiptoConfig>(skiptoId);
+            Text_Name.text = LanguageManager.Instance.Text(SkiptoConfig.SkipTxt);
+        }
+    }
+}

+ 5 - 0
Assets/Scripts/GameUI/UI/ItemDetailsPanel/ItemSourcePanel.cs

@@ -71,6 +71,11 @@ namespace Fort23.Mono
         private async void OnClick(ItemWidgetBasic obj)
         {
             SkipToWidget skipToWidget = obj as SkipToWidget;
+            if (!SkiptoHelper.IsSkipto(skipToWidget.SkiptoConfig.ID))
+            {
+                TipMessagePanel.OpenTipMessagePanel(SkiptoHelper.SkiptoTips(skipToWidget.SkiptoConfig.ID));
+                return;
+            }
             isSkipto = true;
             await UIManager.Instance.HideUIUIPanel(this);
             

+ 1 - 0
Assets/Scripts/GameUI/UI/ShopPanel/ShopPanel.cs

@@ -320,6 +320,7 @@ namespace Fort23.Mono
 
         public static async CTask<ShopPanel> OpenPanel(int shopId)
         {
+           
             ShopPanel shopPanel =
                 await UIManager.Instance.LoadAndOpenPanel<ShopPanel>(null, uiData: new object[] { shopId },
                     isFullUI: true);

+ 23 - 2
Assets/Scripts/GameUI/Utility/SkiptoHelper.cs

@@ -13,6 +13,13 @@ namespace Mono.Utility
         {
             SkiptoConfig skiptoConfig = ConfigComponent.Instance.Get<SkiptoConfig>(skiptoId);
 
+            if (skiptoConfig.UnlockPara1 != null)
+            {
+                if (!ULockManager.Instance.IsULock(skiptoConfig.UnlockPara1[0]))
+                {
+                    return;
+                }
+            }
 
             switch (skiptoConfig.SkipID)
             {
@@ -86,9 +93,16 @@ namespace Mono.Utility
         }
 
 
-        public async static CTask<bool> IsSkipto(int skiptoId)
+        public  static bool IsSkipto(int skiptoId)
         {
             SkiptoConfig skiptoConfig = ConfigComponent.Instance.Get<SkiptoConfig>(skiptoId);
+            if (skiptoConfig.UnlockType == 1 && skiptoConfig.UnlockPara1 != null)
+            {
+                if (!ULockManager.Instance.IsULock(skiptoConfig.UnlockPara1[0]))
+                {
+                    return false;
+                }
+            }
 
             switch (skiptoConfig.SkipID)
             {
@@ -101,8 +115,15 @@ namespace Mono.Utility
         }
 
 
-        public async static CTask SkiptoTips(int skiptoId)
+        public  static string SkiptoTips(int skiptoId)
         {
+             SkiptoConfig skiptoConfig = ConfigComponent.Instance.Get<SkiptoConfig>(skiptoId);
+             if (skiptoConfig.UnlockType == 1 && skiptoConfig.UnlockPara1 != null)
+             {
+                return ULockManager.Instance.ShowUnlockTips(skiptoConfig.UnlockPara1[0]);
+             }
+
+             return "";
         }
     }
 }

二進制
Excel2Json/Excel/Language.xlsx


二進制
Excel2Json/Excel/Skipto.xlsx


二進制
Excel2Json/Excel/Unlock.xlsx


二進制
HaiWai.keystore


+ 8 - 8
ProjectSettings/ProjectSettings.asset

@@ -13,8 +13,8 @@ PlayerSettings:
   targetDevice: 2
   useOnDemandResources: 0
   accelerometerFrequency: 60
-  companyName: XiuXian
-  productName: XiuXian
+  companyName: Spirit Way
+  productName: Spirit Way
   defaultCursor: {fileID: 0}
   cursorHotspot: {x: 0, y: 0}
   m_SplashScreenBackgroundColor: {r: 0.12156863, g: 0.12156863, b: 0.1254902, a: 1}
@@ -186,7 +186,7 @@ PlayerSettings:
   androidSupportedAspectRatio: 1
   androidMaxAspectRatio: 2.1
   applicationIdentifier:
-    Android: com.taptap.xy.yousanjie
+    Android: com.xy.hw.ysj002
     Standalone: com.DefaultCompany.XY002
   buildNumber:
     Standalone: 0
@@ -294,8 +294,8 @@ PlayerSettings:
   AndroidTargetDevices: 0
   AndroidSplashScreenScale: 0
   androidSplashScreen: {fileID: 0}
-  AndroidKeystoreName: '{inproject}: taptap.keystore'
-  AndroidKeyaliasName: com.taptap.xy.yousanjie
+  AndroidKeystoreName: '{inproject}: HaiWai.keystore'
+  AndroidKeyaliasName: com.xy.hw.ysj002
   AndroidEnableArmv9SecurityFeatures: 0
   AndroidBuildApkPerCpuArchitecture: 0
   AndroidTVCompatibility: 0
@@ -303,7 +303,7 @@ PlayerSettings:
   AndroidEnableTango: 0
   androidEnableBanner: 1
   androidUseLowAccuracyLocation: 0
-  androidUseCustomKeystore: 0
+  androidUseCustomKeystore: 1
   m_AndroidBanners:
   - width: 320
     height: 180
@@ -318,7 +318,7 @@ PlayerSettings:
   - m_BuildTarget: 
     m_Icons:
     - serializedVersion: 2
-      m_Icon: {fileID: 2800000, guid: 84d8d83ce9b889c4caec6e3cd485591d, type: 3}
+      m_Icon: {fileID: 2800000, guid: 39648e0b29b3040439f1dd8b9cfbf068, type: 3}
       m_Width: 128
       m_Height: 128
       m_Kind: 0
@@ -805,7 +805,7 @@ PlayerSettings:
   webGLMemoryGeometricGrowthCap: 96
   webGLPowerPreference: 2
   scriptingDefineSymbols:
-    Android: KAMGAM_SKY_CLOUDS_URP;AMPLIFY_SHADER_EDITOR
+    Android: KAMGAM_SKY_CLOUDS_URP;AMPLIFY_SHADER_EDITOR;Google;Ads
     ArmLinux: KAMGAM_SKY_CLOUDS_URP
     ArmLinuxServer: KAMGAM_SKY_CLOUDS_URP
     EmbeddedLinux: KAMGAM_SKY_CLOUDS_URP