|
@@ -121,6 +121,8 @@ namespace GFGGame
|
|
Timers.inst.Remove(UpdateHit);
|
|
Timers.inst.Remove(UpdateHit);
|
|
Timers.inst.Remove(StartTime);
|
|
Timers.inst.Remove(StartTime);
|
|
Timers.inst.Remove(UpdateOneHit);
|
|
Timers.inst.Remove(UpdateOneHit);
|
|
|
|
+ Timers.inst.Remove(FlipAllCard);
|
|
|
|
+ Timers.inst.Remove(ResetTouch);
|
|
base.OnHide();
|
|
base.OnHide();
|
|
|
|
|
|
}
|
|
}
|
|
@@ -189,7 +191,7 @@ namespace GFGGame
|
|
cardItem.target.onClick.Add(OnClickCardItem);
|
|
cardItem.target.onClick.Add(OnClickCardItem);
|
|
}
|
|
}
|
|
Card _c1 = (Card)cardItem.m_card;
|
|
Card _c1 = (Card)cardItem.m_card;
|
|
- _c1.opened = false;
|
|
|
|
|
|
+ _c1.opened = true;
|
|
_c1.SetPerspective();
|
|
_c1.SetPerspective();
|
|
|
|
|
|
itemInfo.Add("index", index);
|
|
itemInfo.Add("index", index);
|
|
@@ -239,23 +241,19 @@ namespace GFGGame
|
|
_ui.m_star1.SetPosition(((float)(gameTime - CustemsNum[0]) / (float)gameTime) * _ui.m_ScareBar.width + 70, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
_ui.m_star1.SetPosition(((float)(gameTime - CustemsNum[0]) / (float)gameTime) * _ui.m_ScareBar.width + 70, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
_ui.m_star2.SetPosition(((float)(gameTime - CustemsNum[1]) / (float)gameTime) * _ui.m_ScareBar.width + 10, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
_ui.m_star2.SetPosition(((float)(gameTime - CustemsNum[1]) / (float)gameTime) * _ui.m_ScareBar.width + 10, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
_ui.m_star3.SetPosition(((float)(gameTime - CustemsNum[2]) / (float)gameTime) * _ui.m_ScareBar.width, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
_ui.m_star3.SetPosition(((float)(gameTime - CustemsNum[2]) / (float)gameTime) * _ui.m_ScareBar.width, _ui.m_star1.position.y, _ui.m_star1.position.z);
|
|
-
|
|
|
|
_ui.m_title.visible = false;
|
|
_ui.m_title.visible = false;
|
|
_ui.m_titleEffec.visible = true;
|
|
_ui.m_titleEffec.visible = true;
|
|
_ui.m_barEffect.x = _ui.m_ScareBar.width;
|
|
_ui.m_barEffect.x = _ui.m_ScareBar.width;
|
|
|
|
|
|
- _ui.m_cardList.touchable = true;
|
|
|
|
- //计时器
|
|
|
|
- Timers.inst.Add(1.0f, 0, UpdateTime);
|
|
|
|
- //进度条计时器
|
|
|
|
- Timers.inst.Add(0.1f, 0, UpdateBar);
|
|
|
|
|
|
+ _ui.m_cardList.touchable = false;
|
|
}
|
|
}
|
|
|
|
|
|
private void UpdateList()
|
|
private void UpdateList()
|
|
-
|
|
|
|
{
|
|
{
|
|
_ui.m_cardList.columnCount = columns;
|
|
_ui.m_cardList.columnCount = columns;
|
|
_ui.m_cardList.numItems = cardNum;
|
|
_ui.m_cardList.numItems = cardNum;
|
|
|
|
+ //翻转所有牌
|
|
|
|
+ Timers.inst.Add(1.0f, 1, FlipAllCard);
|
|
}
|
|
}
|
|
private void OnClickCardItem(EventContext context)
|
|
private void OnClickCardItem(EventContext context)
|
|
{
|
|
{
|
|
@@ -403,6 +401,28 @@ namespace GFGGame
|
|
_ui.m_cardList.touchable = true;
|
|
_ui.m_cardList.touchable = true;
|
|
Timers.inst.Remove(UpdateOneHit);
|
|
Timers.inst.Remove(UpdateOneHit);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void FlipAllCard(object param = null)
|
|
|
|
+ {
|
|
|
|
+ //计时器
|
|
|
|
+ Timers.inst.Add(1.0f, 0, UpdateTime);
|
|
|
|
+ //进度条计时器
|
|
|
|
+ Timers.inst.Add(0.1f, 0, UpdateBar);
|
|
|
|
+ for (int i = 0; i < cardNum; i++)
|
|
|
|
+ {
|
|
|
|
+ UI_cardItem item = UI_cardItem.Proxy(_ui.m_cardList.GetChildAt(i));
|
|
|
|
+ //翻回去
|
|
|
|
+ Card card = (Card)item.m_card;
|
|
|
|
+ card.Turn();
|
|
|
|
+ UI_cardItem.ProxyEnd();
|
|
|
|
+ }
|
|
|
|
+ Timers.inst.Add(0.6f, 1, ResetTouch);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void ResetTouch(object param = null)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_cardList.touchable = true;
|
|
|
|
+ }
|
|
private void UpdateTime(object param = null)
|
|
private void UpdateTime(object param = null)
|
|
{
|
|
{
|
|
timeIndex++;
|
|
timeIndex++;
|