|
@@ -115,6 +115,7 @@ namespace GFGGame
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
|
|
+
|
|
_ui.target.touchable = false;
|
|
_ui.target.touchable = false;
|
|
SuitFosterProxy.SendGetSuitInfos().Coroutine();
|
|
SuitFosterProxy.SendGetSuitInfos().Coroutine();
|
|
MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
|
|
MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
|
|
@@ -127,8 +128,53 @@ namespace GFGGame
|
|
{
|
|
{
|
|
_chapterID = (int)this.viewData;
|
|
_chapterID = (int)this.viewData;
|
|
}
|
|
}
|
|
- MainStoryDataManager.currentChapterCfgId = _chapterID;
|
|
|
|
|
|
|
|
|
|
+ if (!backRefresh && MainStoryDataManager.currentChapterCfgId != _chapterID)
|
|
|
|
+ {
|
|
|
|
+ _chapterID = MainStoryDataManager.currentChapterCfgId;
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ MainStoryDataManager.currentChapterCfgId = _chapterID;
|
|
|
|
+ }
|
|
|
|
+ //_chapterID = MainStoryDataManager.currentChapterCfgId;
|
|
|
|
+
|
|
|
|
+ _valueBarController.OnShown();
|
|
|
|
+ _ui.m_t0.SetHook("canHit", () => { _ui.target.touchable = true; });
|
|
|
|
+ _ui.m_t0.Play();
|
|
|
|
+ Timers.inst.AddUpdate(CheckGuide);
|
|
|
|
+
|
|
|
|
+ UpdateView();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void OnHide()
|
|
|
|
+ {
|
|
|
|
+ base.OnHide();
|
|
|
|
+ _unPasslevelItem = null;
|
|
|
|
+ _endLevelItem = null;
|
|
|
|
+ // _ui.m_chapter.RemoveChildren(0, 0, true);
|
|
|
|
+ GRoot.inst.touchable = true;
|
|
|
|
+ _valueBarController.OnHide();
|
|
|
|
+ Timers.inst.Remove(SetContainerY);
|
|
|
|
+ Timers.inst.Remove(CheckGuide);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ protected override void RemoveEventListener()
|
|
|
|
+ {
|
|
|
|
+ base.RemoveEventListener();
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
|
|
|
|
+ }
|
|
|
|
+ private void OnClickBtnBack()
|
|
|
|
+ {
|
|
|
|
+ ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
|
|
|
|
+ //GameController.GoBackToMainView();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void UpdateView()
|
|
|
|
+ {
|
|
//由于这里会切换特效,所以切换界面时进行清空
|
|
//由于这里会切换特效,所以切换界面时进行清空
|
|
EffectUIPool.Recycle(_effectUI2);
|
|
EffectUIPool.Recycle(_effectUI2);
|
|
_effectUI2 = null;
|
|
_effectUI2 = null;
|
|
@@ -150,8 +196,6 @@ namespace GFGGame
|
|
//Timers.inst.Add(0.2f, 1, SetContainerY);
|
|
//Timers.inst.Add(0.2f, 1, SetContainerY);
|
|
_ui.m_chapter.m_compChapterScroll.target.y = 1;
|
|
_ui.m_chapter.m_compChapterScroll.target.y = 1;
|
|
|
|
|
|
- _valueBarController.OnShown();
|
|
|
|
-
|
|
|
|
//招财进宝活动
|
|
//招财进宝活动
|
|
if (chapterCfg.subType == 2)
|
|
if (chapterCfg.subType == 2)
|
|
{
|
|
{
|
|
@@ -176,38 +220,9 @@ namespace GFGGame
|
|
_ui.m_bonusBox.visible = true;
|
|
_ui.m_bonusBox.visible = true;
|
|
_ui.m_ActivityZCJB.visible = false;
|
|
_ui.m_ActivityZCJB.visible = false;
|
|
}
|
|
}
|
|
- //
|
|
|
|
- _ui.m_t0.SetHook("canHit",()=> { _ui.target.touchable = true; });
|
|
|
|
- _ui.m_t0.Play();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- Timers.inst.AddUpdate(CheckGuide);
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void OnHide()
|
|
|
|
- {
|
|
|
|
- base.OnHide();
|
|
|
|
- _unPasslevelItem = null;
|
|
|
|
- _endLevelItem = null;
|
|
|
|
- // _ui.m_chapter.RemoveChildren(0, 0, true);
|
|
|
|
- GRoot.inst.touchable = true;
|
|
|
|
- _valueBarController.OnHide();
|
|
|
|
- Timers.inst.Remove(SetContainerY);
|
|
|
|
- Timers.inst.Remove(CheckGuide);
|
|
|
|
- }
|
|
|
|
|
|
|
|
- protected override void RemoveEventListener()
|
|
|
|
- {
|
|
|
|
- base.RemoveEventListener();
|
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.NOTICE_MAINSTORY_BOXBONUS_STATE, UpdateBonusBox);
|
|
|
|
- }
|
|
|
|
- private void OnClickBtnBack()
|
|
|
|
- {
|
|
|
|
- ViewManager.GoBackFrom(typeof(StoryChapterView).FullName);
|
|
|
|
- //GameController.GoBackToMainView();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
private void OnClickSwitchBack()
|
|
private void OnClickSwitchBack()
|
|
{
|
|
{
|
|
Timers.inst.Remove(SetContainerY);
|
|
Timers.inst.Remove(SetContainerY);
|
|
@@ -216,7 +231,7 @@ namespace GFGGame
|
|
private void OnClickGotoView()
|
|
private void OnClickGotoView()
|
|
{
|
|
{
|
|
StoryChapterCfg chapterSuitCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
StoryChapterCfg chapterSuitCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID);
|
|
- ViewManager.Show<ClothingSyntheticView>(new object[] { chapterSuitCfg.suitId});
|
|
|
|
|
|
+ ViewManager.Show<ClothingSyntheticView>(new object[] { chapterSuitCfg.suitId}, false, false);
|
|
}
|
|
}
|
|
|
|
|
|
private void OnClickBtnHome()
|
|
private void OnClickBtnHome()
|
|
@@ -230,18 +245,21 @@ namespace GFGGame
|
|
if (MainStoryDataManager.CheckChapterUnlock(_chapterID+1) && StoryController.CheckSuitGot(chapterSuitCfg.suitId))
|
|
if (MainStoryDataManager.CheckChapterUnlock(_chapterID+1) && StoryController.CheckSuitGot(chapterSuitCfg.suitId))
|
|
{
|
|
{
|
|
Timers.inst.Remove(SetContainerY);
|
|
Timers.inst.Remove(SetContainerY);
|
|
- ViewManager.Show<StoryChapterView>(new object[] { _chapterID+1, currentDifficulty });
|
|
|
|
|
|
+ _chapterID += 1;
|
|
|
|
+ MainStoryDataManager.currentChapterCfgId = _chapterID;
|
|
|
|
+ //ViewManager.Show<StoryChapterView>(new object[] { (_chapterID+1), currentDifficulty });
|
|
|
|
+ UpdateView();
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID + 1);
|
|
StoryChapterCfg chapterCfg = StoryChapterCfgArray.Instance.GetCfg(_chapterID + 1);
|
|
- if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
|
|
|
|
|
|
+ if(!StoryController.CheckSuitGot(chapterSuitCfg.suitId))
|
|
{
|
|
{
|
|
- PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到{0}级开启",chapterCfg.lvl));
|
|
|
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("需集齐所需套装");
|
|
}
|
|
}
|
|
- else
|
|
|
|
|
|
+ else if (GameGlobal.myNumericComponent.GetAsInt(NumericType.Lvl) < chapterCfg.lvl)
|
|
{
|
|
{
|
|
- PromptController.Instance.ShowFloatTextPrompt("需集齐所需套装");
|
|
|
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt(string.Format("角色等级达到{0}级开启",chapterCfg.lvl));
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -562,7 +580,7 @@ namespace GFGGame
|
|
bool isGuide3 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_1, 3, "来继续我们的旅程吧。");
|
|
bool isGuide3 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.ENTER_CHAPTER_1, 3, "来继续我们的旅程吧。");
|
|
GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_1, 3);
|
|
GuideController.TryCompleteGuide(ConstGuideId.ENTER_CHAPTER_1, 3);
|
|
|
|
|
|
- bool isGuide4 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.BUY_CLOTHING, 1, "衣服被弄脏了,到机场更衣室换身衣服吧。");
|
|
|
|
|
|
+ bool isGuide4 = GuideController.TryGuide(unPasslevelCom, ConstGuideId.BUY_CLOTHING, 1, "停电了室内温度升高,点击换身轻薄的服饰吧。");
|
|
bool isGuide5 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.UP_CARD_LV, 1, "点击返回主界面。");
|
|
bool isGuide5 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.UP_CARD_LV, 1, "点击返回主界面。");
|
|
|
|
|
|
//bool isGuide6 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.CLOTHING_DECOMPOSE, 1, "点击返回主界面。");
|
|
//bool isGuide6 = GuideController.TryGuide(_ui.m_btnHome, ConstGuideId.CLOTHING_DECOMPOSE, 1, "点击返回主界面。");
|