zhangyuqian 1 рік тому
батько
коміт
a48ea61e6f

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

@@ -18,7 +18,7 @@ namespace GFGGame
         //"state" 0:未翻开,1:已翻开,2:已消除
         private List<Dictionary<string, int>> cardList = new List<Dictionary<string, int>>();
         //消除所需数量(配置)
-        private int needNum = 2;
+        private int needNum;
         //游戏结束时长(配置)
         private int gameTime = 120;
         //游戏当前时长
@@ -43,7 +43,7 @@ namespace GFGGame
         };
 
         //假数据
-        private int[] cardArray = new int[] { 1,1, 2,2,  3, 3 , 4, 4 ,  5, 5 ,  6, 6 ,  7, 7 , 8, 8  };
+        private int[] cardArray = new int[] { 1,1, 2,2,  3, 3 , 4, 4 ,  5, 5 ,  6, 6 ,  8, 8 , 8, 8  };
 
         Card _c1 = new Card();
         private float waitTime = 0.6f;
@@ -139,7 +139,7 @@ namespace GFGGame
             _ui.m_star1.SetPosition(((float)CustemsNum[0]/(float)gameTime)*_ui.m_ScareBar.width,_ui.m_star1.position.y, _ui.m_star1.position.z);
             _ui.m_star2.SetPosition(((float)CustemsNum[1] / (float)gameTime) * _ui.m_ScareBar.width, _ui.m_star1.position.y, _ui.m_star1.position.z);
             _ui.m_star3.SetPosition(((float)CustemsNum[2] / (float)gameTime) * _ui.m_ScareBar.width, _ui.m_star1.position.y, _ui.m_star1.position.z);
-            //CustemsNum = ;  
+ 
             //计时器
             Timers.inst.Add(1.0f, 0, UpdateTime);
         }
@@ -223,12 +223,12 @@ namespace GFGGame
                     }
                     currentCardNum -= cardList.Count;
                     cardList.Clear();
-                    _ui.m_cardList.touchable = true;
                     if(currentCardNum <= 0)
                     {
                         Gameover(true);
                     }
                 }
+                _ui.m_cardList.touchable = true;
             }
             else
             {
@@ -244,8 +244,7 @@ namespace GFGGame
                     UI_cardItem.ProxyEnd();
                 }
                 Timers.inst.Add(waitTime, 1, canTouch);
-                cardList.Clear();
-                
+                cardList.Clear(); 
             }
         }
         private void UpdateTime(object param = null)