引导增加起始步骤标记

main
yurui 2024-07-05 19:33:21 +08:00
parent 116af57a76
commit 796ef533a0
4 changed files with 101 additions and 5 deletions

View File

@ -68,14 +68,27 @@ namespace Gameplay.Guide
}
#endregion
public GuideGroup(int groupId, LinkedList<DataGuideCfg> linkCfg)
/// <summary>
/// 引导组构造
/// </summary>
/// <param name="groupId"></param>
/// <param name="linkCfg"></param>
/// <param name="isSkipBeginSkip">是否跳过起始步骤</param>
public GuideGroup(int groupId, LinkedList<DataGuideCfg> linkCfg, bool isSkipBeginSkip = false)
{
GroupId = groupId;
linkGuideStep = new();
foreach (DataGuideCfg cfg in linkCfg)
{
linkGuideStep.AddLast(CreateGuideStep(cfg));
if (!isSkipBeginSkip)
{
linkGuideStep.AddLast(CreateGuideStep(cfg));
continue;
}
if (!cfg.IsBeginStep)
linkGuideStep.AddLast(CreateGuideStep(cfg));
}
curStep = linkGuideStep.First;

View File

@ -100,7 +100,7 @@ namespace Gameplay.Guide
if (guide.Key > completeGroupId)
{
DebugUtil.Log($"<color=#00FA9A>已完成的引导组id:{completeGroupId}开始引导组id:{guide.Key}</color>");
curGroup = new(guide.Key, guide.Value); // TODO 测试
curGroup = new(guide.Key, guide.Value);
curGroup.BeginGuide();
return true;
@ -140,7 +140,7 @@ namespace Gameplay.Guide
int nextGroupId = curGroup.NextGroupId;
if (dicGuideCfg.TryGetValue(nextGroupId, out LinkedList<DataGuideCfg> linkCfg))
{
curGroup = new(nextGroupId, linkCfg);
curGroup = new(nextGroupId, linkCfg, true);
curGroup.BeginGuide();
}
else

View File

@ -22,6 +22,7 @@ public sealed partial class DataGuideCfg : Bright.Config.BeanBase
{ if(!_json["GroupId"].IsNumber) { throw new SerializationException(); } GroupId = _json["GroupId"]; }
{ if(!_json["BeginCondition"].IsNumber) { throw new SerializationException(); } BeginCondition = _json["BeginCondition"]; }
{ if(!_json["NextId"].IsNumber) { throw new SerializationException(); } NextId = _json["NextId"]; }
{ if(!_json["IsBeginStep"].IsBoolean) { throw new SerializationException(); } IsBeginStep = _json["IsBeginStep"]; }
{ if(!_json["StepStartDelay"].IsNumber) { throw new SerializationException(); } StepStartDelay = _json["StepStartDelay"]; }
{ if(!_json["GuideStepType"].IsNumber) { throw new SerializationException(); } GuideStepType = (GuideCfg.E_GuideStepType)_json["GuideStepType"].AsInt; }
{ var __json0 = _json["GuideTypeParams"]; if(!__json0.IsArray) { throw new SerializationException(); } int _n0 = __json0.Count; GuideTypeParams = new string[_n0]; int __index0=0; foreach(JSONNode __e0 in __json0.Children) { string __v0; { if(!__e0.IsString) { throw new SerializationException(); } __v0 = __e0; } GuideTypeParams[__index0++] = __v0; } }
@ -33,12 +34,13 @@ public sealed partial class DataGuideCfg : Bright.Config.BeanBase
PostInit();
}
public DataGuideCfg(int Id, int GroupId, int BeginCondition, int NextId, float StepStartDelay, GuideCfg.E_GuideStepType GuideStepType, string[] GuideTypeParams, GuideCfg.E_GuideCompleteType GuideCompleteType, string[] CompleteTypeParams, GuideCfg.E_ArrowDirection ArrowDirection, UnityEngine.Vector2 ArrowOffset, string TipKey )
public DataGuideCfg(int Id, int GroupId, int BeginCondition, int NextId, bool IsBeginStep, float StepStartDelay, GuideCfg.E_GuideStepType GuideStepType, string[] GuideTypeParams, GuideCfg.E_GuideCompleteType GuideCompleteType, string[] CompleteTypeParams, GuideCfg.E_ArrowDirection ArrowDirection, UnityEngine.Vector2 ArrowOffset, string TipKey )
{
this.Id = Id;
this.GroupId = GroupId;
this.BeginCondition = BeginCondition;
this.NextId = NextId;
this.IsBeginStep = IsBeginStep;
this.StepStartDelay = StepStartDelay;
this.GuideStepType = GuideStepType;
this.GuideTypeParams = GuideTypeParams;
@ -72,6 +74,10 @@ public sealed partial class DataGuideCfg : Bright.Config.BeanBase
/// </summary>
public int NextId { get; private set; }
/// <summary>
/// 是否起始步骤
/// </summary>
public bool IsBeginStep { get; private set; }
/// <summary>
/// 引导开始延迟时间
/// </summary>
public float StepStartDelay { get; private set; }
@ -123,6 +129,7 @@ public sealed partial class DataGuideCfg : Bright.Config.BeanBase
+ "GroupId:" + GroupId + ","
+ "BeginCondition:" + BeginCondition + ","
+ "NextId:" + NextId + ","
+ "IsBeginStep:" + IsBeginStep + ","
+ "StepStartDelay:" + StepStartDelay + ","
+ "GuideStepType:" + GuideStepType + ","
+ "GuideTypeParams:" + Bright.Common.StringUtil.CollectionToString(GuideTypeParams) + ","

View File

@ -4,6 +4,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 11,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 6,
"GuideTypeParams": [
@ -24,6 +25,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 12,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 15,
"GuideTypeParams": [],
@ -43,6 +45,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 13,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [
@ -62,6 +65,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 14,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 6,
"GuideTypeParams": [
@ -81,6 +85,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 15,
"IsBeginStep": false,
"StepStartDelay": 0.2,
"GuideStepType": 3,
"GuideTypeParams": [
@ -101,6 +106,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 16,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -120,6 +126,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 17,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [],
@ -137,6 +144,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 18,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -157,6 +165,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 19,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [],
@ -176,6 +185,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 20,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -195,6 +205,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 21,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -214,6 +225,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 22,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [],
@ -234,6 +246,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 23,
"IsBeginStep": false,
"StepStartDelay": 2,
"GuideStepType": 5,
"GuideTypeParams": [
@ -253,6 +266,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 24,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [],
@ -270,6 +284,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 25,
"IsBeginStep": false,
"StepStartDelay": 2,
"GuideStepType": 3,
"GuideTypeParams": [
@ -290,6 +305,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 26,
"IsBeginStep": false,
"StepStartDelay": 0.2,
"GuideStepType": 3,
"GuideTypeParams": [
@ -310,6 +326,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 27,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -329,6 +346,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 28,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 4,
"GuideTypeParams": [
@ -349,6 +367,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 29,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -368,6 +387,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 30,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [],
@ -385,6 +405,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 31,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 19,
"GuideTypeParams": [],
@ -404,6 +425,7 @@
"GroupId": 10,
"BeginCondition": 0,
"NextId": 50,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [
@ -423,6 +445,7 @@
"GroupId": 50,
"BeginCondition": 0,
"NextId": 51,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 6,
"GuideTypeParams": [
@ -442,6 +465,7 @@
"GroupId": 50,
"BeginCondition": 0,
"NextId": 52,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 17,
"GuideTypeParams": [],
@ -459,6 +483,7 @@
"GroupId": 50,
"BeginCondition": 0,
"NextId": 53,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [
@ -480,6 +505,7 @@
"GroupId": 50,
"BeginCondition": 0,
"NextId": 100,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [
@ -499,6 +525,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 101,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 1,
"GuideTypeParams": [],
@ -518,6 +545,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 102,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -540,6 +568,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 103,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -562,6 +591,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 104,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -584,6 +614,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 105,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -606,6 +637,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 106,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -628,6 +660,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 107,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -650,6 +683,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 108,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -672,6 +706,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 109,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -694,6 +729,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 110,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 18,
"GuideTypeParams": [],
@ -713,6 +749,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 111,
"IsBeginStep": false,
"StepStartDelay": 0.1,
"GuideStepType": 19,
"GuideTypeParams": [
@ -735,6 +772,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 112,
"IsBeginStep": false,
"StepStartDelay": 0.3,
"GuideStepType": 3,
"GuideTypeParams": [
@ -757,6 +795,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 113,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -779,6 +818,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 114,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [
@ -800,6 +840,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 115,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -820,6 +861,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 116,
"IsBeginStep": false,
"StepStartDelay": 0.8,
"GuideStepType": 4,
"GuideTypeParams": [
@ -840,6 +882,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 117,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -859,6 +902,7 @@
"GroupId": 100,
"BeginCondition": 0,
"NextId": 200,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [
@ -878,6 +922,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 201,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 1,
"GuideTypeParams": [],
@ -897,6 +942,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 202,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -919,6 +965,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 203,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -941,6 +988,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 204,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -963,6 +1011,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 205,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -983,6 +1032,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 206,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1003,6 +1053,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 207,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1025,6 +1076,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 208,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1047,6 +1099,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 209,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1069,6 +1122,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 210,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1091,6 +1145,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 211,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1113,6 +1168,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 212,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1135,6 +1191,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 213,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1157,6 +1214,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 214,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1179,6 +1237,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 215,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1201,6 +1260,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 216,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1223,6 +1283,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 217,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1245,6 +1306,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 218,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 2,
"GuideTypeParams": [
@ -1266,6 +1328,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 219,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 14,
"GuideTypeParams": [],
@ -1285,6 +1348,7 @@
"GroupId": 200,
"BeginCondition": 0,
"NextId": 220,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 13,
"GuideTypeParams": [
@ -1304,6 +1368,7 @@
"GroupId": 220,
"BeginCondition": 0,
"NextId": 221,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 6,
"GuideTypeParams": [
@ -1323,6 +1388,7 @@
"GroupId": 220,
"BeginCondition": 0,
"NextId": 222,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [
@ -1342,6 +1408,7 @@
"GroupId": 300,
"BeginCondition": 0,
"NextId": 301,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 1,
"GuideTypeParams": [],
@ -1361,6 +1428,7 @@
"GroupId": 300,
"BeginCondition": 0,
"NextId": 302,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1383,6 +1451,7 @@
"GroupId": 300,
"BeginCondition": 0,
"NextId": 303,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 2,
"GuideTypeParams": [
@ -1404,6 +1473,7 @@
"GroupId": 300,
"BeginCondition": 0,
"NextId": 0,
"IsBeginStep": false,
"StepStartDelay": 0.5,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1424,6 +1494,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 1001,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 6,
"GuideTypeParams": [
@ -1443,6 +1514,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 1002,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 16,
"GuideTypeParams": [
@ -1464,6 +1536,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 1003,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 3,
"GuideTypeParams": [
@ -1484,6 +1557,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 1004,
"IsBeginStep": false,
"StepStartDelay": 0.8,
"GuideStepType": 4,
"GuideTypeParams": [
@ -1504,6 +1578,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 1005,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 5,
"GuideTypeParams": [
@ -1523,6 +1598,7 @@
"GroupId": 1000,
"BeginCondition": 0,
"NextId": 0,
"IsBeginStep": false,
"StepStartDelay": 0,
"GuideStepType": 13,
"GuideTypeParams": [