Ver código fonte

答题特效

zhaoyang 2 anos atrás
pai
commit
4d81362879

+ 13 - 12
FGUIProject/assets/League/LeagueAnsweringUI.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <component size="1080,1920">
 <component size="1080,1920">
-  <controller name="ctrlHasIcon" pages="0,,1," selected="1">
+  <controller name="ctrlHasIcon" pages="0,,1," selected="0">
     <remark page="0" value="有图标"/>
     <remark page="0" value="有图标"/>
     <remark page="1" value="无图标"/>
     <remark page="1" value="无图标"/>
   </controller>
   </controller>
@@ -8,7 +8,7 @@
     <remark page="0" value="答题中"/>
     <remark page="0" value="答题中"/>
     <remark page="1" value="cd中"/>
     <remark page="1" value="cd中"/>
   </controller>
   </controller>
-  <controller name="ctrlQuestionType" pages="0,,1,,2," selected="2">
+  <controller name="ctrlQuestionType" pages="0,,1,,2," selected="0">
     <remark page="1" value="选择题"/>
     <remark page="1" value="选择题"/>
     <remark page="2" value="填空题"/>
     <remark page="2" value="填空题"/>
   </controller>
   </controller>
@@ -30,7 +30,8 @@
     <image id="n45_9jv6" name="n45" src="9jv66q" fileName="images/lm_dt_cy_db.png" xy="25,724">
     <image id="n45_9jv6" name="n45" src="9jv66q" fileName="images/lm_dt_cy_db.png" xy="25,724">
       <relation target="" sidePair="height-height"/>
       <relation target="" sidePair="height-height"/>
     </image>
     </image>
-    <image id="n39_9jv6" name="n39" src="9jv66j" fileName="images/lm_zsx0.png" xy="170,128" pkg="eg2y0ldp"/>
+    <image id="n39_9jv6" name="n39" src="9jv66j" fileName="imagesNew/lm_zsx0.png" pkg="eg2y0ldp" xy="170,128"/>
+    <graph id="n58_idkd" name="holder" xy="535,373" size="10,10"/>
     <component id="n5_pvb4" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80">
     <component id="n5_pvb4" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80">
       <relation target="" sidePair="left-left,top-top"/>
       <relation target="" sidePair="left-left,top-top"/>
     </component>
     </component>
@@ -44,11 +45,11 @@
     <image id="n38_9jv6" name="n38" src="9jv66o" fileName="images/lm_djs_db.png" xy="935,0" group="n15_pvb4"/>
     <image id="n38_9jv6" name="n38" src="9jv66o" fileName="images/lm_djs_db.png" xy="935,0" group="n15_pvb4"/>
     <text id="n9_pvb4" name="txtAnswerTime" xy="959,165" pivot="0.5,0" size="74,44" group="n15_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#fffdf8" align="center" text="00:55"/>
     <text id="n9_pvb4" name="txtAnswerTime" xy="959,165" pivot="0.5,0" size="74,44" group="n15_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#fffdf8" align="center" text="00:55"/>
     <text id="n11_pvb4" name="txtAnswerNum" xy="478,124" pivot="0.5,0" size="124,41" group="n15_pvb4" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#8b3510" align="center" text="第1/15题"/>
     <text id="n11_pvb4" name="txtAnswerNum" xy="478,124" pivot="0.5,0" size="124,41" group="n15_pvb4" font="ui://eg2y0ldpa0cftkz" fontSize="30" color="#8b3510" align="center" text="第1/15题"/>
-    <text id="n13_pvb4" name="txtContent" xy="230,274" size="620,142" group="n15_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#915e15" letterSpacing="-2" autoSize="none" text="题目描述题目描述题目描述题目描述题目 描述题目描述题目描述题目描述题目题目 描述述?">
+    <text id="n13_pvb4" name="txtContent" xy="358,274" size="620,173" group="n15_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#915e15" letterSpacing="-2" autoSize="none" text="题目描述题目描述题目描述题目描述题目 描述题目描述题目描述题目描述题目题目 描述述?">
       <gearXY controller="ctrlHasIcon" pages="0,1" values="358,274|230,274"/>
       <gearXY controller="ctrlHasIcon" pages="0,1" values="358,274|230,274"/>
       <gearSize controller="ctrlHasIcon" pages="0,1" values="620,173,1,1|620,142,1,1"/>
       <gearSize controller="ctrlHasIcon" pages="0,1" values="620,173,1,1|620,142,1,1"/>
     </text>
     </text>
-    <list id="n14_pvb4" name="listResult" xy="227,515" pivot="0.5,0" size="625,148" group="n15_pvb4" layout="flow_hz" lineGap="20" lineItemCount="2" defaultItem="ui://tw70qm9d9jv67c" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
+    <list id="n14_pvb4" name="listResult" xy="359,515" pivot="0.5,0" size="625,148" group="n15_pvb4" layout="flow_hz" lineGap="20" lineItemCount="2" defaultItem="ui://tw70qm9d9jv67c" autoItemSize="true" align="center" vAlign="middle" autoClearItems="true">
       <gearDisplay controller="ctrlQuestionType" pages="1"/>
       <gearDisplay controller="ctrlQuestionType" pages="1"/>
       <gearXY controller="ctrlHasIcon" pages="0,1" values="359,515|227,515"/>
       <gearXY controller="ctrlHasIcon" pages="0,1" values="359,515|227,515"/>
       <gearSize controller="ctrlHasIcon" pages="0,1" values="625,148,1,1|625,148,1,1"/>
       <gearSize controller="ctrlHasIcon" pages="0,1" values="625,148,1,1|625,148,1,1"/>
@@ -57,16 +58,16 @@
       <item/>
       <item/>
       <item/>
       <item/>
     </list>
     </list>
-    <text id="n16_pvb4" name="n16" xy="229,472" size="241,41" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" text="请入您的答案:">
+    <text id="n16_pvb4" name="n16" xy="360,472" size="241,41" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" text="请入您的答案:">
       <gearText controller="ctrlQuestionType" pages="1,2" values="请选择您的答案:|请输入您的答案:" default="请填入您的答案:"/>
       <gearText controller="ctrlQuestionType" pages="1,2" values="请选择您的答案:|请输入您的答案:" default="请填入您的答案:"/>
     </text>
     </text>
-    <text id="n17_pvb4" name="txtResult" xy="471,470" size="123,42" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" autoSize="none" text="亚索" input="true">
+    <text id="n17_pvb4" name="txtResult" xy="602,470" size="123,42" group="n19_pvb4" font="ui://eg2y0ldpa0cftks" fontSize="30" color="#b68f52" align="center" autoSize="none" text="亚索" input="true">
       <gearDisplay controller="ctrlQuestionType" pages="2"/>
       <gearDisplay controller="ctrlQuestionType" pages="2"/>
     </text>
     </text>
-    <text id="n18_pvb4" name="n18" xy="472,470" size="124,42" group="n19_pvb4" fontSize="30" color="#b68f52" align="center" autoSize="none" underline="true" text="                       ">
+    <text id="n18_pvb4" name="n18" xy="603,470" size="124,42" group="n19_pvb4" fontSize="30" color="#b68f52" align="center" autoSize="none" underline="true" text="                       ">
       <gearDisplay controller="ctrlQuestionType" pages="2"/>
       <gearDisplay controller="ctrlQuestionType" pages="2"/>
     </text>
     </text>
-    <group id="n19_pvb4" name="n19" xy="229,470" size="367,43" group="n15_pvb4" advanced="true">
+    <group id="n19_pvb4" name="n19" xy="360,470" size="367,43" group="n15_pvb4" advanced="true">
       <gearDisplay controller="ctrlQuestionType" pages=""/>
       <gearDisplay controller="ctrlQuestionType" pages=""/>
       <gearXY controller="ctrlHasIcon" pages="0,1" values="360,470|229,470"/>
       <gearXY controller="ctrlHasIcon" pages="0,1" values="360,470|229,470"/>
     </group>
     </group>
@@ -82,8 +83,7 @@
       <gearDisplay controller="ctrlQuestionState" pages="0"/>
       <gearDisplay controller="ctrlQuestionState" pages="0"/>
     </group>
     </group>
     <component id="n50_miy3" name="comRightHead" src="wm603r" fileName="components/ComHeadIcon.xml" xy="539,369" pivot="0.5,0.5" anchor="true" size="167,166" group="n52_miy3" aspect="true" scale="1.125,1.125"/>
     <component id="n50_miy3" name="comRightHead" src="wm603r" fileName="components/ComHeadIcon.xml" xy="539,369" pivot="0.5,0.5" anchor="true" size="167,166" group="n52_miy3" aspect="true" scale="1.125,1.125"/>
-    <image id="n51_miy3" name="n51" src="wm6037" fileName="images/lm_db_touxiang.png" xy="382,185" group="n52_miy3"/>
-    <group id="n52_miy3" name="n52" xy="382,185" size="316,355" group="n24_pvb4" advanced="true">
+    <group id="n52_miy3" name="n52" xy="455,286" size="167,166" group="n24_pvb4" advanced="true">
       <gearDisplay controller="ctrlResult" pages="1"/>
       <gearDisplay controller="ctrlResult" pages="1"/>
     </group>
     </group>
     <image id="n21_pvb4" name="imgFail" src="9jv66a" fileName="images/fannao.png" xy="394,169" group="n24_pvb4">
     <image id="n21_pvb4" name="imgFail" src="9jv66a" fileName="images/fannao.png" xy="394,169" group="n24_pvb4">
@@ -122,11 +122,12 @@
     <image id="n47_9jv6" name="n47" src="9jv667" fileName="images/lm_dt_srdb.png" xy="0,1665" group="n56_miy3"/>
     <image id="n47_9jv6" name="n47" src="9jv667" fileName="images/lm_dt_srdb.png" xy="0,1665" group="n56_miy3"/>
     <image id="n48_9jv6" name="n48" src="a0cf2g" fileName="images/lm_sousuok.png" xy="84,1779" group="n56_miy3"/>
     <image id="n48_9jv6" name="n48" src="a0cf2g" fileName="images/lm_sousuok.png" xy="84,1779" group="n56_miy3"/>
     <text id="n35_pvb4" name="txtChat" xy="110,1784" size="653,44" group="n56_miy3" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#b4905d" letterSpacing="-2" vars="true" autoSize="none" text="" input="true" prompt="[color=#A7957E]最多输入50个字[/color]" maxLength="50"/>
     <text id="n35_pvb4" name="txtChat" xy="110,1784" size="653,44" group="n56_miy3" font="ui://eg2y0ldpa0cftks" fontSize="32" color="#b4905d" letterSpacing="-2" vars="true" autoSize="none" text="" input="true" prompt="[color=#A7957E]最多输入50个字[/color]" maxLength="50"/>
-    <component id="n36_pvb4" name="btnSend" src="rv091o" fileName="components/Button11.xml" xy="799,1775" size="198,61" group="n56_miy3" pkg="eg2y0ldp">
+    <component id="n36_pvb4" name="btnSend" src="rv091o" fileName="components/Button11.xml" pkg="eg2y0ldp" xy="799,1775" size="198,61" group="n56_miy3">
       <Button title="发送"/>
       <Button title="发送"/>
     </component>
     </component>
     <group id="n56_miy3" name="n56" xy="0,1665" size="1080,255" advanced="true">
     <group id="n56_miy3" name="n56" xy="0,1665" size="1080,255" advanced="true">
       <relation target="" sidePair="bottom-bottom"/>
       <relation target="" sidePair="bottom-bottom"/>
     </group>
     </group>
+    <graph id="n59_idkd" name="holderHead" xy="529,362" size="10,10" visible="false"/>
   </displayList>
   </displayList>
 </component>
 </component>

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/League/UI_LeagueAnsweringUI.cs

@@ -12,6 +12,7 @@ namespace UI.League
         public Controller m_ctrlQuestionType;
         public Controller m_ctrlQuestionType;
         public Controller m_ctrlResult;
         public Controller m_ctrlResult;
         public GLoader m_loaBg;
         public GLoader m_loaBg;
+        public GGraph m_holder;
         public GButton m_btnBack;
         public GButton m_btnBack;
         public GTextField m_txtTime;
         public GTextField m_txtTime;
         public GButton m_btnRule;
         public GButton m_btnRule;
@@ -32,6 +33,7 @@ namespace UI.League
         public GList m_listChat;
         public GList m_listChat;
         public GTextInput m_txtChat;
         public GTextInput m_txtChat;
         public GButton m_btnSend;
         public GButton m_btnSend;
+        public GGraph m_holderHead;
         public const string URL = "ui://tw70qm9dpvb453";
         public const string URL = "ui://tw70qm9dpvb453";
         public const string PACKAGE_NAME = "League";
         public const string PACKAGE_NAME = "League";
         public const string RES_NAME = "LeagueAnsweringUI";
         public const string RES_NAME = "LeagueAnsweringUI";
@@ -84,6 +86,7 @@ namespace UI.League
             m_ctrlQuestionType = comp.GetController("ctrlQuestionType");
             m_ctrlQuestionType = comp.GetController("ctrlQuestionType");
             m_ctrlResult = comp.GetController("ctrlResult");
             m_ctrlResult = comp.GetController("ctrlResult");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_holder = (GGraph)comp.GetChild("holder");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
             m_btnRule = (GButton)comp.GetChild("btnRule");
             m_btnRule = (GButton)comp.GetChild("btnRule");
@@ -104,6 +107,7 @@ namespace UI.League
             m_listChat = (GList)comp.GetChild("listChat");
             m_listChat = (GList)comp.GetChild("listChat");
             m_txtChat = (GTextInput)comp.GetChild("txtChat");
             m_txtChat = (GTextInput)comp.GetChild("txtChat");
             m_btnSend = (GButton)comp.GetChild("btnSend");
             m_btnSend = (GButton)comp.GetChild("btnSend");
+            m_holderHead = (GGraph)comp.GetChild("holderHead");
         }
         }
         public void Dispose(bool disposeTarget = false)
         public void Dispose(bool disposeTarget = false)
         {
         {
@@ -112,6 +116,7 @@ namespace UI.League
             m_ctrlQuestionType = null;
             m_ctrlQuestionType = null;
             m_ctrlResult = null;
             m_ctrlResult = null;
             m_loaBg = null;
             m_loaBg = null;
+            m_holder = null;
             m_btnBack = null;
             m_btnBack = null;
             m_txtTime = null;
             m_txtTime = null;
             m_btnRule = null;
             m_btnRule = null;
@@ -133,6 +138,7 @@ namespace UI.League
             m_listChat = null;
             m_listChat = null;
             m_txtChat = null;
             m_txtChat = null;
             m_btnSend = null;
             m_btnSend = null;
+            m_holderHead = null;
             if(disposeTarget && target != null)
             if(disposeTarget && target != null)
             {
             {
                 target.RemoveFromParent();
                 target.RemoveFromParent();

+ 20 - 6
GameClient/Assets/Game/HotUpdate/Views/League/LeagueAnsweringView.cs

@@ -10,11 +10,17 @@ namespace GFGGame
     public class LeagueAnsweringView : BaseWindow
     public class LeagueAnsweringView : BaseWindow
     {
     {
         private UI_LeagueAnsweringUI _ui;
         private UI_LeagueAnsweringUI _ui;
+        private GameObject _gameObject0;
+        private GameObject _gameObject1;
+        private GoWrapper _wrapper0;
+        private GoWrapper _wrapper1;
         private LeagueDataManager _dataManager;
         private LeagueDataManager _dataManager;
         private List<long> _memberIds;
         private List<long> _memberIds;
 
 
         public override void Dispose()
         public override void Dispose()
         {
         {
+            SceneController.DestroyObjectFromView(_gameObject0, _wrapper0);
+            SceneController.DestroyObjectFromView(_gameObject1, _wrapper1);
             if (_ui != null)
             if (_ui != null)
             {
             {
                 _ui.Dispose();
                 _ui.Dispose();
@@ -43,6 +49,11 @@ namespace GFGGame
             _ui.m_listChat.itemProvider = GetListChatItemResource;
             _ui.m_listChat.itemProvider = GetListChatItemResource;
             _ui.m_listChat.SetVirtual();
             _ui.m_listChat.SetVirtual();
             _ui.m_txtResult.onFocusOut.Add(OnFocuseOut);
             _ui.m_txtResult.onFocusOut.Add(OnFocuseOut);
+
+            string resPath = ResPathUtil.GetViewEffectPath("ui_league", "Answer_bgtx");
+            SceneController.AddObjectToView(null, null, _ui.m_holder, resPath, out _gameObject0, out _wrapper0);
+            string resPath1 = ResPathUtil.GetViewEffectPath("ui_league", "Answer_Succeed");
+            SceneController.AddObjectToView(null, null, _ui.m_holderHead, resPath1, out _gameObject1, out _wrapper1);
         }
         }
         protected override void AddEventListener()
         protected override void AddEventListener()
         {
         {
@@ -75,6 +86,7 @@ namespace GFGGame
             Timers.inst.Remove(UpdateAnswerTime);
             Timers.inst.Remove(UpdateAnswerTime);
             Timers.inst.Remove(UpdateResultTime);
             Timers.inst.Remove(UpdateResultTime);
             Timers.inst.Remove(UpdateActiveTime);
             Timers.inst.Remove(UpdateActiveTime);
+            _ui.m_holderHead.visible = false;
         }
         }
 
 
         protected override void RemoveEventListener()
         protected override void RemoveEventListener()
@@ -135,12 +147,12 @@ namespace GFGGame
                 endTime = TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.leagueQuestionEndTime);
                 endTime = TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.leagueQuestionEndTime);
                 str = "活动剩余时间 ";
                 str = "活动剩余时间 ";
             }
             }
-            // if (endTime - curTime < 0)
-            // {
-            //     Timers.inst.Remove(UpdateResultTime);
-            //     ViewManager.GoBackFrom(typeof(LeagueAnsweringView).FullName);
-            //     return;
-            // }
+            if (endTime - curTime < 0)
+            {
+                Timers.inst.Remove(UpdateResultTime);
+                ViewManager.GoBackFrom(typeof(LeagueAnsweringView).FullName);
+                return;
+            }
             _ui.m_txtTime.text = string.Format("{0}{1}", str, TimeUtil.FormattingTimeTo_mmss(endTime - curTime));
             _ui.m_txtTime.text = string.Format("{0}{1}", str, TimeUtil.FormattingTimeTo_mmss(endTime - curTime));
         }
         }
         private void UpdateQuestionState()
         private void UpdateQuestionState()
@@ -157,6 +169,7 @@ namespace GFGGame
         }
         }
         private void UpdateQuestion()
         private void UpdateQuestion()
         {
         {
+            _ui.m_holderHead.visible = false;
             _ui.m_txtRightCount.SetVar("value", _dataManager.GetNumeriValue(LeagueNumericType.LeagueQuestionTrueCount).ToString()).FlushVars(); ;
             _ui.m_txtRightCount.SetVar("value", _dataManager.GetNumeriValue(LeagueNumericType.LeagueQuestionTrueCount).ToString()).FlushVars(); ;
             _ui.m_txtRightCount1.SetVar("value", _dataManager.GetNumeriValue(LeagueNumericType.LeagueQuestionTrueCount).ToString()).FlushVars(); ;
             _ui.m_txtRightCount1.SetVar("value", _dataManager.GetNumeriValue(LeagueNumericType.LeagueQuestionTrueCount).ToString()).FlushVars(); ;
             _ui.m_ctrlQuestionState.selectedIndex = 0;
             _ui.m_ctrlQuestionState.selectedIndex = 0;
@@ -213,6 +226,7 @@ namespace GFGGame
                 OtherRoleInfoData roleInfoData = _dataManager.GetMemberRoleInfo(_dataManager.LastAnswerRoleData.RightRoleId);
                 OtherRoleInfoData roleInfoData = _dataManager.GetMemberRoleInfo(_dataManager.LastAnswerRoleData.RightRoleId);
                 RoleInfoManager.Instance.UpdateHeadWithLv(_ui.m_comRightHead.target, roleInfoData.headId, roleInfoData.headBorderId, roleInfoData.roleLv);
                 RoleInfoManager.Instance.UpdateHeadWithLv(_ui.m_comRightHead.target, roleInfoData.headId, roleInfoData.headBorderId, roleInfoData.roleLv);
                 _ui.m_txtInfo.text = string.Format("{0} 答对了!", roleInfoData.roleName);
                 _ui.m_txtInfo.text = string.Format("{0} 答对了!", roleInfoData.roleName);
+                _ui.m_holderHead.visible = true;
                 Timers.inst.Remove(UpdateResultTime);
                 Timers.inst.Remove(UpdateResultTime);
                 Timers.inst.Add(1, 0, UpdateResultTime);
                 Timers.inst.Add(1, 0, UpdateResultTime);
             }
             }

BIN
GameClient/Assets/ResIn/UI/League/League_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_4!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_4.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_5.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_6!a.png


BIN
GameClient/Assets/ResIn/UI/League/League_atlas0_6.png


BIN
GameClient/Assets/ResIn/UI/League/League_fui.bytes