|
@@ -0,0 +1,225 @@
|
|
|
+using Fort23.Core;
|
|
|
+using Fort23.UTool;
|
|
|
+using GameLogic.Combat;
|
|
|
+using GameLogic.Combat.CombatTool;
|
|
|
+using UnityEngine;
|
|
|
+using UnityEngine.UI;
|
|
|
+
|
|
|
+namespace Fort23.Mono.Phases
|
|
|
+{
|
|
|
+ /// <summary>
|
|
|
+ /// 商店抽卡引导
|
|
|
+ /// </summary>
|
|
|
+ public class Phase7 : IGuideLogic
|
|
|
+ {
|
|
|
+ public PlayerGuideManager pgm;
|
|
|
+
|
|
|
+ private bool once = false;
|
|
|
+
|
|
|
+ public Phase7(PlayerGuideManager guideManager)
|
|
|
+ {
|
|
|
+ this.pgm = guideManager;
|
|
|
+ once = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void Active()
|
|
|
+ {
|
|
|
+ base.Active();
|
|
|
+ actionList.Add(OnStep701);
|
|
|
+ actionList.Add(OnStep702);
|
|
|
+ actionList.Add(OnStep703);
|
|
|
+ actionList.Add(OnStep704);
|
|
|
+ actionList.Add(OnStep705);
|
|
|
+ actionList.Add(OnStep706);
|
|
|
+ actionList.Add(OnStepEnd);
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void Begin()
|
|
|
+ {
|
|
|
+ guideID = 7;
|
|
|
+ guideIdx = -1;
|
|
|
+ pgm.isForceDone = false;
|
|
|
+ pgm.isTriggerDone = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void End()
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+ public override async CTask Guide()
|
|
|
+ {
|
|
|
+ if (actionList.Count > guideIdx)
|
|
|
+ {
|
|
|
+ pgm.ResetPlayerGuide();
|
|
|
+ guideIdx++;
|
|
|
+
|
|
|
+
|
|
|
+ SaveStep(guideIdx);
|
|
|
+ await actionList[guideIdx](null);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ LogTool.Error("没有引导了,强制结束。出错步骤,:" + pgm.curPhase + guideIdx);
|
|
|
+ pgm.isForceDone = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void LogicRelase()
|
|
|
+ {
|
|
|
+ actionList.Clear();
|
|
|
+ }
|
|
|
+
|
|
|
+ public override void LogicUpdate()
|
|
|
+ {
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击白嫖代金卷页签
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep701(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject = UIManager.Instance.GetComponent<ShopPanel>()._shopBtnWidgets[0].own;
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(6701, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击十连抽
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep702(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject = null;
|
|
|
+ ShopPanel shopPanel = UIManager.Instance.GetComponent<ShopPanel>();
|
|
|
+ foreach (var shopPanelShopGroupWidgetType1 in shopPanel._shopGroupWidgetType1s)
|
|
|
+ {
|
|
|
+ if (shopPanelShopGroupWidgetType1 is ShopBoxWidget)
|
|
|
+ {
|
|
|
+ ShopBoxWidget shopBoxWidget = (ShopBoxWidget)shopPanelShopGroupWidgetType1;
|
|
|
+ gameObject = shopBoxWidget.tenButton.gameObject;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(702, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击领取
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep703(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject = UIManager.Instance.GetComponent<ShopGachaPanel>().Btn_LingQu.gameObject;
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(703, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击兑换商店
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep704(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject = UIManager.Instance.GetComponent<ShopPanel>()._shopBtnWidgets[1].own;
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(704, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击姚丹
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep705(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject =
|
|
|
+ (UIManager.Instance.GetComponent<ShopPanel>()._shopGroupWidgetType1s[1] as ShopGroupWidgetType1)
|
|
|
+ ._shopItemWidgetType2s[4].own;
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(705, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 点击购买
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="obj"></param>
|
|
|
+ public async CTask OnStep706(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ GameObject gameObject =
|
|
|
+ UIManager.Instance.GetComponent<ShopBuyItemPanel>().Btn_Function.gameObject;
|
|
|
+ Vector3 localPos = pgm.WorldPosToLocalPos(gameObject.transform.position);
|
|
|
+ Vector2 size = gameObject.GetComponent<RectTransform>().sizeDelta;
|
|
|
+
|
|
|
+ pgm.SetfxTransVisiable(true);
|
|
|
+ pgm.SetMaskTarget(gameObject);
|
|
|
+ pgm.SetShowFramePosAndSize(localPos, size, 0, gameObject);
|
|
|
+ await pgm.ConfigLogic(706, delegate() { });
|
|
|
+
|
|
|
+ pgm.SetFingerPos(localPos);
|
|
|
+ pgm.SetFingerVisiable(true);
|
|
|
+
|
|
|
+ UIManager.Instance.HideUIUIPanel<ShopPanel>();
|
|
|
+ }
|
|
|
+
|
|
|
+ public async CTask OnStepEnd(UnityEngine.Object obj)
|
|
|
+ {
|
|
|
+ pgm.StepInit();
|
|
|
+ pgm.SetBlackBaseVisiable(false);
|
|
|
+ ForceGuideOver();
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 引导完成
|
|
|
+ /// </summary>
|
|
|
+ private void ForceGuideOver()
|
|
|
+ {
|
|
|
+ pgm.CloseForceGuide();
|
|
|
+ pgm.RestGuide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|