改名引导修改

main
yurui 2024-07-05 16:57:23 +08:00
parent d7441de077
commit fda1fbad34
4 changed files with 14 additions and 12 deletions

View File

@ -104,7 +104,7 @@ public partial class UIManager
_WindowMeta(UINameConst.UI_GuideTip, UIWindowLayer.Guide);
_WindowMeta(UINameConst.UI_ChoosePerson, UIWindowLayer.Normal, UIOpenType.FullScreen);
_WindowMeta(UINameConst.UI_WriteName, UIWindowLayer.Normal, UIOpenType.FullScreen);
_WindowMeta(UINameConst.UI_NameConfirmWindow, UIWindowLayer.Normal);
_WindowMeta(UINameConst.UI_NameConfirmWindow, UIWindowLayer.Normal, UIOpenType.FullScreen);
}

View File

@ -40,10 +40,6 @@ namespace Gameplay.Guide
/// </summary>
public bool IsChangeName = true;
/// <summary>
/// 是否跳过剧情
/// </summary>
public bool IsSkipStory = false;
/// <summary>
/// 指定地板索引
/// </summary>
public int FloorIndex = -1;

View File

@ -305,7 +305,8 @@ public class UIStoryMainController : UIWindow
{
if (GuideManager.Instance.IsGuiding && !GuideManager.Instance.IsChangeName)
{
GuideManager.Instance.IsSkipStory = true;
StoryManager.instance.timelineManager.ForceToTime(30.24233f);
EventManager.Instance.Send(EventManager.EventName.STORY_OPEN_NAME_PANEL);
}
else

View File

@ -78,17 +78,22 @@ public class UI_WriteNameController : UIWindow
/// <param name="name"></param>
private void SetName(string name)
{
NetHelper.SetPlayerName(name);
OnClose();
try
{
NetHelper.SetPlayerName(name);
}
catch (Exception e)
{
DebugUtil.LogError(e);
}
if (GuideManager.Instance.IsGuiding)
{
if(GuideManager.Instance.IsSkipStory)
EventManager.Instance.Send(EventManager.EventName.STORY_CLICK_SKIP);
else if (GameStateManager.Instance.GetCurState() is GameStateStory gameStateStory)
if (GameStateManager.Instance.GetCurState() is GameStateStory gameStateStory)
gameStateStory.IsReady = true;
}
OnClose();
}
#region 回调方法