Browse Source

小游戏特效提交

zhangyuqian 1 year ago
parent
commit
245b21ae9f

+ 12 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MiniGame/UI_GameStartUI.cs

@@ -15,10 +15,14 @@ namespace UI.MiniGame
         public GLoader m_addIcon;
         public GTextField m_ticketNum;
         public GLoader m_game1;
+        public GGraph m_effectIcon1;
+        public GGraph m_effectText1;
         public GLoader m_tipsOne;
         public GLoader m_needIcon1;
         public GTextField m_needNum1;
         public GLoader m_game2;
+        public GGraph m_effectIcon2;
+        public GGraph m_effectText2;
         public GLoader m_tipsTwo;
         public GLoader m_needIcon2;
         public GTextField m_needNum2;
@@ -77,10 +81,14 @@ namespace UI.MiniGame
             m_addIcon = (GLoader)comp.GetChild("addIcon");
             m_ticketNum = (GTextField)comp.GetChild("ticketNum");
             m_game1 = (GLoader)comp.GetChild("game1");
+            m_effectIcon1 = (GGraph)comp.GetChild("effectIcon1");
+            m_effectText1 = (GGraph)comp.GetChild("effectText1");
             m_tipsOne = (GLoader)comp.GetChild("tipsOne");
             m_needIcon1 = (GLoader)comp.GetChild("needIcon1");
             m_needNum1 = (GTextField)comp.GetChild("needNum1");
             m_game2 = (GLoader)comp.GetChild("game2");
+            m_effectIcon2 = (GGraph)comp.GetChild("effectIcon2");
+            m_effectText2 = (GGraph)comp.GetChild("effectText2");
             m_tipsTwo = (GLoader)comp.GetChild("tipsTwo");
             m_needIcon2 = (GLoader)comp.GetChild("needIcon2");
             m_needNum2 = (GTextField)comp.GetChild("needNum2");
@@ -95,10 +103,14 @@ namespace UI.MiniGame
             m_addIcon = null;
             m_ticketNum = null;
             m_game1 = null;
+            m_effectIcon1 = null;
+            m_effectText1 = null;
             m_tipsOne = null;
             m_needIcon1 = null;
             m_needNum1 = null;
             m_game2 = null;
+            m_effectIcon2 = null;
+            m_effectText2 = null;
             m_tipsTwo = null;
             m_needIcon2 = null;
             m_needNum2 = null;

+ 18 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MiniGame/UI_ResultTipsUI.cs

@@ -7,6 +7,10 @@ namespace UI.MiniGame
     public partial class UI_ResultTipsUI
     {
         public GComponent target;
+        public GGraph m_effectBg;
+        public GGraph m_effectSucces;
+        public GGraph m_effectFail;
+        public GImage m_bg;
         public GLoader m_resultTitle;
         public GTextField m_failTxt;
         public GLoader m_star1;
@@ -19,6 +23,8 @@ namespace UI.MiniGame
         public GLoader m_exitBtn;
         public GLoader m_consumeIcon;
         public GTextField m_consumeTxt;
+        public GGroup m_desc;
+        public Transition m_t0;
         public const string URL = "ui://wgkh30qjlw8c1w";
         public const string PACKAGE_NAME = "MiniGame";
         public const string RES_NAME = "ResultTipsUI";
@@ -66,6 +72,10 @@ namespace UI.MiniGame
 
         private void Init(GComponent comp)
         {
+            m_effectBg = (GGraph)comp.GetChild("effectBg");
+            m_effectSucces = (GGraph)comp.GetChild("effectSucces");
+            m_effectFail = (GGraph)comp.GetChild("effectFail");
+            m_bg = (GImage)comp.GetChild("bg");
             m_resultTitle = (GLoader)comp.GetChild("resultTitle");
             m_failTxt = (GTextField)comp.GetChild("failTxt");
             m_star1 = (GLoader)comp.GetChild("star1");
@@ -78,9 +88,15 @@ namespace UI.MiniGame
             m_exitBtn = (GLoader)comp.GetChild("exitBtn");
             m_consumeIcon = (GLoader)comp.GetChild("consumeIcon");
             m_consumeTxt = (GTextField)comp.GetChild("consumeTxt");
+            m_desc = (GGroup)comp.GetChild("desc");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
+            m_effectBg = null;
+            m_effectSucces = null;
+            m_effectFail = null;
+            m_bg = null;
             m_resultTitle = null;
             m_failTxt = null;
             m_star1 = null;
@@ -93,6 +109,8 @@ namespace UI.MiniGame
             m_exitBtn = null;
             m_consumeIcon = null;
             m_consumeTxt = null;
+            m_desc = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 9 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MiniGame/UI_TZFEGameCheckUI.cs

@@ -9,18 +9,21 @@ namespace UI.MiniGame
         public GComponent target;
         public GLoader m_backBtn;
         public GLoader m_bg;
+        public GLoader m_gameBg1;
         public GTextField m_gameTitle1;
         public GLoader m_game1;
         public GLoader m_newGame1;
         public GLoader m_needIcon1;
         public GTextField m_needNum1;
         public GLoader m_gameLock1;
+        public GLoader m_gameBg2;
         public GTextField m_gameTitle2;
         public GLoader m_game2;
         public GLoader m_newGame2;
         public GLoader m_gameLock2;
         public GLoader m_needIcon2;
         public GTextField m_needNum2;
+        public GLoader m_gameBg3;
         public GTextField m_gameTitle3;
         public GLoader m_game3;
         public GLoader m_newGame3;
@@ -77,18 +80,21 @@ namespace UI.MiniGame
         {
             m_backBtn = (GLoader)comp.GetChild("backBtn");
             m_bg = (GLoader)comp.GetChild("bg");
+            m_gameBg1 = (GLoader)comp.GetChild("gameBg1");
             m_gameTitle1 = (GTextField)comp.GetChild("gameTitle1");
             m_game1 = (GLoader)comp.GetChild("game1");
             m_newGame1 = (GLoader)comp.GetChild("newGame1");
             m_needIcon1 = (GLoader)comp.GetChild("needIcon1");
             m_needNum1 = (GTextField)comp.GetChild("needNum1");
             m_gameLock1 = (GLoader)comp.GetChild("gameLock1");
+            m_gameBg2 = (GLoader)comp.GetChild("gameBg2");
             m_gameTitle2 = (GTextField)comp.GetChild("gameTitle2");
             m_game2 = (GLoader)comp.GetChild("game2");
             m_newGame2 = (GLoader)comp.GetChild("newGame2");
             m_gameLock2 = (GLoader)comp.GetChild("gameLock2");
             m_needIcon2 = (GLoader)comp.GetChild("needIcon2");
             m_needNum2 = (GTextField)comp.GetChild("needNum2");
+            m_gameBg3 = (GLoader)comp.GetChild("gameBg3");
             m_gameTitle3 = (GTextField)comp.GetChild("gameTitle3");
             m_game3 = (GLoader)comp.GetChild("game3");
             m_newGame3 = (GLoader)comp.GetChild("newGame3");
@@ -101,18 +107,21 @@ namespace UI.MiniGame
         {
             m_backBtn = null;
             m_bg = null;
+            m_gameBg1 = null;
             m_gameTitle1 = null;
             m_game1 = null;
             m_newGame1 = null;
             m_needIcon1 = null;
             m_needNum1 = null;
             m_gameLock1 = null;
+            m_gameBg2 = null;
             m_gameTitle2 = null;
             m_game2 = null;
             m_newGame2 = null;
             m_gameLock2 = null;
             m_needIcon2 = null;
             m_needNum2 = null;
+            m_gameBg3 = null;
             m_gameTitle3 = null;
             m_game3 = null;
             m_newGame3 = null;

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/MiniGame/UI_TZFEGameView.cs

@@ -11,6 +11,8 @@ namespace UI.MiniGame
         public GList m_numList;
         public GLoader m_backBtn;
         public GTextField m_score;
+        public GGraph m_effectTitle;
+        public GImage m_title;
         public GLoader m_star3;
         public GLoader m_star2;
         public GLoader m_star1;
@@ -69,6 +71,8 @@ namespace UI.MiniGame
             m_numList = (GList)comp.GetChild("numList");
             m_backBtn = (GLoader)comp.GetChild("backBtn");
             m_score = (GTextField)comp.GetChild("score");
+            m_effectTitle = (GGraph)comp.GetChild("effectTitle");
+            m_title = (GImage)comp.GetChild("title");
             m_star3 = (GLoader)comp.GetChild("star3");
             m_star2 = (GLoader)comp.GetChild("star2");
             m_star1 = (GLoader)comp.GetChild("star1");
@@ -83,6 +87,8 @@ namespace UI.MiniGame
             m_numList = null;
             m_backBtn = null;
             m_score = null;
+            m_effectTitle = null;
+            m_title = null;
             m_star3 = null;
             m_star2 = null;
             m_star1 = null;

+ 30 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -407,7 +407,8 @@ namespace GFGGame
         }
         private void OnClickBtnBag()
         {
-            ViewManager.Show<BagView>();
+            //ViewManager.Show<BagView>();
+            ViewManager.Show<ActivityTeaMainView>();
         }
 
         private void OnClickBtnLeague()
@@ -1070,6 +1071,34 @@ namespace GFGGame
                     return;
                 }
             }
+            //月卡弹窗
+            if (GameGlobal.AutoMonthlyCardView)
+            {
+                GameGlobal.AutoMonthlyCardView = false;
+                if (GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropCzykActivity) == 0)
+                {
+                    long endTime1 = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardGoldEndTime);
+                    long endTime2 = GameGlobal.myNumericComponent.GetAsLong(NumericType.MonthCardBlackGoldEndTime);
+                    if (endTime1 < TimeHelper.ServerNow())
+                    {
+                        if (endTime2 < TimeHelper.ServerNow())
+                        {
+                            ViewManager.Show<MonthlyCardTipsView>();
+                        }
+                    }
+                    return; 
+                }
+            }
+            //活动公告弹窗
+            if (GameGlobal.AutoAcitivtyTipsLoginView)
+            {
+                GameGlobal.AutoAcitivtyTipsLoginView = false;
+                if (GameGlobal.myNumericComponent.GetAsInt(NumericType.IsPropYchmActivity) == 0)
+                {
+                    ViewManager.Show<ActivityMainTipsView>();
+                    return;
+                }
+            }
             if (GameGlobal.AutoSpecialOfferGiftBoxView)
             {
                 //List<int> shopListId = new List<int>() { 40012, 40013 };

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/MiniGame/FlipGameView.cs

@@ -86,6 +86,7 @@ namespace GFGGame
             _ui = UI_FlipGameUI.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
+            isReturnView = true;
             _ui.m_cardList.itemRenderer = ListCardItem;
             _ui.m_back.onClick.Add(OnClickBtnBack);
 

+ 22 - 0
GameClient/Assets/Game/HotUpdate/Views/MiniGame/GameStartView.cs

@@ -23,8 +23,21 @@ namespace GFGGame
         private int NumTicketOne = 3;
         private int NumTicketTwo = 3;
 
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
+        private EffectUI _effectUI4;
+
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            EffectUIPool.Recycle(_effectUI4);
+            _effectUI4 = null;
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -40,6 +53,7 @@ namespace GFGGame
             _ui = UI_GameStartUI.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
+            isReturnView = true;
 
             _ui.m_game1.onClick.Add(OnClickBtnGameOne);
             _ui.m_game2.onClick.Add(OnClickBtnGameTwo);
@@ -49,6 +63,11 @@ namespace GFGGame
             _ui.m_rewardBtn.onClick.Add(OnClickBtnReward);
             _ui.m_tipsOne.onClick.Add(RuleController.ShowRuleView);
             _ui.m_tipsTwo.onClick.Add(RuleController.ShowRuleView);
+
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_effectIcon1, "ui_Activity", "YXJY_Icon");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_effectText1, "ui_Activity", "YXJY_Game_Text");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_effectIcon2, "ui_Activity", "SGLL_Icon");
+            _effectUI4 = EffectUIPool.CreateEffectUI(_ui.m_effectText2, "ui_Activity", "SGLL_Game_Text");
         }
 
         protected override void OnShown()
@@ -93,8 +112,11 @@ namespace GFGGame
             _ui.m_needIcon2.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(3000017).res);
             _ui.m_needNum2.visible = false;
             _ui.m_needIcon2.visible = false;
+            _ui.m_game1.url = "";
+            _ui.m_game2.url = "";
             _ui.m_tipsOne.data = 300026;
             _ui.m_tipsTwo.data = 300027;
+
             ItemData item;
             if (BagDataManager.Instance.GetBagData().TryGetValue(3000017,out item))
             {

+ 23 - 1
GameClient/Assets/Game/HotUpdate/Views/MiniGame/ResultTipsView.cs

@@ -23,9 +23,18 @@ namespace GFGGame
             30,
             60,
         };
+
+        private EffectUI _effectUI1;
+        private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
         public override void Dispose()
         {
-
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
+            EffectUIPool.Recycle(_effectUI2);
+            _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -45,6 +54,10 @@ namespace GFGGame
             _ui.m_againBtn.onClick.Add(OnClickAgain);
 
             _ui.m_rewardList.itemRenderer = RenderRewardList;
+
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_effectBg, "ui_Activity", "Game_Quad_Open");
+            _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_effectSucces, "ui_Activity", "Game_Quad_Win");
+            _effectUI3 = EffectUIPool.CreateEffectUI(_ui.m_effectFail, "ui_Activity", "Game_Quad_Lose");
         }
         protected override void OnShown()
         {
@@ -89,10 +102,14 @@ namespace GFGGame
                 default:
                     break;
             }
+
+            _ui.m_t0.Play();
             if (gameResult)
             {
                 _ui.m_failTxt.visible = false;
                 _ui.m_success.visible = true ;
+                _ui.m_effectFail.visible = false;
+                _ui.m_effectSucces.visible = true;
                 _ui.m_resultTxt.text = "通关奖励";
                 _ui.m_resultTitle.url = "ui://MiniGame/shengli_bt";
                 UpdateStar();
@@ -101,9 +118,13 @@ namespace GFGGame
             {
                 _ui.m_failTxt.visible = true;
                 _ui.m_success.visible = false;
+                _ui.m_effectSucces.visible = false;
+                _ui.m_effectFail.visible = true;
                 _ui.m_resultTxt.text = "失败奖励";
                 _ui.m_resultTitle.url = "ui://MiniGame/shibai_bt";
             }
+            _ui.m_resultTitle.visible = false;
+            _ui.m_bg.visible = false;
             activityGameDate = ActivityOpenCfgArray.Instance.GetCfgsBytype(ConstLimitTimeActivityType.ActLimitStlyc);
         }
 
@@ -150,6 +171,7 @@ namespace GFGGame
         {
             this.Hide();
             ViewManager.Hide(viewJumpView[gameType]);
+            ViewManager.Show<GameStartView>();
             EventAgent.DispatchEvent(ConstMessage.TZFE_GAME_UPDATE);
         }
         private async void OnClickAgain()

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/MiniGame/TZFEGameCheckView.cs

@@ -39,6 +39,9 @@ namespace GFGGame
             _ui.m_game1.onClick.Add(OnClickBtnGameOne);
             _ui.m_game2.onClick.Add(OnClickBtnGameTwo);
             _ui.m_game3.onClick.Add(OnClickBtnGameThree);
+            _ui.m_gameBg1.onClick.Add(OnClickBtnGameOne);
+            _ui.m_gameBg2.onClick.Add(OnClickBtnGameTwo);
+            _ui.m_gameBg3.onClick.Add(OnClickBtnGameThree);
             _ui.m_backBtn.onClick.Add(OnClickBtnBack);
             _ui.m_tipsOne.onClick.Add(RuleController.ShowRuleView);
         }
@@ -73,6 +76,9 @@ namespace GFGGame
             _ui.m_needIcon2.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(3000017).res);
             _ui.m_needIcon3.url = ResPathUtil.GetCommonGameResPath(ItemCfgArray.Instance.GetCfg(3000017).res);
 
+            _ui.m_game1.url = ResPathUtil.GetMiniGamePicPath(Merge2048CfgArray.Instance.GetCfgsByidAndnum(gameDate[0].subType, gameDate[0].targetNum)[0].resName);
+            _ui.m_game2.url = ResPathUtil.GetMiniGamePicPath(Merge2048CfgArray.Instance.GetCfgsByidAndnum(gameDate[1].subType, gameDate[1].targetNum)[0].resName);
+            _ui.m_game3.url = ResPathUtil.GetMiniGamePicPath(Merge2048CfgArray.Instance.GetCfgsByidAndnum(gameDate[2].subType, gameDate[2].targetNum)[0].resName);
             OnCheckChange();
             _ui.m_tipsOne.data = 300027;
         }
@@ -120,6 +126,7 @@ namespace GFGGame
             if (!result) return;
             //当存在关卡时需要获取后台数据,哪一关了,这个可以在关卡界面写
             ViewManager.Show($"GFGGame.{viewJumpName[type]}", new object[] { Merge2048GameArray.Instance.GetCfgsBytypeAndsubType(type, subType)[0].id });
+            this.Hide();
         }
         private async void OnClickBtnGameTwo()
         {
@@ -132,6 +139,7 @@ namespace GFGGame
             if (!result) return;
             //当存在关卡时需要获取后台数据,哪一关了,这个可以在关卡界面写
             ViewManager.Show($"GFGGame.{viewJumpName[type]}", new object[] { Merge2048GameArray.Instance.GetCfgsBytypeAndsubType(type, subType)[1].id });
+            this.Hide();
         }
 
         private async void OnClickBtnGameThree()
@@ -145,6 +153,7 @@ namespace GFGGame
             if (!result) return;
             //当存在关卡时需要获取后台数据,哪一关了,这个可以在关卡界面写
             ViewManager.Show($"GFGGame.{viewJumpName[type]}", new object[] { Merge2048GameArray.Instance.GetCfgsBytypeAndsubType(type, subType)[2].id });
+            this.Hide();
         }
 
     }

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/MiniGame/TZFEGameVIew.cs

@@ -48,8 +48,12 @@ namespace GFGGame
         private List<NumPos> numPosArray = new List<NumPos>();
         private int time = 0;
 
+        private EffectUI _effectUI1;
+
         public override void Dispose()
         {
+            EffectUIPool.Recycle(_effectUI1);
+            _effectUI1 = null;
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -65,12 +69,16 @@ namespace GFGGame
             _ui = UI_TZFEGameView.Create();
             this.viewCom = _ui.target;
             isfullScreen = true;
+            isReturnView = true;
             _ui.m_numList.itemRenderer = ListNumItem;
             _ui.m_numList.onTouchBegin.Add(OnClickBegin);
             _ui.m_numList.onTouchEnd.Add(OnClickEnd);
             _ui.m_backBtn.onClick.Add(OnClickBtnBack);
             _ui.m_mergeBtn.onClick.Add(OnClickMergeTips);
             Map = new int[rows, columns];
+
+
+            _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_effectTitle, "ui_Activity", "SGLL_Game_Text");
         }
 
         protected override void OnShown()
@@ -141,6 +149,7 @@ namespace GFGGame
             _ui.m_score.visible = false;
             _ui.m_time.visible = false;
             _ui.m_timeNum.visible = false;
+            _ui.m_title.visible = false;
             rand = new System.Random();
             UpdateStar();
             Timers.inst.Add(1.0f, 0, UpdateTime);

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes


+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_atlas0.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 1db29bf9ff0692045ac4f59cb2b34cbb
+guid: e53a2d486e123ff449d0d8ca7dac0d95
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_atlas0_1.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 25dc8c3b188c0104e94f3f7ff3f37976
+guid: b6e7ae7e7970fb349991c64d6e478ba5
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_atlas0_2.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: dcef95d2b22de4f45bc0dd74b89091e7
+guid: 57a8060b5c1ebc2449a6de7b32289d32
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_atlas0_3.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9928da8862c10de46bba71d1e1f81149
+guid: a0a46aa97480fb94b8e713b6b9450d08
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_atlas0_4.png.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: e7e6403e08c196842807ec3ea7a1e2d6
+guid: 0a6ac0f4899490349b1e2d75adb391f6
 TextureImporter:
   internalIDToNameTable: []
   externalObjects: {}

BIN
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_fui.bytes


+ 1 - 1
GameClient/Assets/ResIn/UI/MiniGame/MiniGame_fui.bytes.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 6e54089c5db82c54080b087d3ac27dd7
+guid: f11182c92a1bb754fb752569bc0ce12f
 TextScriptImporter:
   externalObjects: {}
   userData: