|
@@ -48,6 +48,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideChapterInfoViewBtnStart(GObject target, string guideStr = null)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.SINGLE_FIGHT_GUIDE) <= 0)
|
|
|
{
|
|
|
if (guideStr == null)
|
|
@@ -60,6 +61,7 @@ namespace GFGGame
|
|
|
|
|
|
public static bool TryGuideDressUpFightViewMenuType0(GList list)
|
|
|
{
|
|
|
+
|
|
|
if (StoryDataManager.currentChapter == 1 && StoryDataManager.currentLevel <= 2
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
|
{
|
|
@@ -83,6 +85,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static void TryGuideDressUpFightViewMenuPart0(GList list, string guideStr)
|
|
|
{
|
|
|
+
|
|
|
if (StoryDataManager.currentChapter == 1 && StoryDataManager.currentLevel <= 2
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
|
{
|
|
@@ -99,6 +102,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static void TryGuideDressUpFightViewBtnNext0(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.SINGLE_FIGHT_GUIDE) <= 0)
|
|
|
{
|
|
|
ShowGuide(target, false, "接下来验证一下,换上的服饰是否符合需求");
|
|
@@ -115,6 +119,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideDressUpFightViewBtnRecommend(GObject target, GList list)
|
|
|
{
|
|
|
+
|
|
|
_list = list;
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
&& StoryDataManager.currentLevel == 4
|
|
@@ -128,6 +133,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideApproachOfItemViewList(GList list)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
&& StoryDataManager.currentLevel == 4
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
|
|
@@ -141,18 +147,10 @@ namespace GFGGame
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- public static void TryGuideClothingShopViewBtnBug(GObject target)
|
|
|
- {
|
|
|
- if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
- && StoryDataManager.currentLevel == 4
|
|
|
- && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
|
|
|
- && DressUpMenuItemDataManager.GetRecommendCount() >= 2)
|
|
|
- {
|
|
|
- ShowGuide(target, false, "找到需要的物品了,点击购买吧");
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
public static void TryGuideBuyCountViewBtnSure(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
&& StoryDataManager.currentLevel == 4
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -163,6 +161,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideClothingShopViewBtnBack(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
&& StoryDataManager.currentLevel == 4
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -173,6 +172,7 @@ namespace GFGGame
|
|
|
private static GList _list;
|
|
|
public static bool TryGuideDressUpFightViewMenuType1()
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
|
|
|
&& StoryDataManager.currentLevel == 4
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -196,8 +196,10 @@ namespace GFGGame
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
public static void TryGuideDressUpFightViewMenuPart1(GList list, string guideStr)
|
|
|
{
|
|
|
+
|
|
|
if (StoryDataManager.currentChapter == 1 && StoryDataManager.currentLevel == 4
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
|
{
|
|
@@ -216,6 +218,7 @@ namespace GFGGame
|
|
|
/***************************************************点击查看关卡提示***************************************************/
|
|
|
public static void TryGuideDressUpFightViewBtnHint(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.SEE_DRESS_TIPS) <= 0
|
|
|
&& StoryDataManager.currentLevel == 6
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -230,6 +233,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideStoryFightTargetScoreComCircle(GObject target, float devWidth, float devHeight)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0
|
|
|
&& StoryDataManager.currentLevel == 6
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -240,6 +244,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static void TryGuideStoryFightTargetScorebtnSkill0(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0
|
|
|
&& StoryDataManager.currentLevel == 6
|
|
|
&& !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
|
|
@@ -250,7 +255,7 @@ namespace GFGGame
|
|
|
/*******************************************************引导抽奖***********************************************/
|
|
|
public static bool TryGuideGoBackStoryChapter(GObject target)
|
|
|
{
|
|
|
- Debug.Log(StoryDataManager.CheckLevelPass(1, 10));
|
|
|
+
|
|
|
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.MAIN_UI_BTN_ZHAI_XING) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(1, 10)
|
|
@@ -264,6 +269,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideLuckyBox(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.MAIN_UI_BTN_ZHAI_XING) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(1, 10)
|
|
|
&& !StoryDataManager.CheckLevelPass(1, 11))
|
|
@@ -276,6 +282,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideLuckyBoxStar()
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.MAIN_UI_BTN_ZHAI_XING) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(1, 10)
|
|
|
&& !StoryDataManager.CheckLevelPass(1, 11))
|
|
@@ -290,6 +297,7 @@ namespace GFGGame
|
|
|
|
|
|
public static bool TryGuideDressUpViewMenuType1(GList list)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.currentGuideId == ConstGuideId.MAIN_UI_BTN_HUAN_ZHUANG)
|
|
|
{
|
|
|
int len = list.numChildren;
|
|
@@ -314,6 +322,7 @@ namespace GFGGame
|
|
|
|
|
|
public static void TryGuideDressUpViewMenuPart(GList list)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.currentGuideId == ConstGuideId.MAIN_UI_BTN_HUAN_ZHUANG)
|
|
|
{
|
|
|
if (list.numChildren > 0)
|
|
@@ -395,6 +404,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static void TryGuideSuitSyntheticView(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.SUIT_SYNTHETIC_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 1)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 2))
|
|
@@ -587,6 +597,7 @@ namespace GFGGame
|
|
|
// PHOTOGRAPH_GUIDE
|
|
|
public static bool TryGuideGoBackStoryChapter1(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.PHOTOGRAPH_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 4)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 5))
|
|
@@ -599,6 +610,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideOpenDressUpView(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.PHOTOGRAPH_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 4)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 5))
|
|
@@ -611,6 +623,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideDressUpViewMenuType2(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.PHOTOGRAPH_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 4)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 5))
|
|
@@ -634,6 +647,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideBtnPhotograph(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.PHOTOGRAPH_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 4)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 5))
|
|
@@ -646,6 +660,7 @@ namespace GFGGame
|
|
|
}
|
|
|
public static bool TryGuideOpenPhotographView(GObject target)
|
|
|
{
|
|
|
+
|
|
|
if (GuideDataManager.GetGuideCount(ConstGuideId.PHOTOGRAPH_GUIDE) <= 0
|
|
|
&& StoryDataManager.CheckLevelPass(2, 4)
|
|
|
&& !StoryDataManager.CheckLevelPass(2, 5))
|
|
@@ -670,9 +685,102 @@ namespace GFGGame
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
- /*******************************************************************************************************************/
|
|
|
+ /*********************************************************************************************************************************/
|
|
|
+ public static bool useNewGuide = false;
|
|
|
+ public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, bool isList = false, int listIndex = 0, bool checkInde = true, bool needUpdate = false, int yTxt = 0, bool isOptionalGuide = false, float devWidth = 0, float devHeight = 0)
|
|
|
+ {
|
|
|
+ if (!useNewGuide) return false;
|
|
|
+
|
|
|
+ GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
|
|
|
+
|
|
|
+ if (GuideDataManager.GetGuideCountCopy(guideKey) <= 0
|
|
|
+ && (!checkInde || checkInde && GuideDataManager.IsGuideIndexFinish(cfg.id, index - 1) == true && GuideDataManager.IsGuideIndexFinish(cfg.id, index) == false)
|
|
|
+ && (GuideDataManager.currentGuideId == 0 || GuideDataManager.currentGuideId == cfg.id && GuideDataManager.currentGuideIdIndex != index)
|
|
|
+ && StoryDataManager.CheckLevelPass(cfg.chapterId, cfg.level - 1)
|
|
|
+ && !StoryDataManager.CheckLevelPass(cfg.chapterId, cfg.level))
|
|
|
+ {
|
|
|
+ GuideDataManager.currentGuideId = cfg.id;
|
|
|
+ GuideDataManager.currentGuideIdIndex = index;
|
|
|
+
|
|
|
+ GuideDataManager.SetGuideIndex(cfg.id, index);
|
|
|
+ if (isList)
|
|
|
+ {
|
|
|
+
|
|
|
+ if (target.asList.numItems > 0)
|
|
|
+ {
|
|
|
+ GObject item = (target.asList).GetChildAt(listIndex);
|
|
|
+ if (item != null)
|
|
|
+ {
|
|
|
+ target = item;
|
|
|
+ // target.asList.ScrollToView(listIndex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ShowGuideIndex(target, needUpdate, guideStr, yTxt, isOptionalGuide, devWidth, devHeight, GuideDataManager.currentGuideId, GuideDataManager.currentGuideIdIndex);
|
|
|
+ if (!checkInde)
|
|
|
+ {
|
|
|
+ for (int i = 1; i < index; i++)
|
|
|
+ {
|
|
|
+ GuideDataManager.TryCompleteGuideIndex(cfg.id, i, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ private static void ShowGuideIndex(GObject target, bool needUpdate = false, string guideStr = null, int yTxt = 0, bool isOptionalGuide = false, float devWidth = 0, float devHeight = 0, int guideId = 0, int index = 0)
|
|
|
+ {
|
|
|
+ HideGuideIndex();
|
|
|
+ if (GameGlobal.skipGuide)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ ViewManager.Show(ViewName.GUIDE_VIEW, new List<object> { target, needUpdate, guideStr, yTxt, isOptionalGuide, devWidth, devHeight, guideId, index });
|
|
|
+ }
|
|
|
+ public static bool TryCompleteGuideIndex(int guideId, int index)
|
|
|
+ {
|
|
|
+ if (!useNewGuide) return false;
|
|
|
+
|
|
|
+ HideGuideIndex();
|
|
|
+ // bool result = GuideDataManager.TryCompleteGuideIndex(guideId, index);
|
|
|
+ if (GuideDataManager.TryCompleteGuideIndex(guideId, index))
|
|
|
+ {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ public static bool TryCompleteGuide(string guideKey, int count)
|
|
|
+ {
|
|
|
+ if (!useNewGuide) return false;
|
|
|
+
|
|
|
+ GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
|
|
|
+
|
|
|
+ if (!GuideDataManager.CheckAllIndexFinish(cfg.id, count)) return false;
|
|
|
+ bool result = GuideDataManager.TryCompleteGuide(cfg.id);
|
|
|
+ if (result)
|
|
|
+ {
|
|
|
+ GuideDataManager.currentGuideId = 0;
|
|
|
+ HideGuideIndex();
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ public static void HideGuideIndex()
|
|
|
+ {
|
|
|
+ if (!useNewGuide) return;
|
|
|
+
|
|
|
+ ViewManager.Hide(ViewName.GUIDE_VIEW);
|
|
|
+ }
|
|
|
+ /************************************************************************************************************/
|
|
|
+
|
|
|
public static bool TryGuideByGuideId(GObject target, int guideId, int maxCount = 1, bool needUpdate = false, string guideStr = null, int yTxt = 0, int preGuideIdAtThisLogin = 0)
|
|
|
{
|
|
|
+ if (GuideController.useNewGuide) return false;
|
|
|
+
|
|
|
if (preGuideIdAtThisLogin > 0 && !GuideDataManager.CheckGuideIsCompletedAtThisLogin(preGuideIdAtThisLogin))
|
|
|
{
|
|
|
return false;
|
|
@@ -688,6 +796,7 @@ namespace GFGGame
|
|
|
|
|
|
public static bool TryCompleteGuide(int guideId)
|
|
|
{
|
|
|
+ if (useNewGuide) return false;
|
|
|
bool result = GuideDataManager.TryCompleteGuide(guideId);
|
|
|
if (result)
|
|
|
{
|
|
@@ -698,11 +807,14 @@ namespace GFGGame
|
|
|
|
|
|
public static void HideGuide()
|
|
|
{
|
|
|
+ if (useNewGuide) return;
|
|
|
ViewManager.Hide(ViewName.GUIDE_VIEW);
|
|
|
}
|
|
|
|
|
|
private static void ShowGuide(GObject target, bool needUpdate = false, string guideStr = null, int yTxt = 0, bool isOptionalGuide = false, float devWidth = 0, float devHeight = 0)
|
|
|
{
|
|
|
+ if (useNewGuide) return;
|
|
|
+
|
|
|
HideGuide();
|
|
|
if (GameGlobal.skipGuide)
|
|
|
{
|