【新手引导】完善
parent
e94cb66e96
commit
7af8c4def4
File diff suppressed because one or more lines are too long
|
@ -8,7 +8,7 @@
|
|||
"GuideType": 0,
|
||||
"GuideParams": "BuildRoot/Node5/Option1/Normal",
|
||||
"GuideCompleteType": 0,
|
||||
"GuideCompleteParams": ""
|
||||
"GuideCompleteParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar"
|
||||
},
|
||||
{
|
||||
"ID": 102,
|
||||
|
@ -17,20 +17,20 @@
|
|||
"GuideNote": "更换建造物",
|
||||
"GuideDesKey": "Guide_102",
|
||||
"GuideType": 0,
|
||||
"GuideParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar/Bar_Tip/Scroll View/Viewport/Content/Item2/Img_Item\n",
|
||||
"GuideCompleteType": 0,
|
||||
"GuideCompleteParams": ""
|
||||
"GuideParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar/Bar_Tip/Scroll View/Viewport/Content/Item2/Img_Item",
|
||||
"GuideCompleteType": 3,
|
||||
"GuideCompleteParams": "BuildRoot/Node5/Option2/Normal"
|
||||
},
|
||||
{
|
||||
"ID": 103,
|
||||
"NextID": 104,
|
||||
"GroupID": 1,
|
||||
"GuideNote": "点击保存",
|
||||
"GuideNote": "保存更改",
|
||||
"GuideDesKey": "Guide_103",
|
||||
"GuideType": 0,
|
||||
"GuideParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar/Btn_Yes",
|
||||
"GuideCompleteType": 1,
|
||||
"GuideCompleteParams": ""
|
||||
"GuideCompleteParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar"
|
||||
},
|
||||
{
|
||||
"ID": 104,
|
||||
|
@ -41,7 +41,7 @@
|
|||
"GuideType": 0,
|
||||
"GuideParams": "BuildRoot/Node1/Btn",
|
||||
"GuideCompleteType": 0,
|
||||
"GuideCompleteParams": ""
|
||||
"GuideCompleteParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar"
|
||||
},
|
||||
{
|
||||
"ID": 105,
|
||||
|
@ -52,7 +52,7 @@
|
|||
"GuideType": 0,
|
||||
"GuideParams": "BuildBoot/BuildUIRoot/UIMainBuild/UI_LiuHaiBottom/Build_Bar/Bar_Tip/Scroll View/Viewport/Content/Item1/Img_Lock",
|
||||
"GuideCompleteType": 0,
|
||||
"GuideCompleteParams": ""
|
||||
"GuideCompleteParams": "BuildBoot/BuildUIRoot/UIMainBuild/Build_Tip"
|
||||
},
|
||||
{
|
||||
"ID": 106,
|
||||
|
|
|
@ -63,4 +63,10 @@ QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm
|
|||
失败激励
|
||||
尚未解锁
|
||||
去探索更多关卡吧
|
||||
点击任意地方退出
|
||||
点击任意地方退出
|
||||
点击岛屿
|
||||
更换建造物
|
||||
保存更改
|
||||
点击泡泡按钮
|
||||
点击上锁图标
|
||||
点击开始游戏
|
|
@ -1,12 +1,13 @@
|
|||
using System;
|
||||
using PhxhSDK;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Framework.Event
|
||||
{
|
||||
public partial class EventManager :Singlenton<EventManager>
|
||||
public partial class EventManager : Singlenton<EventManager>
|
||||
{
|
||||
private Dictionary<EventName, HashSet<Delegate>> _eventDict = new Dictionary<EventName, HashSet<Delegate>>();
|
||||
private Dictionary<EventName, HashSet<Delegate>> _eventDict = new Dictionary<EventName, HashSet<Delegate>>();
|
||||
|
||||
private Action<EventName> _afterSendCallBack;
|
||||
|
||||
|
@ -124,7 +125,6 @@ namespace Framework.Event
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
var actions = _eventDict[eventName];
|
||||
var tempExecuteList = GetTempExecuteList();
|
||||
tempExecuteList.AddRange(actions);
|
||||
|
@ -158,7 +158,8 @@ namespace Framework.Event
|
|||
return;
|
||||
}
|
||||
|
||||
var actions = _eventDict[eventName];
|
||||
var actions = _eventDict[eventName].ToList();
|
||||
|
||||
foreach (var action in actions)
|
||||
{
|
||||
if (action is Action actionT)
|
||||
|
@ -166,6 +167,7 @@ namespace Framework.Event
|
|||
actionT();
|
||||
}
|
||||
}
|
||||
|
||||
_afterSendCallBack?.Invoke(eventName);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -186,4 +188,4 @@ namespace Framework.Event
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,6 +36,7 @@ namespace Framework.Event
|
|||
GuideMaskStart, //更换遮罩对象
|
||||
OpenUI,
|
||||
CloseUI,
|
||||
ChangeBuild,
|
||||
EnterGame,
|
||||
|
||||
}
|
||||
|
|
|
@ -129,7 +129,6 @@ public class BuildBoot : MonoBehaviour
|
|||
|
||||
public void Open(Node node, Action<Option> callBack, Action lockCallBack, int reachCondition, int condition)
|
||||
{
|
||||
EventManager.Instance.Send(EventManager.EventName.OpenUI);
|
||||
_optionCallBack = callBack;
|
||||
_bar.SetActive(true);
|
||||
_condition.text = string.Format(ConditionText, reachCondition, condition);
|
||||
|
@ -469,7 +468,9 @@ public class BuildBoot : MonoBehaviour
|
|||
var levelID = $"level{LevelSelectManager.Instance.CurPassLevelIndex + 1}";
|
||||
if (LevelManager.Instance.IsLevelExist(levelID))
|
||||
{
|
||||
DebugUtil.LogError("进入游戏一次");
|
||||
GameStateManager.Instance.ChangeState(new LevelState(levelID));
|
||||
EventManager.Instance.Send(EventManager.EventName.EnterGame);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -503,6 +504,7 @@ public class BuildBoot : MonoBehaviour
|
|||
_mask.SetActive(false);
|
||||
_pickItem.SetActive(false);
|
||||
_buildBar.Close();
|
||||
EventManager.Instance.Send(EventManager.EventName.CloseUI);
|
||||
|
||||
if (_curNode == null || _newOption == null)
|
||||
{
|
||||
|
@ -556,7 +558,9 @@ public class BuildBoot : MonoBehaviour
|
|||
var condition = BuildManager.Instance.GetCondition(nodeName);
|
||||
_buildBar.Open(node, BuildIconClick, BuildLockIconClick, CurCondition, condition);
|
||||
_buildBar.PickItemDisplay(optionName);
|
||||
ChangePickItem(_curOption);
|
||||
OutlinePickItem(_curOption);
|
||||
|
||||
EventManager.Instance.Send(EventManager.EventName.OpenUI);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -567,7 +571,7 @@ public class BuildBoot : MonoBehaviour
|
|||
/// <summary>
|
||||
/// 描边展示
|
||||
/// </summary>
|
||||
private void ChangePickItem(Option option)
|
||||
private void OutlinePickItem(Option option)
|
||||
{
|
||||
if (option == null) return;
|
||||
_pickItem.transform.position = option.OptionObj.transform.position;
|
||||
|
@ -591,6 +595,8 @@ public class BuildBoot : MonoBehaviour
|
|||
{
|
||||
var condition = BuildManager.Instance.GetCondition(nodeName);
|
||||
_buildBar.Open(node, BuildIconClick, BuildLockIconClick, CurCondition, condition);
|
||||
|
||||
EventManager.Instance.Send(EventManager.EventName.OpenUI);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -603,6 +609,9 @@ public class BuildBoot : MonoBehaviour
|
|||
/// </summary>
|
||||
private void BuildIconClick(Option option)
|
||||
{
|
||||
EventManager.Instance.Send(EventManager.EventName.ChangeBuild);
|
||||
if (option == _newOption)
|
||||
return;
|
||||
var nodeName = option.NodeObj.name;
|
||||
//切换UI表现
|
||||
if (_nodes.TryGetValue(nodeName, out var node))
|
||||
|
@ -614,7 +623,8 @@ public class BuildBoot : MonoBehaviour
|
|||
}
|
||||
|
||||
_newOption = option;
|
||||
ChangePickItem(option);
|
||||
|
||||
OutlinePickItem(option);
|
||||
|
||||
//DebugUtil.LogError("点击了{0}节点的{1}选项", nodeName, option.OptionObj.name);
|
||||
}
|
||||
|
@ -626,6 +636,7 @@ public class BuildBoot : MonoBehaviour
|
|||
{
|
||||
_mask.SetActive(true);
|
||||
_tipObj.SetActive(true);
|
||||
EventManager.Instance.Send(EventManager.EventName.OpenUI);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -1,28 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using cfg.Guide;
|
||||
using Framework.UI;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class GuideGroup
|
||||
{
|
||||
public int GroupID;
|
||||
public LinkedList<GuideStepBase> GuideSteps = new LinkedList<GuideStepBase>();
|
||||
private readonly int _groupID;
|
||||
private readonly LinkedList<GuideStepBase> _guideSteps = new LinkedList<GuideStepBase>();
|
||||
|
||||
public LinkedListNode<GuideStepBase> CurGuideStep;
|
||||
|
||||
public int NextGroupGuideID;
|
||||
public readonly int NextGroupGuideID;
|
||||
|
||||
public GuideGroup(int groupID, LinkedList<DataGuide> groupData)
|
||||
{
|
||||
GroupID = groupID;
|
||||
_groupID = groupID;
|
||||
NextGroupGuideID = groupData.Last.Value.NextID;
|
||||
foreach (var data in groupData)
|
||||
{
|
||||
var guideStepBase = InitGuideStep(data);
|
||||
GuideSteps.AddLast(guideStepBase);
|
||||
_guideSteps.AddLast(guideStepBase);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化具体引导
|
||||
/// </summary>
|
||||
private GuideStepBase InitGuideStep(DataGuide guideData)
|
||||
{
|
||||
if (guideData == null) return null;
|
||||
|
@ -34,6 +36,38 @@ public class GuideGroup
|
|||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 该组引导是否完成
|
||||
/// </summary>
|
||||
public bool IsCompleteGroupGuide()
|
||||
{
|
||||
return CurGuideStep != null && CurGuideStep == _guideSteps.Last;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开始组引导
|
||||
/// </summary>
|
||||
public void StartGuide()
|
||||
{
|
||||
CurGuideStep ??= _guideSteps.First;
|
||||
CurGuideStep?.Value.StartGuide();
|
||||
|
||||
DebugUtil.LogG($"{_groupID}组进入{CurGuideStep?.Value.GuideCfg.ID}号引导");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 移动至下一个引导
|
||||
/// </summary>
|
||||
public void MoveToNextGuide()
|
||||
{
|
||||
CurGuideStep.Value.EndGuide();
|
||||
CurGuideStep = CurGuideStep.Next;
|
||||
CurGuideStep?.Value.StartGuide();
|
||||
|
||||
DebugUtil.LogG($"{_groupID}组开启下一个引导 {CurGuideStep?.Value.GuideCfg.ID}");
|
||||
}
|
||||
|
||||
|
||||
public string GetGuideMaskTarget()
|
||||
{
|
||||
return CurGuideStep.Value.GuideCfg.GuideParams;
|
||||
|
@ -44,32 +78,4 @@ public class GuideGroup
|
|||
var key = CurGuideStep.Value.GuideCfg.GuideDesKey;
|
||||
return StringManager.Instance.GetTextByKey(key);
|
||||
}
|
||||
|
||||
public bool IsCompleteGroupGuide()
|
||||
{
|
||||
return CurGuideStep != null && CurGuideStep == GuideSteps.Last;
|
||||
}
|
||||
|
||||
public void StartGuide()
|
||||
{
|
||||
CurGuideStep ??= GuideSteps.First;
|
||||
DebugUtil.LogError("{0}组进入{1}号引导", GroupID, CurGuideStep.Value.GuideCfg.ID);
|
||||
CurGuideStep?.Value.StartGuide();
|
||||
}
|
||||
|
||||
public void EndGuide()
|
||||
{
|
||||
CurGuideStep.Value.EndGuide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 开启下一个引导
|
||||
/// </summary>
|
||||
public void MoveToNextGuide()
|
||||
{
|
||||
EndGuide();
|
||||
DebugUtil.LogError("开启下一个引导");
|
||||
CurGuideStep = CurGuideStep.Next;
|
||||
StartGuide();
|
||||
}
|
||||
}
|
|
@ -23,7 +23,7 @@ public class EventPermeate : MonoBehaviour, IPointerClickHandler, IPointerDownHa
|
|||
// 监听点击
|
||||
public void OnPointerClick(PointerEventData eventData)
|
||||
{
|
||||
PassEvent(eventData, ExecuteEvents.submitHandler);
|
||||
// PassEvent(eventData, ExecuteEvents.submitHandler);
|
||||
PassEvent(eventData, ExecuteEvents.pointerClickHandler);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ using Framework.Event;
|
|||
|
||||
public abstract class GuideCompleteBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 通用回调
|
||||
/// </summary>
|
||||
private readonly Action _completeAction;
|
||||
public readonly DataGuide GuideCfg;
|
||||
|
||||
|
@ -13,15 +16,17 @@ public abstract class GuideCompleteBase
|
|||
_completeAction = completeCallback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加监听
|
||||
/// </summary>
|
||||
public abstract void AddListener();
|
||||
|
||||
/// <summary>
|
||||
/// 移除监听
|
||||
/// </summary>
|
||||
public abstract void RemoveListener();
|
||||
|
||||
|
||||
public virtual void Complete()
|
||||
|
||||
protected virtual void Complete()
|
||||
{
|
||||
DebugUtil.LogError("完成引导回调");
|
||||
_completeAction?.Invoke();
|
||||
|
@ -30,18 +35,26 @@ public abstract class GuideCompleteBase
|
|||
|
||||
internal sealed class OpenUI : GuideCompleteBase
|
||||
{
|
||||
private string _uiPath;
|
||||
|
||||
public OpenUI(DataGuide dataGuide, Action completeCallback) : base(dataGuide, completeCallback)
|
||||
{
|
||||
_uiPath = dataGuide.GuideCompleteParams;
|
||||
}
|
||||
|
||||
public override void AddListener()
|
||||
{
|
||||
EventManager.Instance.Register(EventManager.EventName.OpenUI, Complete);
|
||||
EventManager.Instance.Register(EventManager.EventName.OpenUI, OpenUIComplete);
|
||||
}
|
||||
|
||||
public override void RemoveListener()
|
||||
{
|
||||
EventManager.Instance.Unregister(EventManager.EventName.OpenUI, Complete);
|
||||
EventManager.Instance.Unregister(EventManager.EventName.OpenUI, OpenUIComplete);
|
||||
}
|
||||
|
||||
private void OpenUIComplete()
|
||||
{
|
||||
Complete();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,6 +75,23 @@ internal sealed class CloseUI : GuideCompleteBase
|
|||
}
|
||||
}
|
||||
|
||||
internal sealed class ChangeBuild : GuideCompleteBase
|
||||
{
|
||||
public ChangeBuild(DataGuide dataGuide, Action completeCallback) : base(dataGuide, completeCallback)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddListener()
|
||||
{
|
||||
EventManager.Instance.Register(EventManager.EventName.ChangeBuild, Complete);
|
||||
}
|
||||
|
||||
public override void RemoveListener()
|
||||
{
|
||||
EventManager.Instance.Unregister(EventManager.EventName.ChangeBuild, Complete);
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class EnterGame : GuideCompleteBase
|
||||
{
|
||||
public EnterGame(DataGuide dataGuide, Action completeCallback) : base(dataGuide, completeCallback)
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
using System;
|
||||
using Framework.Event;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Framework.Event;
|
||||
|
||||
[RequireComponent(typeof(EventPermeate))]
|
||||
public class GuideController : MonoBehaviour
|
||||
{
|
||||
[HideInInspector] public GameObject target;
|
||||
public GameObject target;
|
||||
|
||||
private static readonly int CenterShader = Shader.PropertyToID("_Center");
|
||||
private static readonly int SliderShader = Shader.PropertyToID("_Slider");
|
||||
|
@ -64,10 +63,13 @@ public class GuideController : MonoBehaviour
|
|||
private void ChangeTarget()
|
||||
{
|
||||
var targetPath = GuideMananger.Instance.GetGuideMaskTarget();
|
||||
DebugUtil.LogError("更换目标:{0}", targetPath);
|
||||
target = GameObject.Find(GuideMananger.Instance.GetGuideMaskTarget());
|
||||
target = GameObject.Find(targetPath);
|
||||
if (string.IsNullOrEmpty(targetPath) || target == null)
|
||||
{
|
||||
DebugUtil.LogError("target为空:{0}", target == null);
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置事件透传对象
|
||||
gameObject.GetComponent<EventPermeate>().target = target.gameObject;
|
||||
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
using System.Collections.Generic;
|
||||
using cfg.Guide;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework;
|
||||
using Framework.UI;
|
||||
using PhxhSDK;
|
||||
using cfg.Guide;
|
||||
using Framework;
|
||||
using UnityEngine;
|
||||
using Framework.UI;
|
||||
using Framework.Manager;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Constants = Framework.Constants.Constants;
|
||||
|
||||
public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
||||
|
@ -29,11 +30,14 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
|||
/// </summary>
|
||||
private Dictionary<int, LinkedList<DataGuide>> _guideData;
|
||||
|
||||
public bool NeedGuide;
|
||||
|
||||
/// <summary>
|
||||
/// 获取引导配置
|
||||
/// </summary>
|
||||
public async UniTask InitData()
|
||||
{
|
||||
if (!NeedGuide) return;
|
||||
var table = TableManager.Instance.Tables.GuideConfig;
|
||||
foreach (var guideData in table.DataList)
|
||||
{
|
||||
|
@ -58,7 +62,7 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
|||
}
|
||||
}
|
||||
|
||||
//TODO读盘得到当前组
|
||||
_curGuideGroup = BuildManager.Instance.UserBuildInfo.GuideGroup;
|
||||
if (_curGuideGroup <= 0)
|
||||
{
|
||||
_curGuideGroup = table.DataList[0].GroupID;
|
||||
|
@ -102,7 +106,6 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
|||
/// <summary>
|
||||
/// 获取描述文字
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetGuideDesc()
|
||||
{
|
||||
foreach (var group in _guideGroups)
|
||||
|
@ -118,6 +121,7 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
|||
/// </summary>
|
||||
public void StartGroupGuide()
|
||||
{
|
||||
if (!NeedGuide) return;
|
||||
if (_guideGroups.TryGetValue(_curGuideGroup, out var guideGroup))
|
||||
{
|
||||
guideGroup.StartGuide();
|
||||
|
@ -135,19 +139,19 @@ public class GuideMananger : Singlenton<GuideMananger>, IInitable
|
|||
return;
|
||||
if (guideGroup.IsCompleteGroupGuide())
|
||||
{
|
||||
_curGuideGroup = guideGroup.NextGroupGuideID;
|
||||
if (!_guideGroups.TryGetValue(_curGuideGroup, out var group))
|
||||
{
|
||||
DebugUtil.LogError("完成了所有的引导");
|
||||
}
|
||||
else
|
||||
var nextGroup = guideGroup.NextGroupGuideID;
|
||||
if (_guideGroups.TryGetValue(nextGroup, out var group))
|
||||
{
|
||||
group.StartGuide();
|
||||
DebugUtil.LogG($"开启下一组引导:{nextGroup}");
|
||||
}
|
||||
|
||||
DebugUtil.LogError($"完成了所有的引导,并保存了{_curGuideGroup}");
|
||||
BuildManager.Instance.SetBuildUserInfo(_curGuideGroup);
|
||||
_curGuideGroup = nextGroup;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
guideGroup.MoveToNextGuide();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
using System;
|
||||
using cfg.Guide;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using Framework.Event;
|
||||
using UnityEngine;
|
||||
using Framework.Event;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
public abstract class GuideStepBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导完成类型
|
||||
/// </summary>
|
||||
private GuideCompleteBase _completeBase;
|
||||
private readonly GuideCompleteBase _completeBase;
|
||||
|
||||
public readonly DataGuide GuideCfg;
|
||||
|
||||
|
@ -21,6 +21,9 @@ public abstract class GuideStepBase
|
|||
_completeBase = InitGuideStep(guideCfg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化完成类型
|
||||
/// </summary>
|
||||
private GuideCompleteBase InitGuideStep(DataGuide guideData)
|
||||
{
|
||||
if (guideData == null) return null;
|
||||
|
@ -30,6 +33,7 @@ public abstract class GuideStepBase
|
|||
StepCompleteType.OpenUI => new OpenUI(guideData, CompleteGuide),
|
||||
StepCompleteType.CloseUI => new CloseUI(guideData, CompleteGuide),
|
||||
StepCompleteType.EnterGame => new EnterGame(guideData, CompleteGuide),
|
||||
StepCompleteType.ChangeBuild => new ChangeBuild(guideData, CompleteGuide),
|
||||
_ => throw new ArgumentOutOfRangeException($"没有实现{guideData.GuideCompleteType}类型的完成方法")
|
||||
};
|
||||
}
|
||||
|
@ -39,7 +43,7 @@ public abstract class GuideStepBase
|
|||
/// </summary>
|
||||
public async void StartGuide()
|
||||
{
|
||||
//await UniTask.Delay(1000); // 延迟时间开始
|
||||
await UniTask.Delay(500); // 延迟时间开始
|
||||
DoBeforeGuide();
|
||||
SubStartGuide();
|
||||
}
|
||||
|
@ -49,12 +53,12 @@ public abstract class GuideStepBase
|
|||
/// </summary>
|
||||
private void DoBeforeGuide()
|
||||
{
|
||||
//开启该引导相关事件
|
||||
_completeBase.AddListener();
|
||||
//打开引导界面
|
||||
GuideMananger.Instance.SetActiveGuideUI(true);
|
||||
//发送遮罩镂空更改事件
|
||||
EventManager.Instance.Send(EventManager.EventName.GuideMaskStart);
|
||||
//开启该引导相关事件
|
||||
_completeBase.AddListener();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -62,7 +66,7 @@ public abstract class GuideStepBase
|
|||
/// </summary>
|
||||
public void EndGuide()
|
||||
{
|
||||
DebugUtil.LogError("结束了{0}引导", GuideCfg.ID);
|
||||
DebugUtil.LogG($"{GuideCfg.ID} 引导结束");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -70,10 +74,10 @@ public abstract class GuideStepBase
|
|||
/// </summary>
|
||||
private void CompleteGuide()
|
||||
{
|
||||
//移除事件监听
|
||||
_completeBase.RemoveListener();
|
||||
//关闭引导界面
|
||||
GuideMananger.Instance.SetActiveGuideUI(false);
|
||||
DebugUtil.LogError("完成{0}引导", GuideCfg.ID);
|
||||
//结束引导
|
||||
GuideMananger.Instance.EndGuide(this);
|
||||
}
|
||||
|
|
|
@ -111,8 +111,7 @@ namespace Framework.Manager
|
|||
/// </summary>
|
||||
public class UserBuildInfo
|
||||
{
|
||||
|
||||
public int GuideStep;
|
||||
public int GuideGroup;
|
||||
public string BuildData = GlobalConstants.DefaultBuildID;
|
||||
public Dictionary<string, string> ChooseNodeInfo;
|
||||
|
||||
|
@ -470,7 +469,7 @@ namespace Framework.Manager
|
|||
break;
|
||||
}
|
||||
|
||||
DebugUtil.LogError("得到最小的节点是{0}", nodeName);
|
||||
//DebugUtil.LogError("得到最小的节点是{0}", nodeName);
|
||||
|
||||
return nodeName;
|
||||
}
|
||||
|
@ -484,6 +483,12 @@ namespace Framework.Manager
|
|||
_reachCondition = condition;
|
||||
}
|
||||
|
||||
public void SetBuildUserInfo(int guideGroupID)
|
||||
{
|
||||
_userBuildInfo.GuideGroup = guideGroupID;
|
||||
StorageManager.Instance.SyncForce = true;
|
||||
}
|
||||
|
||||
public void Release()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -23,6 +23,10 @@ namespace cfg.Guide
|
|||
/// 进入游戏
|
||||
/// </summary>
|
||||
EnterGame = 2,
|
||||
/// <summary>
|
||||
/// 更换建造物
|
||||
/// </summary>
|
||||
ChangeBuild = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ using Gameplay.Manager;
|
|||
using Framework.Manager;
|
||||
using Framework.Constants;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Gameplay.LoadingExecutor
|
||||
|
@ -61,6 +62,14 @@ namespace Gameplay.LoadingExecutor
|
|||
buildInfo.BuildData = GlobalConstants.DefaultBuildID;
|
||||
}
|
||||
|
||||
//判断是否开启新手引导
|
||||
if (buildInfo.GuideGroup <= 0)
|
||||
{
|
||||
buildInfo.ChooseNodeInfo = new Dictionary<string, string>();
|
||||
GuideMananger.Instance.NeedGuide = true;
|
||||
DebugUtil.LogG("开启新手引导!");
|
||||
}
|
||||
|
||||
var buildId = buildInfo.BuildData;
|
||||
var buildPath = string.Format(Framework.Constants.Constants.SceneBuildPath, buildId);
|
||||
var buildConfig = string.Format(Framework.Constants.Constants.BuildConfigPath, buildId);
|
||||
|
|
|
@ -31,6 +31,7 @@ public class UISyncTipController : UIWindow
|
|||
private void CloseUI()
|
||||
{
|
||||
CloseWindow(true);
|
||||
GuideMananger.Instance.StartGroupGuide();
|
||||
if (!_needHideGfx)
|
||||
EventManager.Instance.Send(EventManager.EventName.ShowGfx);
|
||||
}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/ad_adconfig.json,A36B3A44ABABA2DDE095849E3626C9,1094,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/guide_guideconfig.json,63B89485A4872F16EBBFA12E46DB6E1,1776,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/prop_propconfig.json,7C02F583533F144939CBFF8C7E18473,880,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/stringcfg_stringconfig.json,7478C1A5F9A0908094F9D896FF2FF8,8311,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADConfig.cs,A4C9CBC6BD55B1C14634FD73C748ACA,1928,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADType.cs,F6A7395BDA6D1E7D1EF51E344CB045,603,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/DataAD.cs,7F68864C5AB693111C5C3250967FB782,3417,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/Event.cs,9BC756F4D9E749FBCEF49BF6929557,6506,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/EventFirst.cs,72E992B782D0734B64364E4777CA3B35,2964,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/DataGuide.cs,A23BB4F3F93B395441BB83D74E59B6F,4292,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideConfig.cs,B1779443C4E6B0FD80A8B0CAE418015,2003,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideStepType.cs,50DE437238924E2724E493BD449A536,520,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/StepCompleteType.cs,1631A33319C6A46DD2CC7A75A14E7A1,714,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/DataProp.cs,B1E5165AD7B7B28F863BF25E9581BF7B,4385,1721811695613
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropConfig.cs,263DA0E1E0FA37A6401A432E49E8,2040,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropType.cs,56DDB93BC3D6491F012DAE849526897,757,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/DataString.cs,1613DCE5B077AE52BB90193DD949348,2327,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/StringConfig.cs,90AC6ED26EAF4A66498B4816B635F47,2080,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Tables.cs,16F3D2F3A20B0D35793F8A5A8194E59,2303,1721811695610
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/ad_adconfig.json,A36B3A44ABABA2DDE095849E3626C9,1094,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/guide_guideconfig.json,29B264A23BA8CD2749AD2EC3B7B39D47,2024,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/prop_propconfig.json,7C02F583533F144939CBFF8C7E18473,880,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Config/Data/stringcfg_stringconfig.json,7478C1A5F9A0908094F9D896FF2FF8,8311,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADConfig.cs,A4C9CBC6BD55B1C14634FD73C748ACA,1928,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/ADType.cs,F6A7395BDA6D1E7D1EF51E344CB045,603,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/AD/DataAD.cs,7F68864C5AB693111C5C3250967FB782,3417,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/Event.cs,9BC756F4D9E749FBCEF49BF6929557,6506,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/BI/EventFirst.cs,72E992B782D0734B64364E4777CA3B35,2964,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/DataGuide.cs,A23BB4F3F93B395441BB83D74E59B6F,4292,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideConfig.cs,B1779443C4E6B0FD80A8B0CAE418015,2003,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/GuideStepType.cs,50DE437238924E2724E493BD449A536,520,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Guide/StepCompleteType.cs,2A047A7CCF76D2AE6F4AA9F89224B13,812,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/DataProp.cs,B1E5165AD7B7B28F863BF25E9581BF7B,4385,1721886650787
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropConfig.cs,263DA0E1E0FA37A6401A432E49E8,2040,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Prop/PropType.cs,56DDB93BC3D6491F012DAE849526897,757,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/DataString.cs,1613DCE5B077AE52BB90193DD949348,2327,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/StringCfg/StringConfig.cs,90AC6ED26EAF4A66498B4816B635F47,2080,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Forest/Assets/Scripts/Gameplay/DataTable/Tables.cs,16F3D2F3A20B0D35793F8A5A8194E59,2303,1721886650786
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__beans__.xlsx,FBF2DDFEE7FB39A727F2C3ACA7E228E,11821,1718685908733
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__enums__.xlsx,FDBFA610442B2325BC92A411FFE96FE8,12591,1721811568624
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__enums__.xlsx,07D177582EBF7BC5445490E245C996,12604,1721886644427
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/__tables__.xlsx,CA2D48B6B6FAC5A9F046ACE375EA6A5B,11099,1721709912370
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/AD.xlsx,D49DD4C2226B1AED21398727B2144A9,9832,1721801067448
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Guide.xlsx,F590D6AF5C7D5B745FF23DB369795E51,10239,1721811687903
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Guide.xlsx,C77CE4FBC272D9B8A7F394159464482,10287,1721886642046
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/Prop.xlsx,518794514E27F37BF9D0B6BA712533A5,10050,1718685908733
|
||||
/Users/zhangaotian/UnityProject/Forest_Client/Tool/Luban/Datas/StringConfig.xlsx,DF7478D165C035173F51B0BFD0CEA660,13423,1721709916112
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue