引导加入更多try catch
parent
a83501a763
commit
5c870b3019
|
|
@ -896,8 +896,6 @@ namespace Gameplay.Guide
|
|||
|
||||
public override async void Complete()
|
||||
{
|
||||
GuideManager.Instance.IsChangeName = true;
|
||||
|
||||
if (GameStateManager.Instance.GetCurState() is GameStateStory gameStateStory)
|
||||
gameStateStory.IsReady = false;
|
||||
|
||||
|
|
@ -965,8 +963,6 @@ namespace Gameplay.Guide
|
|||
if (team.GetCharacterCount() < cCount)
|
||||
return;
|
||||
|
||||
GuideManager.Instance.IsEditTeamGuide = false;
|
||||
|
||||
Complete();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,11 +163,6 @@ namespace Gameplay.Guide
|
|||
E_GuideStepType.EnterLevel => new EnterLevelStep(dataGuideCfg),
|
||||
E_GuideStepType.Embattle => new LevelEmbattleStep(dataGuideCfg),
|
||||
E_GuideStepType.EmbattleVehicle => new LevelEmbattleStep(dataGuideCfg),
|
||||
E_GuideStepType.TeachFightMove => new TeachFightMoveStep(dataGuideCfg),
|
||||
E_GuideStepType.TeachFightAttack => new TeachFightAttackStep(dataGuideCfg),
|
||||
E_GuideStepType.TeachFightEmbattle => new TeachFightEmbattle(dataGuideCfg),
|
||||
E_GuideStepType.TeachFightMoraleAndRepression => new TeachMoraleAndRepression(dataGuideCfg),
|
||||
E_GuideStepType.TeachFightUseSkill => new TeachUseSkill(dataGuideCfg),
|
||||
E_GuideStepType.WaitLevelComplete => new WaitLevelOver(dataGuideCfg),
|
||||
E_GuideStepType.OpenChoosePerson => new OpenChoosePersonStep(dataGuideCfg),
|
||||
E_GuideStepType.Wait => new WaitStep(dataGuideCfg),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using Framework;
|
|||
using Gameplay.Area;
|
||||
using Gameplay.Level;
|
||||
using Gameplay.Net;
|
||||
using Gameplay.PlayerSkill;
|
||||
using Gameplay.Skill;
|
||||
using NLDPB;
|
||||
using PhxhSDK;
|
||||
|
|
@ -109,13 +108,13 @@ namespace Gameplay.Guide
|
|||
if (IsGuiding)
|
||||
return false;
|
||||
|
||||
int completeStepId = (int)Actor.Instance.Logic.GetCount((uint)LogicID.NewGuideProgress);
|
||||
int groupId = GetGuideGroupId(completeStepId);
|
||||
if (!dicGuideCfg.TryGetValue(groupId, out LinkedList<DataGuideCfg> linkCfg))
|
||||
return false;
|
||||
|
||||
try
|
||||
{
|
||||
int completeStepId = (int)Actor.Instance.Logic.GetCount((uint)LogicID.NewGuideProgress);
|
||||
int groupId = GetGuideGroupId(completeStepId);
|
||||
if (!dicGuideCfg.TryGetValue(groupId, out LinkedList<DataGuideCfg> linkCfg))
|
||||
return false;
|
||||
|
||||
SetGuideState();
|
||||
DebugUtil.Log($"<color=#00FA9A>已完成的引导步骤id:{completeStepId},开始引导组id:{groupId}</color>");
|
||||
curGroup = new(groupId, linkCfg);
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ namespace Gameplay.Guide
|
|||
protected abstract void RecoverState();
|
||||
}
|
||||
|
||||
#region 点击
|
||||
#region 引导点击
|
||||
/// <summary>
|
||||
/// 点击按钮
|
||||
/// </summary>
|
||||
|
|
@ -223,18 +223,25 @@ namespace Gameplay.Guide
|
|||
|
||||
public ClickButtonStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 1)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 1)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.UI名,2.按钮路径");
|
||||
|
||||
uiName = cfg.GuideTypeParams[0];
|
||||
buttonPath = cfg.GuideTypeParams[1];
|
||||
uiName = Cfg.GuideTypeParams[0];
|
||||
buttonPath = Cfg.GuideTypeParams[1];
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.Button, uiName, buttonPath, Cfg);
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.Button, uiName, buttonPath, Cfg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -270,21 +277,33 @@ namespace Gameplay.Guide
|
|||
|
||||
public SliderButtonStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 1)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 1)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.UI名,2.按钮路径,3(可选).地板索引");
|
||||
|
||||
uiName = cfg.GuideTypeParams[0];
|
||||
buttonPath = cfg.GuideTypeParams[1];
|
||||
uiName = Cfg.GuideTypeParams[0];
|
||||
buttonPath = Cfg.GuideTypeParams[1];
|
||||
|
||||
if (cfg.GuideTypeParams.Length > 2 && int.TryParse(cfg.GuideTypeParams[2], out int index))
|
||||
floorIndex = index;
|
||||
if (Cfg.GuideTypeParams.Length > 2)
|
||||
{
|
||||
if (int.TryParse(Cfg.GuideTypeParams[2], out int index))
|
||||
floorIndex = index;
|
||||
else
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第3个参数类型错误:应该为int类型");
|
||||
}
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.SliderButton, uiName, buttonPath, Cfg, floorIndex);
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.SliderButton, uiName, buttonPath, Cfg, floorIndex);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -312,18 +331,27 @@ namespace Gameplay.Guide
|
|||
|
||||
public ClickFloorStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.地板索引");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int index))
|
||||
if (int.TryParse(Cfg.GuideTypeParams[0], out int index))
|
||||
floorIndex = index;
|
||||
else
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第1个参数类型错误:应该为int类型");
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(floorIndex, Cfg);
|
||||
await UI_GuideController.Open(floorIndex, Cfg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -368,18 +396,25 @@ namespace Gameplay.Guide
|
|||
|
||||
public PlayVideoStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.视频路径");
|
||||
|
||||
videoPath = cfg.GuideTypeParams[0];
|
||||
videoPath = Cfg.GuideTypeParams[0];
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
UIManager.Instance.CloseWindow(UINameConst.UI_Guide);
|
||||
await UI_PlayVideoController.Open(videoPath);
|
||||
UIManager.Instance.CloseWindow(UINameConst.UI_Guide);
|
||||
await UI_PlayVideoController.Open(videoPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -402,9 +437,16 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
GameStateManager.Instance.ChangeState(new GameStateMainScene());
|
||||
GameStateManager.Instance.ChangeState(new GameStateMainScene());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -430,18 +472,27 @@ namespace Gameplay.Guide
|
|||
|
||||
public ShowGuideTipStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.引导Tip的Id");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int id))
|
||||
if (int.TryParse(Cfg.GuideTypeParams[0], out int id))
|
||||
guideTipCfgId = id;
|
||||
else
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第1个参数类型错误:应该为int类型");
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -470,22 +521,36 @@ namespace Gameplay.Guide
|
|||
public EnterLevelStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (Cfg.GuideTypeParams.Length < 1)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.关卡id");
|
||||
|
||||
if (int.TryParse(Cfg.GuideTypeParams[0], out int id))
|
||||
levelId = id;
|
||||
|
||||
if (Cfg.GuideTypeParams.Length > 1 && bool.TryParse(Cfg.GuideTypeParams[1], out bool isPlay))
|
||||
this.isPlay = isPlay;
|
||||
else
|
||||
this.isPlay = true;
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第1个参数类型错误:应该为int类型");
|
||||
|
||||
if (Cfg.GuideTypeParams.Length > 1)
|
||||
{
|
||||
if (bool.TryParse(Cfg.GuideTypeParams[1], out bool isPlay))
|
||||
this.isPlay = isPlay;
|
||||
else
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第2个参数类型错误:应该为bool类型");
|
||||
}
|
||||
else
|
||||
isPlay = true;
|
||||
}
|
||||
|
||||
protected override void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
LevelManager.Instance.TryEnterLevel(levelId, null, null, isPlay);
|
||||
LevelManager.Instance.TryEnterLevel(levelId, null, null, isPlay);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -547,9 +612,16 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -561,195 +633,6 @@ namespace Gameplay.Guide
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 教学战斗移动
|
||||
/// </summary>
|
||||
internal sealed class TeachFightMoveStep : GuideStepBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导提示配置id
|
||||
/// </summary>
|
||||
private readonly int guideTipCfgId;
|
||||
|
||||
public TeachFightMoveStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int id))
|
||||
guideTipCfgId = id;
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(true);
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 教学战斗攻击
|
||||
/// </summary>
|
||||
internal sealed class TeachFightAttackStep : GuideStepBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导提示配置id
|
||||
/// </summary>
|
||||
private readonly int guideTipCfgId;
|
||||
|
||||
public TeachFightAttackStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int id))
|
||||
guideTipCfgId = id;
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(true);
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 教学士气与压制
|
||||
/// </summary>
|
||||
internal sealed class TeachMoraleAndRepression : GuideStepBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导提示配置id
|
||||
/// </summary>
|
||||
private readonly int guideTipCfgId;
|
||||
|
||||
public TeachMoraleAndRepression(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int id))
|
||||
guideTipCfgId = id;
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(true);
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 教学使用技能
|
||||
/// </summary>
|
||||
internal sealed class TeachUseSkill : GuideStepBase
|
||||
{
|
||||
public TeachUseSkill(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(true);
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 教学战斗中上阵
|
||||
/// </summary>
|
||||
internal sealed class TeachFightEmbattle : GuideStepBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导提示配置id
|
||||
/// </summary>
|
||||
private readonly int guideTipCfgId;
|
||||
|
||||
public TeachFightEmbattle(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
|
||||
if (int.TryParse(cfg.GuideTypeParams[0], out int id))
|
||||
guideTipCfgId = id;
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideTipController.Open(guideTipCfgId);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(true);
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
if (LevelManager.Instance.IsInLevel && null != LevelManager.Instance.CurrentLevel)
|
||||
LevelManager.Instance.CurrentLevel.SetPause(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 等待关卡结束
|
||||
/// </summary>
|
||||
|
|
@ -759,43 +642,28 @@ namespace Gameplay.Guide
|
|||
|
||||
public WaitLevelOver(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导类型:{Cfg.GuideStepType},参数错误");
|
||||
if (Cfg.GuideTypeParams.Length <= 0)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.退出关卡是否切换主场景");
|
||||
|
||||
if (bool.TryParse(cfg.GuideTypeParams[0], out bool isContinue))
|
||||
if (bool.TryParse(Cfg.GuideTypeParams[0], out bool isContinue))
|
||||
this.isContinue = isContinue;
|
||||
else
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},第1个参数类型错误:应该为bool类型");
|
||||
}
|
||||
|
||||
protected override void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
UIManager.Instance.CloseWindow(UINameConst.UI_Guide);
|
||||
LevelManager.Instance.ExitLevelChangeMainFunc = () => { return isContinue; };
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关卡载具上阵
|
||||
/// </summary>
|
||||
internal sealed class LevelVehicleEmbattleStep : GuideStepBase
|
||||
{
|
||||
public LevelVehicleEmbattleStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
UIManager.Instance.CloseWindow(UINameConst.UI_Guide);
|
||||
LevelManager.Instance.ExitLevelChangeMainFunc = () => { return isContinue; };
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -818,10 +686,17 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_ChoosePersonController.Open();
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_ChoosePersonController.Open();
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -845,17 +720,26 @@ namespace Gameplay.Guide
|
|||
|
||||
public WaitStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length <= 0)
|
||||
if (Cfg.GuideTypeParams.Length <= 0)
|
||||
isFullMask = true;
|
||||
else if (bool.TryParse(cfg.GuideTypeParams[0], out bool isMask))
|
||||
else if (bool.TryParse(Cfg.GuideTypeParams[0], out bool isMask))
|
||||
isFullMask = isMask;
|
||||
else
|
||||
isFullMask = false;
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(isFullMask);
|
||||
await UI_GuideController.Open(isFullMask);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -878,18 +762,26 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(false);
|
||||
GuideManager.Instance.IsChangeName = false;
|
||||
await UI_GuideController.Open(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
GuideManager.Instance.IsChangeName = false;
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
GuideManager.Instance.IsChangeName = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -904,18 +796,26 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
GuideManager.Instance.IsEditTeamGuide = true;
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
await UI_GuideController.Open(Cfg, false);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
{
|
||||
GuideManager.Instance.IsEditTeamGuide = true;
|
||||
}
|
||||
|
||||
protected override void RecoverState()
|
||||
{
|
||||
GuideManager.Instance.IsEditTeamGuide = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -935,18 +835,25 @@ namespace Gameplay.Guide
|
|||
|
||||
public NoteStep(DataGuideCfg cfg) : base(cfg)
|
||||
{
|
||||
if (cfg.GuideTypeParams.Length > 1)
|
||||
{
|
||||
uiName = cfg.GuideTypeParams[0];
|
||||
buttonPath = cfg.GuideTypeParams[1];
|
||||
}
|
||||
if (Cfg.GuideTypeParams.Length <= 1)
|
||||
throw new Exception($"引导id:{Cfg.Id}, 引导类型:{Cfg.GuideStepType},参数数量错误:1.UI名,2.UI路径");
|
||||
|
||||
uiName = cfg.GuideTypeParams[0];
|
||||
buttonPath = cfg.GuideTypeParams[1];
|
||||
}
|
||||
|
||||
protected override async void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
try
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.UI, uiName, buttonPath, Cfg);
|
||||
await UI_GuideController.Open(UI_GuideController.E_GuideArrowType.UI, uiName, buttonPath, Cfg);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
@ -974,28 +881,35 @@ namespace Gameplay.Guide
|
|||
|
||||
protected override void DoGuide()
|
||||
{
|
||||
base.DoGuide();
|
||||
|
||||
Team team = TeamEditManager.Instance.GetSelectTeam();
|
||||
if (null == team)
|
||||
return;
|
||||
|
||||
//TODO 待验证
|
||||
uint[] characters = new uint[team.GetCharacterIDs().Length];
|
||||
for (int i = 0; i < characters.Length; ++i)
|
||||
try
|
||||
{
|
||||
if (TableManager.Instance.Tables.GlobalConfig.DefaultUnitIDs.Count > i)
|
||||
characters[i] = (uint)TableManager.Instance.Tables.GlobalConfig.DefaultUnitIDs[i];
|
||||
base.DoGuide();
|
||||
|
||||
Team team = TeamEditManager.Instance.GetSelectTeam();
|
||||
if (null == team)
|
||||
return;
|
||||
|
||||
//TODO 待验证
|
||||
uint[] characters = new uint[team.GetCharacterIDs().Length];
|
||||
for (int i = 0; i < characters.Length; ++i)
|
||||
{
|
||||
if (TableManager.Instance.Tables.GlobalConfig.DefaultUnitIDs.Count > i)
|
||||
characters[i] = (uint)TableManager.Instance.Tables.GlobalConfig.DefaultUnitIDs[i];
|
||||
}
|
||||
|
||||
Team newTeam = new(team.TeamIndex,
|
||||
team.Name,
|
||||
team.IconNumber,
|
||||
characters,
|
||||
team.GetPlayerSkillIDs(),
|
||||
team.GetVehicleID());
|
||||
|
||||
TeamEditManager.Instance.SaveTeam(newTeam);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
DebugUtil.LogError($"引导id:{Cfg.Id},执行错误,异常信息:{e}");
|
||||
}
|
||||
|
||||
Team newTeam = new(team.TeamIndex,
|
||||
team.Name,
|
||||
team.IconNumber,
|
||||
characters,
|
||||
team.GetPlayerSkillIDs(),
|
||||
team.GetVehicleID());
|
||||
|
||||
TeamEditManager.Instance.SaveTeam(newTeam);
|
||||
}
|
||||
|
||||
protected override void SetGuideState()
|
||||
|
|
|
|||
|
|
@ -44,57 +44,37 @@ namespace cfg.GuideCfg
|
|||
/// </summary>
|
||||
Embattle = 7,
|
||||
/// <summary>
|
||||
/// 教学战斗移动
|
||||
/// </summary>
|
||||
TeachFightMove = 8,
|
||||
/// <summary>
|
||||
/// 教学战斗攻击
|
||||
/// </summary>
|
||||
TeachFightAttack = 9,
|
||||
/// <summary>
|
||||
/// 教学战斗中上阵
|
||||
/// </summary>
|
||||
TeachFightEmbattle = 10,
|
||||
/// <summary>
|
||||
/// 教学士气与压制机制
|
||||
/// </summary>
|
||||
TeachFightMoraleAndRepression = 11,
|
||||
/// <summary>
|
||||
/// 教学释放技能
|
||||
/// </summary>
|
||||
TeachFightUseSkill = 12,
|
||||
/// <summary>
|
||||
/// 等待关卡结束
|
||||
/// </summary>
|
||||
WaitLevelComplete = 13,
|
||||
WaitLevelComplete = 8,
|
||||
/// <summary>
|
||||
/// 关卡上阵载具
|
||||
/// </summary>
|
||||
EmbattleVehicle = 14,
|
||||
EmbattleVehicle = 9,
|
||||
/// <summary>
|
||||
/// 打开玩家形象选择界面
|
||||
/// </summary>
|
||||
OpenChoosePerson = 15,
|
||||
OpenChoosePerson = 10,
|
||||
/// <summary>
|
||||
/// 等待
|
||||
/// </summary>
|
||||
Wait = 16,
|
||||
Wait = 11,
|
||||
/// <summary>
|
||||
/// 等待打开改名
|
||||
/// </summary>
|
||||
WaitOpenChangeName = 17,
|
||||
WaitOpenChangeName = 12,
|
||||
/// <summary>
|
||||
/// 等待编队
|
||||
/// </summary>
|
||||
WaitEditTeam = 18,
|
||||
WaitEditTeam = 13,
|
||||
/// <summary>
|
||||
/// 提示说明
|
||||
/// </summary>
|
||||
NoteStep = 19,
|
||||
NoteStep = 14,
|
||||
/// <summary>
|
||||
/// 保存默认编队
|
||||
/// </summary>
|
||||
SaveDefaultTeam = 20,
|
||||
SaveDefaultTeam = 15,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 15,
|
||||
"GuideStepType": 10,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 4,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -135,7 +135,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 21,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 4,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -239,7 +239,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 11,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -325,7 +325,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 22,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -431,7 +431,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 23,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -450,7 +450,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 19,
|
||||
"GuideStepType": 14,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 26,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -471,7 +471,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -513,7 +513,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 17,
|
||||
"GuideStepType": 12,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 24,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -532,7 +532,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -555,7 +555,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -597,7 +597,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 20,
|
||||
"GuideStepType": 15,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 27,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -808,7 +808,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 18,
|
||||
"GuideStepType": 13,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 25,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -829,7 +829,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0.1,
|
||||
"GuideStepType": 19,
|
||||
"GuideStepType": 14,
|
||||
"GuideTypeParams": [
|
||||
"TeamChoose/UI_TeamInfo",
|
||||
"UI_LiuHaiLeft/ScrollView_Bounds/Viewport/Content/UI_Buff(Clone)"
|
||||
|
|
@ -901,7 +901,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -968,7 +968,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -1010,7 +1010,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -1098,7 +1098,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 3,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -1691,7 +1691,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0.5,
|
||||
"GuideStepType": 14,
|
||||
"GuideStepType": 9,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 20,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -1712,7 +1712,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 4,
|
||||
"CompleteTypeParams": [
|
||||
|
|
@ -1798,7 +1798,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 16,
|
||||
"GuideStepType": 11,
|
||||
"GuideTypeParams": [],
|
||||
"GuideCompleteType": 22,
|
||||
"CompleteTypeParams": [],
|
||||
|
|
@ -1860,7 +1860,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0.5,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
@ -1902,7 +1902,7 @@
|
|||
"IsBeginStep": false,
|
||||
"IsComplete": false,
|
||||
"StepStartDelay": 0,
|
||||
"GuideStepType": 13,
|
||||
"GuideStepType": 8,
|
||||
"GuideTypeParams": [
|
||||
"False"
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue