zhaoyang 2 anos atrás
pai
commit
0ff5a4ed5b

+ 37 - 37
FGUIProject/assets/LuckyBox/LuckyBoxStarUI.xml

@@ -1,66 +1,66 @@
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920" designImage="ui://drx9d1usw1qi2n" designImageOffsetY="-240">
-  <controller name="ctrlBuyType" alias="购买类型" pages="0,,1," selected="0">
+  <controller name="ctrlBuyType" alias="购买类型" pages="0,,1," selected="1">
     <remark page="0" value="买一次"/>
     <remark page="1" value="买十次"/>
   </controller>
-  <controller name="ctrlRewardsType" alias="奖池类型" pages="0,,1,,2," selected="1"/>
+  <controller name="ctrlRewardsType" alias="奖池类型" pages="0,,1,,2," selected="2"/>
   <displayList>
-    <loader id="n0_l5nz" name="bg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" url="ui://drx9d1uso1391i" fill="scaleMatchWidth">
+    <loader id="n0_l5nz" name="bg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" url="ui://drx9d1uso1391g" fill="scaleMatchWidth">
       <gearIcon controller="ctrlRewardsType" pages="0,1,2" values="ui://drx9d1uso1391h|ui://drx9d1uso1391i|ui://drx9d1uso1391g"/>
       <relation target="" sidePair="center-center,middle-middle"/>
     </loader>
-    <component id="n9_l5nz" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="35,80"/>
-    <component id="n20_f5bl" name="comStar0_0_0" src="l5nzq" fileName="components/ComStar.xml" xy="498,973">
+    <component id="n9_l5nz" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
+    <component id="n20_f5bl" name="comStar0_0_0" src="l5nzq" fileName="components/ComStar.xml" xy="540,960">
       <gearDisplay controller="ctrlBuyType" pages="0"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="0" condition="0"/>
     </component>
-    <component id="n31_iakb" name="comStar0_1_0" src="l5nzq" fileName="components/ComStar.xml" xy="605,857">
+    <component id="n31_iakb" name="comStar0_1_0" src="l5nzq" fileName="components/ComStar.xml" xy="540,960">
       <gearDisplay controller="ctrlBuyType" pages="0"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="1" condition="0"/>
     </component>
-    <component id="n32_iakb" name="comStar0_2_0" src="l5nzq" fileName="components/ComStar.xml" xy="605,857">
+    <component id="n32_iakb" name="comStar0_2_0" src="l5nzq" fileName="components/ComStar.xml" xy="540,960">
       <gearDisplay controller="ctrlBuyType" pages="0"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="2" condition="0"/>
     </component>
-    <component id="n12_l5nz" name="comStar1_0_0" src="l5nzq" fileName="components/ComStar.xml" xy="193,291" group="n19_l5nz"/>
-    <component id="n13_l5nz" name="comStar1_0_1" src="l5nzq" fileName="components/ComStar.xml" xy="513,121" group="n19_l5nz"/>
-    <component id="n14_l5nz" name="comStar1_0_2" src="l5nzq" fileName="components/ComStar.xml" xy="913,581" group="n19_l5nz"/>
-    <component id="n15_l5nz" name="comStar1_0_3" src="l5nzq" fileName="components/ComStar.xml" xy="207,970" group="n19_l5nz"/>
-    <component id="n33_o139" name="comStar1_0_4" src="l5nzq" fileName="components/ComStar.xml" xy="294,1130" group="n19_l5nz"/>
-    <component id="n34_o139" name="comStar1_0_5" src="l5nzq" fileName="components/ComStar.xml" xy="914,1142" group="n19_l5nz"/>
-    <component id="n35_o139" name="comStar1_0_6" src="l5nzq" fileName="components/ComStar.xml" xy="185,1320" group="n19_l5nz"/>
-    <component id="n36_o139" name="comStar1_0_7" src="l5nzq" fileName="components/ComStar.xml" xy="741,1444" group="n19_l5nz"/>
-    <component id="n37_o139" name="comStar1_0_8" src="l5nzq" fileName="components/ComStar.xml" xy="392,1533" group="n19_l5nz"/>
-    <group id="n19_l5nz" name="grpComStar0" xy="146,82" size="807,1490" advanced="true">
+    <component id="n12_l5nz" name="comStar1_0_0" src="l5nzq" fileName="components/ComStar.xml" xy="232,537" group="n19_l5nz"/>
+    <component id="n13_l5nz" name="comStar1_0_1" src="l5nzq" fileName="components/ComStar.xml" xy="449,224" group="n19_l5nz"/>
+    <component id="n14_l5nz" name="comStar1_0_2" src="l5nzq" fileName="components/ComStar.xml" xy="849,557" group="n19_l5nz"/>
+    <component id="n15_l5nz" name="comStar1_0_3" src="l5nzq" fileName="components/ComStar.xml" xy="419,803" group="n19_l5nz"/>
+    <component id="n33_o139" name="comStar1_0_4" src="l5nzq" fileName="components/ComStar.xml" xy="253,1005" group="n19_l5nz"/>
+    <component id="n34_o139" name="comStar1_0_5" src="l5nzq" fileName="components/ComStar.xml" xy="828,1066" group="n19_l5nz"/>
+    <component id="n35_o139" name="comStar1_0_6" src="l5nzq" fileName="components/ComStar.xml" xy="253,1398" group="n19_l5nz"/>
+    <component id="n36_o139" name="comStar1_0_7" src="l5nzq" fileName="components/ComStar.xml" xy="584,1272" group="n19_l5nz"/>
+    <component id="n37_o139" name="comStar1_0_8" src="l5nzq" fileName="components/ComStar.xml" xy="586,1619" group="n19_l5nz"/>
+    <group id="n19_l5nz" name="grpComStar0" xy="193,185" size="695,1473" advanced="true">
       <gearDisplay controller="ctrlBuyType" pages="1"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="0" condition="0"/>
       <relation target="" sidePair="left-center,top-middle"/>
     </group>
-    <component id="n21_iakb" name="comStar1_1_0" src="l5nzq" fileName="components/ComStar.xml" xy="389,363" group="n25_iakb"/>
-    <component id="n22_iakb" name="comStar1_1_1" src="l5nzq" fileName="components/ComStar.xml" xy="268,561" group="n25_iakb"/>
-    <component id="n23_iakb" name="comStar1_1_2" src="l5nzq" fileName="components/ComStar.xml" xy="220,778" group="n25_iakb"/>
-    <component id="n24_iakb" name="comStar1_1_3" src="l5nzq" fileName="components/ComStar.xml" xy="229,976" group="n25_iakb"/>
-    <component id="n38_o139" name="comStar1_1_4" src="l5nzq" fileName="components/ComStar.xml" xy="295,1278" group="n25_iakb"/>
-    <component id="n39_o139" name="comStar1_1_5" src="l5nzq" fileName="components/ComStar.xml" xy="414,1511" group="n25_iakb"/>
-    <component id="n40_o139" name="comStar1_1_6" src="l5nzq" fileName="components/ComStar.xml" xy="697,653" group="n25_iakb"/>
-    <component id="n41_o139" name="comStar1_1_7" src="l5nzq" fileName="components/ComStar.xml" xy="853,990" group="n25_iakb"/>
-    <component id="n50_w1qi" name="comStar1_1_8" src="l5nzq" fileName="components/ComStar.xml" xy="819,1408" group="n25_iakb"/>
-    <group id="n25_iakb" name="grpComStar1" xy="181,324" size="711,1226" advanced="true">
+    <component id="n21_iakb" name="comStar1_1_0" src="l5nzq" fileName="components/ComStar.xml" xy="420,283" group="n25_iakb"/>
+    <component id="n22_iakb" name="comStar1_1_1" src="l5nzq" fileName="components/ComStar.xml" xy="227,499" group="n25_iakb"/>
+    <component id="n23_iakb" name="comStar1_1_2" src="l5nzq" fileName="components/ComStar.xml" xy="229,848" group="n25_iakb"/>
+    <component id="n24_iakb" name="comStar1_1_3" src="l5nzq" fileName="components/ComStar.xml" xy="431,1035" group="n25_iakb"/>
+    <component id="n38_o139" name="comStar1_1_4" src="l5nzq" fileName="components/ComStar.xml" xy="186,1279" group="n25_iakb"/>
+    <component id="n39_o139" name="comStar1_1_5" src="l5nzq" fileName="components/ComStar.xml" xy="430,1471" group="n25_iakb"/>
+    <component id="n40_o139" name="comStar1_1_6" src="l5nzq" fileName="components/ComStar.xml" xy="610,644" group="n25_iakb"/>
+    <component id="n41_o139" name="comStar1_1_7" src="l5nzq" fileName="components/ComStar.xml" xy="832,903" group="n25_iakb"/>
+    <component id="n50_w1qi" name="comStar1_1_8" src="l5nzq" fileName="components/ComStar.xml" xy="779,1480" group="n25_iakb"/>
+    <group id="n25_iakb" name="grpComStar1" xy="147,244" size="724,1275" advanced="true">
       <gearDisplay controller="ctrlBuyType" pages="1"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="1" condition="0"/>
       <relation target="" sidePair="left-center,top-middle"/>
     </group>
-    <component id="n26_iakb" name="comStar1_2_0" src="l5nzq" fileName="components/ComStar.xml" xy="635,267" group="n30_iakb"/>
-    <component id="n27_iakb" name="comStar1_2_1" src="l5nzq" fileName="components/ComStar.xml" xy="343,498" group="n30_iakb"/>
-    <component id="n28_iakb" name="comStar1_2_2" src="l5nzq" fileName="components/ComStar.xml" xy="562,1709" group="n30_iakb"/>
-    <component id="n29_iakb" name="comStar1_2_3" src="l5nzq" fileName="components/ComStar.xml" xy="117,721" group="n30_iakb"/>
-    <component id="n44_o139" name="comStar1_2_4" src="l5nzq" fileName="components/ComStar.xml" xy="308,1073" group="n30_iakb"/>
-    <component id="n45_o139" name="comStar1_2_5" src="l5nzq" fileName="components/ComStar.xml" xy="368,1409" group="n30_iakb"/>
-    <component id="n46_o139" name="comStar1_2_6" src="l5nzq" fileName="components/ComStar.xml" xy="875,1411" group="n30_iakb"/>
-    <component id="n47_o139" name="comStar1_2_7" src="l5nzq" fileName="components/ComStar.xml" xy="546,898" group="n30_iakb"/>
-    <component id="n48_o139" name="comStar1_2_8" src="l5nzq" fileName="components/ComStar.xml" xy="774,754" group="n30_iakb"/>
-    <group id="n30_iakb" name="grpComStar2" xy="78,228" size="836,1520" advanced="true">
+    <component id="n26_iakb" name="comStar1_2_0" src="l5nzq" fileName="components/ComStar.xml" xy="722,318" group="n30_iakb"/>
+    <component id="n27_iakb" name="comStar1_2_1" src="l5nzq" fileName="components/ComStar.xml" xy="338,446" group="n30_iakb"/>
+    <component id="n28_iakb" name="comStar1_2_2" src="l5nzq" fileName="components/ComStar.xml" xy="625,1568" group="n30_iakb"/>
+    <component id="n29_iakb" name="comStar1_2_3" src="l5nzq" fileName="components/ComStar.xml" xy="198,708" group="n30_iakb"/>
+    <component id="n44_o139" name="comStar1_2_4" src="l5nzq" fileName="components/ComStar.xml" xy="341,1060" group="n30_iakb"/>
+    <component id="n45_o139" name="comStar1_2_5" src="l5nzq" fileName="components/ComStar.xml" xy="276,1365" group="n30_iakb"/>
+    <component id="n46_o139" name="comStar1_2_6" src="l5nzq" fileName="components/ComStar.xml" xy="819,1405" group="n30_iakb"/>
+    <component id="n47_o139" name="comStar1_2_7" src="l5nzq" fileName="components/ComStar.xml" xy="797,1132" group="n30_iakb"/>
+    <component id="n48_o139" name="comStar1_2_8" src="l5nzq" fileName="components/ComStar.xml" xy="708,665" group="n30_iakb"/>
+    <group id="n30_iakb" name="grpComStar2" xy="159,279" size="699,1328" advanced="true">
       <gearDisplay controller="ctrlBuyType" pages="1"/>
       <gearDisplay2 controller="ctrlRewardsType" pages="2" condition="0"/>
       <relation target="" sidePair="left-center,top-middle"/>

+ 1 - 1
FGUIProject/assets/LuckyBox/components/ComStar.xml

@@ -2,6 +2,6 @@
 <component size="78,78" pivot="0.5,0.5" anchor="true">
   <controller name="c1" pages="0,,1," selected="0"/>
   <displayList>
-    <image id="n4_l5nz" name="imgLine" src="l5nzp" fileName="images/cj_xk_xian.png" xy="36,34" pivot="0,0.5" size="10,12"/>
+    <component id="n8_t6j1" name="comLine" src="t6j1tek" fileName="components/Component21.xml" xy="0,27"/>
   </displayList>
 </component>

+ 6 - 0
FGUIProject/assets/LuckyBox/components/Component3.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="850,24" overflow="hidden">
+  <displayList>
+    <image id="n1_uj53" name="bar" src="t6j1tem" fileName="imagesNew/pro_activate.png" xy="0,0"/>
+  </displayList>
+</component>

+ 9 - 0
FGUIProject/assets/LuckyBox/components/ComponentLine.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="850,24" mask="n3_o9gh">
+  <displayList>
+    <graph id="n2_o9gh" name="holder" xy="424,11" size="1,1"/>
+    <image id="n3_o9gh" name="imgMask" src="t6j1tem" fileName="imagesNew/pro_activate.png" xy="0,-99" size="850,239">
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+  </displayList>
+</component>

BIN
FGUIProject/assets/LuckyBox/imagesNew/pro_activate.png


+ 3 - 0
FGUIProject/assets/LuckyBox/package.xml

@@ -211,6 +211,9 @@
     <image id="t6j1teg" name="zx_lianxian_lan_star_1.png" path="/imagesNews/"/>
     <image id="t6j1teh" name="zx_tc_piaodai_shang.png" path="/imagesNews/"/>
     <image id="t6j1tei" name="zx_zhuangshi_xinggui.png" path="/imagesNews/"/>
+    <component id="t6j1tek" name="ComponentLine.xml" path="/components/"/>
+    <component id="t6j1tel" name="Component3.xml" path="/components/"/>
+    <image id="t6j1tem" name="pro_activate.png" path="/imagesNew/"/>
   </resources>
   <publish name="" path="../GameClient/Assets/ResIn/UI/LuckyBox" packageCount="2" genCode="true" extractAlpha="true"/>
 </packageDescription>

+ 4 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComStar.cs

@@ -8,7 +8,7 @@ namespace UI.LuckyBox
     {
         public GComponent target;
         public Controller m_c1;
-        public GImage m_imgLine;
+        public UI_ComponentLine m_comLine;
         public const string URL = "ui://drx9d1usl5nzq";
         public const string PACKAGE_NAME = "LuckyBox";
         public const string RES_NAME = "ComStar";
@@ -57,12 +57,13 @@ namespace UI.LuckyBox
         private void Init(GComponent comp)
         {
             m_c1 = comp.GetController("c1");
-            m_imgLine = (GImage)comp.GetChild("imgLine");
+            m_comLine = (UI_ComponentLine)UI_ComponentLine.Create(comp.GetChild("comLine"));
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_c1 = null;
-            m_imgLine = null;
+            m_comLine.Dispose();
+            m_comLine = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComponentLine.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.LuckyBox
+{
+    public partial class UI_ComponentLine
+    {
+        public GComponent target;
+        public GGraph m_holder;
+        public GImage m_imgMask;
+        public const string URL = "ui://drx9d1ust6j1tek";
+        public const string PACKAGE_NAME = "LuckyBox";
+        public const string RES_NAME = "ComponentLine";
+        private static UI_ComponentLine _proxy;
+
+        public static UI_ComponentLine Create(GObject gObject = null)
+        {
+            var ui = new UI_ComponentLine();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ComponentLine Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ComponentLine();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_holder = (GGraph)comp.GetChild("holder");
+            m_imgMask = (GImage)comp.GetChild("imgMask");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_holder = null;
+            m_imgMask = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 11 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/LuckyBox/UI_ComponentLine.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e85f1413c6b0a494caffbbddf9df01b2
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 10
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxStarView.cs

@@ -30,6 +30,7 @@ namespace GFGGame
 
         private const int checkDistance = 40;//鼠标靠近星星周围加减40都算选中星星
         private const int imgLineWidth = 10;//线的原始长度
+        private bool _isLuckyBox = true;//是抽奖(true),是限时主题活动(false)
 
         private bool showGuide = false;
         public override void Dispose()
@@ -95,9 +96,9 @@ namespace GFGGame
             _rewardList = LuckyBoxDataManager.Instance.RewardList;
             _ui.m_ctrlBuyType.selectedIndex = _rewardList != null && _rewardList.Count > 1 ? 1 : 0;
 
-            bool isLuckyBox = LuckyBoxDataManager.Instance.luckyBoxIds.IndexOf(LuckyBoxDataManager.Instance.currentBoxId) >= 0;
-            _ui.m_ctrlRewardsType.selectedIndex = isLuckyBox ? (LuckyBoxDataManager.Instance.currentBoxId - 1) : 0;
-            string resPath = string.Format("cj_tp_{0}", isLuckyBox ? LuckyBoxDataManager.Instance.currentBoxId : 1);
+            _isLuckyBox = LuckyBoxDataManager.Instance.luckyBoxIds.IndexOf(LuckyBoxDataManager.Instance.currentBoxId) >= 0;
+            _ui.m_ctrlRewardsType.selectedIndex = _isLuckyBox ? (LuckyBoxDataManager.Instance.currentBoxId - 1) : 0;
+            string resPath = string.Format("cj_tp_{0}", _isLuckyBox ? LuckyBoxDataManager.Instance.currentBoxId : 1);
             _ui.m_bg.url = ResPathUtil.GetBgImgPath(resPath);
 
             ResetStartView();
@@ -117,11 +118,12 @@ namespace GFGGame
             while (star != null && star.visible == true)
             {
                 UI_ComStar comStar = UI_ComStar.Proxy(star);
-                comStar.m_imgLine.visible = true;
+                comStar.m_comLine.target.visible = true;
 
                 comStar.m_c1.selectedIndex = 0;
-                comStar.m_imgLine.width = imgLineWidth;
-                comStar.m_imgLine.rotation = 0;
+                comStar.m_comLine.target.width = imgLineWidth;
+                comStar.m_comLine.target.rotation = 0;
+
 
                 GComponent gcom = CreateEffect(comStar, 1, "ui_ck"); ;
                 gcom.visible = true;
@@ -238,8 +240,8 @@ namespace GFGGame
             angle *= Mathf.Sign(Vector3.Dot(normal, Vector3.forward));  //Mathf.Sign()求符号,Vector3.Dot()求方向,求法线向量与物体上方向向量点乘,结果为1或-1,修正旋转方向 
 
             UI_ComStar comStar = UI_ComStar.Proxy(curComStar);
-            comStar.m_imgLine.rotation += angle;
-            comStar.m_imgLine.width = Vector2.Distance(targetPos, (Vector2)curComStar.data);
+            comStar.m_comLine.target.rotation += angle;
+            comStar.m_comLine.target.width = Vector2.Distance(targetPos, (Vector2)curComStar.data);
             UI_ComStar.ProxyEnd();
 
         }
@@ -249,7 +251,7 @@ namespace GFGGame
             if (clickComStars.Count <= 0) return;
 
             UI_ComStar comStar = UI_ComStar.Proxy(clickComStars[clickComStars.Count - 1]);
-            comStar.m_imgLine.visible = false;
+            comStar.m_comLine.target.visible = false;
             UI_ComStar.ProxyEnd();
 
 
@@ -288,7 +290,7 @@ namespace GFGGame
             for (int i = 0; i < notClickComStars.Count; i++)
             {
                 UI_ComStar notClickComStar = UI_ComStar.Proxy(notClickComStars[i]);
-                notClickComStar.m_imgLine.visible = false;
+                notClickComStar.m_comLine.target.visible = false;
                 notClickComStar.target.GetChildAt(3).asCom.visible = true;
                 notClickComStar.target.GetChildAt(1).asCom.visible = false;
                 UI_ComStar.ProxyEnd();

BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/LuckyBox/LuckyBox_fui.bytes