|
@@ -24,11 +24,11 @@ namespace GFGGame
|
|
private int _selectTab = 0;
|
|
private int _selectTab = 0;
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
private List<GGraph> _listEffectHolder = new List<GGraph>();
|
|
private List<GGraph> _listEffectHolder = new List<GGraph>();
|
|
- private List<CardData> cardList = new List<CardData>();
|
|
|
|
- private int wordRow = 4; //字行数
|
|
|
|
- private int wordNumber = 5;//字每行个数
|
|
|
|
- private int nowIndex = 0;
|
|
|
|
- private bool refDodgeStar = true;
|
|
|
|
|
|
+ private List<CardData> _cardList = new List<CardData>();
|
|
|
|
+ private int _wordRow = 4; //字行数
|
|
|
|
+ private int _wordNumber = 5;//字每行个数
|
|
|
|
+ private int _nowIndex = 0;
|
|
|
|
+ private bool _refDodgeStar = true;
|
|
private int _isAutoSelect = 0;
|
|
private int _isAutoSelect = 0;
|
|
|
|
|
|
private EffectUI _effectUI1;
|
|
private EffectUI _effectUI1;
|
|
@@ -147,7 +147,7 @@ namespace GFGGame
|
|
|
|
|
|
private void RefLeftAndRight()
|
|
private void RefLeftAndRight()
|
|
{
|
|
{
|
|
- if (nowIndex <= 0)
|
|
|
|
|
|
+ if (_nowIndex <= 0)
|
|
{
|
|
{
|
|
_ui.m_btnLeft.grayed = true;
|
|
_ui.m_btnLeft.grayed = true;
|
|
_ui.m_btnLeft.touchable = false;
|
|
_ui.m_btnLeft.touchable = false;
|
|
@@ -157,7 +157,7 @@ namespace GFGGame
|
|
_ui.m_btnLeft.touchable = true;
|
|
_ui.m_btnLeft.touchable = true;
|
|
}
|
|
}
|
|
|
|
|
|
- if (nowIndex >= cardList.Count - 1)
|
|
|
|
|
|
+ if (_nowIndex >= _cardList.Count - 1)
|
|
{
|
|
{
|
|
_ui.m_btnRight.grayed = true;
|
|
_ui.m_btnRight.grayed = true;
|
|
_ui.m_btnRight.touchable = false;
|
|
_ui.m_btnRight.touchable = false;
|
|
@@ -171,17 +171,17 @@ namespace GFGGame
|
|
|
|
|
|
private void OnClickBtnLeft()
|
|
private void OnClickBtnLeft()
|
|
{
|
|
{
|
|
- nowIndex -= 1;
|
|
|
|
|
|
+ _nowIndex -= 1;
|
|
RefLeftAndRight();
|
|
RefLeftAndRight();
|
|
- _cardData = cardList[nowIndex];
|
|
|
|
|
|
+ _cardData = _cardList[_nowIndex];
|
|
RefCardFosterInfo();
|
|
RefCardFosterInfo();
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnRight()
|
|
private void OnClickBtnRight()
|
|
{
|
|
{
|
|
- nowIndex += 1;
|
|
|
|
|
|
+ _nowIndex += 1;
|
|
RefLeftAndRight();
|
|
RefLeftAndRight();
|
|
- _cardData = cardList[nowIndex];
|
|
|
|
|
|
+ _cardData = _cardList[_nowIndex];
|
|
RefCardFosterInfo();
|
|
RefCardFosterInfo();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -231,16 +231,16 @@ namespace GFGGame
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("cp_beijing");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("cp_beijing");
|
|
|
|
|
|
_cardData = CardDataManager.GetCardDataById((this.viewData as CardData).id);
|
|
_cardData = CardDataManager.GetCardDataById((this.viewData as CardData).id);
|
|
- nowIndex = _cardData.index;
|
|
|
|
|
|
+ _nowIndex = _cardData.index;
|
|
_comFosterBottom = _ui.m_ComFosterBottom;
|
|
_comFosterBottom = _ui.m_ComFosterBottom;
|
|
|
|
|
|
- cardList = CardDataManager.GetCardListByRarity(_cardData.pageIndex);
|
|
|
|
|
|
+ _cardList = CardDataManager.GetCardListByRarity(_cardData.pageIndex);
|
|
if (CardDataManager.isFilter == true)
|
|
if (CardDataManager.isFilter == true)
|
|
{
|
|
{
|
|
//筛选
|
|
//筛选
|
|
- cardList = CardDataManager.FilterCardList(cardList);
|
|
|
|
|
|
+ _cardList = CardDataManager.FilterCardList(_cardList);
|
|
}
|
|
}
|
|
- cardList = CardDataManager.SortItemList(cardList);
|
|
|
|
|
|
+ _cardList = CardDataManager.SortItemList(_cardList);
|
|
|
|
|
|
RefCardFosterInfo();
|
|
RefCardFosterInfo();
|
|
}
|
|
}
|
|
@@ -707,10 +707,10 @@ namespace GFGGame
|
|
_comFosterBottom.m_btnCheckAuto.selected = _isAutoSelect == 1;
|
|
_comFosterBottom.m_btnCheckAuto.selected = _isAutoSelect == 1;
|
|
|
|
|
|
//升星后星数正5才不进入
|
|
//升星后星数正5才不进入
|
|
- if (refDodgeStar || _cardData.star % 5 != 0) {
|
|
|
|
|
|
+ if (_refDodgeStar || _cardData.star % 5 != 0) {
|
|
UpdateUpStarOfStarAndText();
|
|
UpdateUpStarOfStarAndText();
|
|
}
|
|
}
|
|
- refDodgeStar = true;
|
|
|
|
|
|
+ _refDodgeStar = true;
|
|
|
|
|
|
_comFosterBottom.m_btnRule.onClick.Add(RuleController.ShowRuleView);
|
|
_comFosterBottom.m_btnRule.onClick.Add(RuleController.ShowRuleView);
|
|
_comFosterBottom.m_btnRule.data = 300021;
|
|
_comFosterBottom.m_btnRule.data = 300021;
|
|
@@ -749,8 +749,8 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateUpStarOfStar()
|
|
private void UpdateUpStarOfStar()
|
|
{
|
|
{
|
|
- int starLevelDodge = _cardData.star / wordNumber;
|
|
|
|
- for (int i = 0; i < wordRow; i++)
|
|
|
|
|
|
+ int starLevelDodge = _cardData.star / _wordNumber;
|
|
|
|
+ for (int i = 0; i < _wordRow; i++)
|
|
{
|
|
{
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + i));
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + i));
|
|
dodgeStar.m_lightType.selectedIndex = (starLevelDodge > i) ? 1 : 0;
|
|
dodgeStar.m_lightType.selectedIndex = (starLevelDodge > i) ? 1 : 0;
|
|
@@ -760,10 +760,10 @@ namespace GFGGame
|
|
|
|
|
|
private void UpdateUpStarOfText()
|
|
private void UpdateUpStarOfText()
|
|
{
|
|
{
|
|
- int starLevel = _cardData.star / wordNumber;
|
|
|
|
- if (starLevel >= wordRow)
|
|
|
|
- starLevel = wordRow - 1;
|
|
|
|
- int index = starLevel * wordNumber;
|
|
|
|
|
|
+ int starLevel = _cardData.star / _wordNumber;
|
|
|
|
+ if (starLevel >= _wordRow)
|
|
|
|
+ starLevel = _wordRow - 1;
|
|
|
|
+ int index = starLevel * _wordNumber;
|
|
UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem"));
|
|
UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem"));
|
|
string starDesc = "";
|
|
string starDesc = "";
|
|
for (int j = 0; j < _cardData.itemCfg.starDescArr[starLevel].Length; j++)
|
|
for (int j = 0; j < _cardData.itemCfg.starDescArr[starLevel].Length; j++)
|
|
@@ -891,7 +891,7 @@ namespace GFGGame
|
|
if (result)
|
|
if (result)
|
|
{
|
|
{
|
|
UpdateCommon();
|
|
UpdateCommon();
|
|
- refDodgeStar = false;
|
|
|
|
|
|
+ _refDodgeStar = false;
|
|
UpdateUpStarView();
|
|
UpdateUpStarView();
|
|
UpdateCardRes();
|
|
UpdateCardRes();
|
|
// this._selectTab = _comFosterBottom.m_ctrlTab.selectedIndex;
|
|
// this._selectTab = _comFosterBottom.m_ctrlTab.selectedIndex;
|
|
@@ -900,8 +900,8 @@ namespace GFGGame
|
|
UpdateRedDot();
|
|
UpdateRedDot();
|
|
|
|
|
|
if (_cardData.star % 5 == 0) {
|
|
if (_cardData.star % 5 == 0) {
|
|
- int starLevelDodge = _cardData.star / wordNumber;
|
|
|
|
- int starLevel = _cardData.star / wordNumber - 1;
|
|
|
|
|
|
+ int starLevelDodge = _cardData.star / _wordNumber;
|
|
|
|
+ int starLevel = _cardData.star / _wordNumber - 1;
|
|
UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem"));
|
|
UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem"));
|
|
string starDesc = "";
|
|
string starDesc = "";
|
|
for (int j = 0; j < _cardData.itemCfg.starDescArr[starLevel].Length; j++)
|
|
for (int j = 0; j < _cardData.itemCfg.starDescArr[starLevel].Length; j++)
|
|
@@ -940,7 +940,7 @@ namespace GFGGame
|
|
EffectUIPool.Recycle(_effectUI9);
|
|
EffectUIPool.Recycle(_effectUI9);
|
|
_effectUI9 = null;
|
|
_effectUI9 = null;
|
|
}
|
|
}
|
|
- int starLevelDodge = _cardData.star / wordNumber;
|
|
|
|
|
|
+ int starLevelDodge = _cardData.star / _wordNumber;
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + (starLevelDodge - 1)));
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + (starLevelDodge - 1)));
|
|
//升星字体拖尾特效
|
|
//升星字体拖尾特效
|
|
_effectUI9 = EffectUIPool.CreateEffectUI(dodgeStar.m_holderUpStarMove, "ui_Activity", "SX_Text_Taril_02");
|
|
_effectUI9 = EffectUIPool.CreateEffectUI(dodgeStar.m_holderUpStarMove, "ui_Activity", "SX_Text_Taril_02");
|
|
@@ -960,7 +960,7 @@ namespace GFGGame
|
|
EffectUIPool.Recycle(_effectUI10);
|
|
EffectUIPool.Recycle(_effectUI10);
|
|
_effectUI10 = null;
|
|
_effectUI10 = null;
|
|
}
|
|
}
|
|
- int starLevelDodge = _cardData.star / wordNumber;
|
|
|
|
|
|
+ int starLevelDodge = _cardData.star / _wordNumber;
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + (starLevelDodge - 1)));
|
|
UI_ComDodgeStar dodgeStar = UI_ComDodgeStar.Proxy(_comFosterBottom.target.GetChild("dodgeStar" + (starLevelDodge - 1)));
|
|
//星星特效
|
|
//星星特效
|
|
_effectUI10 = EffectUIPool.CreateEffectUI(dodgeStar.m_holderStarLight, "ui_Activity", "SX_Text_STAR_03");
|
|
_effectUI10 = EffectUIPool.CreateEffectUI(dodgeStar.m_holderStarLight, "ui_Activity", "SX_Text_STAR_03");
|
|
@@ -1049,7 +1049,7 @@ namespace GFGGame
|
|
float diffValueX = touchBeginX - inputEvent.x;
|
|
float diffValueX = touchBeginX - inputEvent.x;
|
|
if (diffValueX > 20 && showCard == false)
|
|
if (diffValueX > 20 && showCard == false)
|
|
{
|
|
{
|
|
- if (nowIndex < cardList.Count - 1)
|
|
|
|
|
|
+ if (_nowIndex < _cardList.Count - 1)
|
|
{
|
|
{
|
|
OnClickBtnRight();
|
|
OnClickBtnRight();
|
|
RefLeftAndRight();
|
|
RefLeftAndRight();
|
|
@@ -1057,7 +1057,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
else if (diffValueX < -20 && showCard == false)
|
|
else if (diffValueX < -20 && showCard == false)
|
|
{
|
|
{
|
|
- if (nowIndex > 0)
|
|
|
|
|
|
+ if (_nowIndex > 0)
|
|
{
|
|
{
|
|
OnClickBtnLeft();
|
|
OnClickBtnLeft();
|
|
RefLeftAndRight();
|
|
RefLeftAndRight();
|