【Bug】选关特效bug
parent
5317bfa62a
commit
10f68072a3
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"columnCount": 5,
|
"columnCount": 5,
|
||||||
"rowCount": 5,
|
"rowCount": 5,
|
||||||
"undoCount": 1,
|
"undoCount": 0,
|
||||||
"addTimeCount": 1,
|
"addTimeCount": 0,
|
||||||
"openHoleCount": 1,
|
"openHoleCount": 0,
|
||||||
"resetCount": 1,
|
"resetCount": 1,
|
||||||
"holesIndex": [
|
"holesIndex": [
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -32,24 +32,22 @@ public class UILevelSelectItem : UIListItem<UILevelDataArray>
|
||||||
var groupIndex = passLevelIndex / LevelConstants.LevelSelectCount;
|
var groupIndex = passLevelIndex / LevelConstants.LevelSelectCount;
|
||||||
var levelIndex = passLevelIndex % LevelConstants.LevelSelectCount;
|
var levelIndex = passLevelIndex % LevelConstants.LevelSelectCount;
|
||||||
|
|
||||||
|
DebugUtil.LogError("通关是:{0}", passLevelIndex);
|
||||||
//根据数据绑定UI
|
//根据数据绑定UI
|
||||||
for (int i = 0; i < LevelConstants.LevelSelectCount; i++)
|
for (int i = 0; i < LevelConstants.LevelSelectCount; i++)
|
||||||
{
|
{
|
||||||
_btns[i] = _go.GetItem<Button>(string.Format(BtnPath, i));
|
_btns[i] = _go.GetItem<Button>(string.Format(BtnPath, i));
|
||||||
_levelIDTexts[i] = _go.GetItem<TextMeshProUGUI>(string.Format(LevelIDPath, i));
|
_levelIDTexts[i] = _go.GetItem<TextMeshProUGUI>(string.Format(LevelIDPath, i));
|
||||||
_locks[i] = _go.GetItem<Image>(string.Format(LockPath, i));
|
_locks[i] = _go.GetItem<Image>(string.Format(LockPath, i));
|
||||||
if (groupIndex == data.LevelIndex && levelIndex == i)
|
|
||||||
{
|
|
||||||
LevelSelectManager.Instance.CurBtnObj = _go.FindObj(string.Format(BtnPath, i));
|
|
||||||
LevelSelectManager.Instance.GfxSelectLevel.transform.position =
|
|
||||||
LevelSelectManager.Instance.CurBtnObj.transform.position;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.LevelIndex == groupIndex - 1 && levelIndex == 0)
|
//最后一关
|
||||||
|
var gfx = false;
|
||||||
|
if (passLevelIndex == LevelSelectManager.Instance.CurAllLevelDatas.Count &&
|
||||||
|
groupIndex * LevelConstants.LevelSelectCount == passLevelIndex)
|
||||||
{
|
{
|
||||||
var tempIndex = _btns.Length - 1;
|
gfx = true;
|
||||||
LevelSelectManager.Instance.CurBtnObj = _go.FindObj(string.Format(BtnPath, tempIndex));
|
LevelSelectManager.Instance.CurBtnObj = _go.FindObj(string.Format(BtnPath, _btns.Length - 1));
|
||||||
LevelSelectManager.Instance.GfxSelectLevel.transform.position =
|
LevelSelectManager.Instance.GfxSelectLevel.transform.position =
|
||||||
LevelSelectManager.Instance.CurBtnObj.transform.position;
|
LevelSelectManager.Instance.CurBtnObj.transform.position;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +57,14 @@ public class UILevelSelectItem : UIListItem<UILevelDataArray>
|
||||||
{
|
{
|
||||||
if (data.LevelID[i] != null)
|
if (data.LevelID[i] != null)
|
||||||
{
|
{
|
||||||
|
//特效表现
|
||||||
|
if (groupIndex == data.LevelIndex && levelIndex == i && !gfx)
|
||||||
|
{
|
||||||
|
LevelSelectManager.Instance.CurBtnObj = _go.FindObj(string.Format(BtnPath, i));
|
||||||
|
LevelSelectManager.Instance.GfxSelectLevel.transform.position =
|
||||||
|
LevelSelectManager.Instance.CurBtnObj.transform.position;
|
||||||
|
}
|
||||||
|
|
||||||
//上锁表现
|
//上锁表现
|
||||||
if (data.LevelIndex * LevelConstants.LevelSelectCount + i >
|
if (data.LevelIndex * LevelConstants.LevelSelectCount + i >
|
||||||
LevelSelectManager.Instance.CurPassLevelIndex)
|
LevelSelectManager.Instance.CurPassLevelIndex)
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class UIMainShopController : UIWindow
|
||||||
{
|
{
|
||||||
_biEventFirst = EventFirst.fte_buy_coin_large;
|
_biEventFirst = EventFirst.fte_buy_coin_large;
|
||||||
_biEvent = Event.click_buy_coin_large;
|
_biEvent = Event.click_buy_coin_large;
|
||||||
ShopToBuy(platform + "_CoinBox_1200");
|
ShopToBuy(platform + "_CoinBox_1600");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue