浏览代码

小游戏补充提交

zhangyuqian 1 年之前
父节点
当前提交
5ffcd64ca3

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/MiniGame/FlipGameView.cs

@@ -21,8 +21,10 @@ namespace GFGGame
         private int needNum;
         //游戏结束时长(配置)
         private int gameTime = 120;
-        //游戏当前时长
+        //游戏当前时长倒计时
         private int currentGameTime = 120;
+        //当前游戏时长
+        private int timeIndex = 0;
         //进度条
         private float barTime = 120.0f;
         //行数
@@ -130,6 +132,7 @@ namespace GFGGame
         }
         private void UpdateView()
         {
+            timeIndex = 0;
             currentGameTime = gameTime;
             currentCardNum = cardNum;
             barTime = (float)gameTime;
@@ -257,6 +260,7 @@ namespace GFGGame
         }
         private void UpdateTime(object param = null)
         {
+            timeIndex++;
             currentGameTime--;
             //_ui.m_ScareBar.value = currentGameTime;
             _ui.m_timeText.text = string.Format ("{0}", currentGameTime);
@@ -282,7 +286,7 @@ namespace GFGGame
             Timers.inst.Remove(UpdateBar);
             if (isPass)
             {
-                ViewManager.Show<ResultTipsView>(new object[] { isPass, typeof(FlipGameView).FullName, currentGameTime });
+                ViewManager.Show<ResultTipsView>(new object[] { isPass, typeof(FlipGameView).FullName, timeIndex });
             }
             else
             {

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

@@ -14,7 +14,7 @@ namespace GFGGame
         private int timeResult;
         private string gameName;
 
-        //通关评价
+        //通关评价,不同关卡不同
         private List<int> CustemsNum = new List<int>()
         {
             10,
@@ -107,6 +107,9 @@ namespace GFGGame
                     _ui.m_star3.url = "ui://MiniGame/tb_zx_pt_star";
                     break;
                 default:
+                    _ui.m_star1.url = "ui://MiniGame/tb_zx_pt_star_grey";
+                    _ui.m_star2.url = "ui://MiniGame/tb_zx_pt_star_grey";
+                    _ui.m_star3.url = "ui://MiniGame/tb_zx_pt_star_grey";
                     break;
             }
         }

+ 14 - 5
GameClient/Assets/Game/HotUpdate/Views/MiniGame/TZFEGameVIew.cs

@@ -26,6 +26,13 @@ namespace GFGGame
         private int scoreMax = 0;
         //目标分数
         private int targetNum = 128;
+        //评价
+        private List<int> CustemsNum = new List<int>()
+        {
+            240,
+            180,
+            120,
+        };
         private bool isMove;
         private bool isMerge;
         private struct NumPos
@@ -93,7 +100,7 @@ namespace GFGGame
         {
             time = 0;
             score = 0;
-            targetNum = 64;
+            targetNum = 512;
             _ui.m_score.text = string.Format("分数:{0}", score.ToString());
             _ui.m_score.visible = false;
             rand = new System.Random();
@@ -162,8 +169,7 @@ namespace GFGGame
             }
             if(!gameOver)
             {
-                // 游戏结束
-                GameOver(false);
+                //GameOver(false);
                 return;
             }
             while (true)
@@ -420,12 +426,15 @@ namespace GFGGame
             }
             if(isMerge || isMove)
             {
-                isMerge = false;
                 isMove = false;
+                isMerge = false;
                 UpdateList();
                 numPosArray.Clear();
             }
-            CheckArray();
+            else
+            {
+                CheckArray();
+            }
         }
 
         private void OnClickBegin()