|
@@ -76,8 +76,8 @@ namespace GFGGame
|
|
MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
|
|
MusicManager.Instance.Play(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
|
|
_chapterID = (int)viewData;
|
|
_chapterID = (int)viewData;
|
|
MainStoryDataManager.currentChapterCfgId = _chapterID;
|
|
MainStoryDataManager.currentChapterCfgId = _chapterID;
|
|
-
|
|
|
|
- Timers.inst.StartCoroutine(InitChapter());
|
|
|
|
|
|
+ InitChapter();
|
|
|
|
+ // Timers.inst.StartCoroutine(InitChapter());
|
|
|
|
|
|
_valueBarController.OnShown();
|
|
_valueBarController.OnShown();
|
|
|
|
|
|
@@ -112,11 +112,11 @@ namespace GFGGame
|
|
GameController.GoBackToMainView();
|
|
GameController.GoBackToMainView();
|
|
}
|
|
}
|
|
|
|
|
|
- private IEnumerator InitChapter()
|
|
|
|
|
|
+ private void InitChapter()
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya000");
|
|
|
|
|
|
+ Debug.Log("zoya000");
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
- ET.Log.Debug("zoya111");
|
|
|
|
|
|
+ Debug.Log("zoya111");
|
|
_ui.m_txtChapterName0.text = chapterCfg.name.Length > 0 ? chapterCfg.name[0].ToString() : "";
|
|
_ui.m_txtChapterName0.text = chapterCfg.name.Length > 0 ? chapterCfg.name[0].ToString() : "";
|
|
_ui.m_txtChapterName1.text = chapterCfg.name.Length > 1 ? chapterCfg.name[1].ToString() : "";
|
|
_ui.m_txtChapterName1.text = chapterCfg.name.Length > 1 ? chapterCfg.name[1].ToString() : "";
|
|
_ui.m_txtChapterName2.text = chapterCfg.name.Length > 2 ? chapterCfg.name[2].ToString() : "";
|
|
_ui.m_txtChapterName2.text = chapterCfg.name.Length > 2 ? chapterCfg.name[2].ToString() : "";
|
|
@@ -130,45 +130,45 @@ namespace GFGGame
|
|
UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
|
|
UpdateBonusBoxName(_ui.m_bonusBox2, "" + chapterCfg.bonusStar2);
|
|
UpdateBonusBoxName(_ui.m_bonusBox3, "" + chapterCfg.bonusStar3);
|
|
UpdateBonusBoxName(_ui.m_bonusBox3, "" + chapterCfg.bonusStar3);
|
|
UpdateBonusBox();
|
|
UpdateBonusBox();
|
|
- ET.Log.Debug("zoya222");
|
|
|
|
|
|
+ Debug.Log("zoya222");
|
|
var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
|
|
var list = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(chapterCfg.type, chapterCfg.subType, chapterCfg.id);
|
|
- ET.Log.Debug("zoya_ 555");
|
|
|
|
|
|
+ Debug.Log("zoya_ 555");
|
|
int endLevel = 0;
|
|
int endLevel = 0;
|
|
int UnlockCount = 0;
|
|
int UnlockCount = 0;
|
|
- ET.Log.Debug("zoya_ 666");
|
|
|
|
|
|
+ Debug.Log("zoya_ 666");
|
|
_compChapter = _ui.m_chapter.m_compChapterScroll.target;
|
|
_compChapter = _ui.m_chapter.m_compChapterScroll.target;
|
|
- ET.Log.Debug("zoya_ 777");
|
|
|
|
|
|
+ Debug.Log("zoya_ 777");
|
|
float starPosY = _ui.m_chapter.m_compChapterScroll.m_imgBegin.y;
|
|
float starPosY = _ui.m_chapter.m_compChapterScroll.m_imgBegin.y;
|
|
- ET.Log.Debug("zoya_ 888");
|
|
|
|
|
|
+ Debug.Log("zoya_ 888");
|
|
int lineGap = 4500 / list.Count;
|
|
int lineGap = 4500 / list.Count;
|
|
for (int i = 0; i < 20; i++)
|
|
for (int i = 0; i < 20; i++)
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 999 _:" + i);
|
|
|
|
|
|
+ Debug.Log("zoya_ 999 _:" + i);
|
|
GObject obj = _ui.m_chapter.m_compChapterScroll.target.GetChild("g" + (i + 1));
|
|
GObject obj = _ui.m_chapter.m_compChapterScroll.target.GetChild("g" + (i + 1));
|
|
- ET.Log.Debug("zoya_ 0000 _:" + obj);
|
|
|
|
|
|
+ Debug.Log("zoya_ 0000 _:" + obj);
|
|
obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0); ;
|
|
obj.SetPosition(obj.x, starPosY - lineGap * i - 300, 0); ;
|
|
- ET.Log.Debug("zoya_ 1111 _:" + list.Count);
|
|
|
|
|
|
+ Debug.Log("zoya_ 1111 _:" + list.Count);
|
|
StoryLevelCfg levelCfg = i < list.Count ? list[i] : null;
|
|
StoryLevelCfg levelCfg = i < list.Count ? list[i] : null;
|
|
- ET.Log.Debug("zoya_ 2222 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 2222 _:");
|
|
UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
|
|
UI_CompStoryLevelItem levelItem = UI_CompStoryLevelItem.Proxy(obj);
|
|
- ET.Log.Debug("zoya_ 3333 _:" + levelItem);
|
|
|
|
|
|
+ Debug.Log("zoya_ 3333 _:" + levelItem);
|
|
if (levelCfg != null && MainStoryDataManager.CheckLevelUnlock(levelCfg.id))
|
|
if (levelCfg != null && MainStoryDataManager.CheckLevelUnlock(levelCfg.id))
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 4444 _:" + levelCfg.id);
|
|
|
|
|
|
+ Debug.Log("zoya_ 4444 _:" + levelCfg.id);
|
|
UnlockCount++;
|
|
UnlockCount++;
|
|
- ET.Log.Debug("zoya_ 5555 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 5555 _:");
|
|
levelItem.target.data = levelCfg.id;
|
|
levelItem.target.data = levelCfg.id;
|
|
levelItem.target.visible = true;
|
|
levelItem.target.visible = true;
|
|
levelItem.target.onClick.Clear();
|
|
levelItem.target.onClick.Clear();
|
|
levelItem.target.onClick.Add(OnClickLevelItem);
|
|
levelItem.target.onClick.Add(OnClickLevelItem);
|
|
- ET.Log.Debug("zoya_ 6666 _:" + levelCfg.order);
|
|
|
|
|
|
+ Debug.Log("zoya_ 6666 _:" + levelCfg.order);
|
|
string showId = StoryUtil.GetChapterOrder(_chapterID) + "-" + levelCfg.order;
|
|
string showId = StoryUtil.GetChapterOrder(_chapterID) + "-" + levelCfg.order;
|
|
- ET.Log.Debug("zoya_ 7777 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 7777 _:");
|
|
levelItem.m_txtDialogOrder.text = showId;
|
|
levelItem.m_txtDialogOrder.text = showId;
|
|
levelItem.m_txtFightOrder.text = showId;
|
|
levelItem.m_txtFightOrder.text = showId;
|
|
if (levelCfg.fightID.Length > 0)
|
|
if (levelCfg.fightID.Length > 0)
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 8888 _:" + levelCfg.fightID);
|
|
|
|
|
|
+ Debug.Log("zoya_ 8888 _:" + levelCfg.fightID);
|
|
levelItem.m_c1.selectedIndex = 1;
|
|
levelItem.m_c1.selectedIndex = 1;
|
|
int score = InstanceZonesDataManager.GetScoreHighest(levelCfg.id);
|
|
int score = InstanceZonesDataManager.GetScoreHighest(levelCfg.id);
|
|
if (score <= 0)
|
|
if (score <= 0)
|
|
@@ -178,61 +178,61 @@ namespace GFGGame
|
|
else
|
|
else
|
|
{
|
|
{
|
|
levelItem.m_flower.target.visible = true;
|
|
levelItem.m_flower.target.visible = true;
|
|
- ET.Log.Debug("zoya_ 9999 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 9999 _:");
|
|
int starCount = InstanceZonesDataManager.GetStarCountHistory(levelCfg.id);
|
|
int starCount = InstanceZonesDataManager.GetStarCountHistory(levelCfg.id);
|
|
- ET.Log.Debug("zoya_ 00000 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 00000 _:");
|
|
StoryUtil.UpdateStar(starCount, levelItem.m_flower.target);
|
|
StoryUtil.UpdateStar(starCount, levelItem.m_flower.target);
|
|
- ET.Log.Debug("zoya_ 11111 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 11111 _:");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 22222 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 22222 _:");
|
|
levelItem.m_c1.selectedIndex = 0;
|
|
levelItem.m_c1.selectedIndex = 0;
|
|
levelItem.m_flower.target.visible = false;
|
|
levelItem.m_flower.target.visible = false;
|
|
levelItem.m_txtName.text = levelCfg.name;
|
|
levelItem.m_txtName.text = levelCfg.name;
|
|
- ET.Log.Debug("zoya_ 33333 _:");
|
|
|
|
|
|
+ Debug.Log("zoya_ 33333 _:");
|
|
levelItem.m_comDialogBg.m_loabg.url = ResPathUtil.GetBgImgPath(chapterCfg.bgRes);
|
|
levelItem.m_comDialogBg.m_loabg.url = ResPathUtil.GetBgImgPath(chapterCfg.bgRes);
|
|
levelItem.m_comDialogBg.m_loaIcon.url = ResPathUtil.GetChapterGuideIconPath(chapterCfg.bgRes);
|
|
levelItem.m_comDialogBg.m_loaIcon.url = ResPathUtil.GetChapterGuideIconPath(chapterCfg.bgRes);
|
|
levelItem.m_comDialogBg.m_c1.selectedIndex = Random.Range(0, 10);
|
|
levelItem.m_comDialogBg.m_c1.selectedIndex = Random.Range(0, 10);
|
|
- ET.Log.Debug("zoya_ 44444 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 44444 _:" + UnlockCount);
|
|
|
|
|
|
}
|
|
}
|
|
- ET.Log.Debug("zoya_ 55555 _:" + levelCfg.id);
|
|
|
|
- ET.Log.Debug("zoya_ 55555 _:" + levelItem.m_holder);
|
|
|
|
|
|
+ Debug.Log("zoya_ 55555 _:" + levelCfg.id);
|
|
|
|
+ Debug.Log("zoya_ 55555 _:" + levelItem.m_holder);
|
|
levelItem.m_holder.visible = !InstanceZonesDataManager.CheckLevelPass(levelCfg.id);
|
|
levelItem.m_holder.visible = !InstanceZonesDataManager.CheckLevelPass(levelCfg.id);
|
|
- ET.Log.Debug("zoya_ 66666 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 66666 _:" + UnlockCount);
|
|
if (levelItem.m_holder.visible)
|
|
if (levelItem.m_holder.visible)
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 77777 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 77777 _:" + UnlockCount);
|
|
//设置为解锁关卡
|
|
//设置为解锁关卡
|
|
MainStoryDataManager.currentLevelCfgId = levelCfg.id;
|
|
MainStoryDataManager.currentLevelCfgId = levelCfg.id;
|
|
_unPasslevelItem = levelItem.target;
|
|
_unPasslevelItem = levelItem.target;
|
|
- ET.Log.Debug("zoya_ 88888 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 88888 _:" + UnlockCount);
|
|
string resPath = ResPathUtil.GetViewEffectPath("ui_gk", "ui_gk_sg");
|
|
string resPath = ResPathUtil.GetViewEffectPath("ui_gk", "ui_gk_sg");
|
|
SceneController.AddObjectToView(_gameObject, _wrapper, levelItem.m_holder, resPath, out _gameObject, out _wrapper);
|
|
SceneController.AddObjectToView(_gameObject, _wrapper, levelItem.m_holder, resPath, out _gameObject, out _wrapper);
|
|
- ET.Log.Debug("zoya_ 99999 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 99999 _:" + UnlockCount);
|
|
}
|
|
}
|
|
if (levelCfg.order > endLevel)
|
|
if (levelCfg.order > endLevel)
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 000000 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 000000 _:" + UnlockCount);
|
|
endLevel = levelCfg.order;
|
|
endLevel = levelCfg.order;
|
|
_endLevelItem = levelItem.target;
|
|
_endLevelItem = levelItem.target;
|
|
- ET.Log.Debug("zoya_ 111111 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 111111 _:" + UnlockCount);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- ET.Log.Debug("zoya_ 666 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 666 _:" + UnlockCount);
|
|
levelItem.target.visible = false;
|
|
levelItem.target.visible = false;
|
|
- ET.Log.Debug("zoya_ 666 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 666 _:" + UnlockCount);
|
|
}
|
|
}
|
|
- ET.Log.Debug("zoya_ 666 _:" + UnlockCount);
|
|
|
|
|
|
+ Debug.Log("zoya_ 666 _:" + UnlockCount);
|
|
UI_CompStoryLevelItem.ProxyEnd();
|
|
UI_CompStoryLevelItem.ProxyEnd();
|
|
}
|
|
}
|
|
- ET.Log.Debug("zoya333");
|
|
|
|
- yield return new WaitForEndOfFrame();
|
|
|
|
- ET.Log.Debug("zoya444");
|
|
|
|
|
|
+ Debug.Log("zoya333");
|
|
|
|
+ // yield return new WaitForEndOfFrame();
|
|
|
|
+ Debug.Log("zoya444");
|
|
_ui.m_chapter.m_compChapterScroll.target.y = Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
|
|
_ui.m_chapter.m_compChapterScroll.target.y = Mathf.Max(0, _ui.m_chapter.target.height - _ui.m_chapter.m_compChapterScroll.target.height);
|
|
|
|
|
|
}
|
|
}
|