43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using Code.Scripts.Gameplay.Game;
|
|
using Framework;
|
|
using Gameplay.Net;
|
|
using PhxhSDK;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Gameplay.Naming
|
|
{
|
|
/// <summary>
|
|
/// 取名管理器
|
|
/// </summary>
|
|
public sealed class NamingManager : Singlenton<NamingManager>
|
|
{
|
|
/// <summary>
|
|
/// 是否改过名
|
|
/// </summary>
|
|
public bool IsChangeName
|
|
{
|
|
get
|
|
{
|
|
uint time = Actor.Instance.Base.GetProp(NLDPB.ActorProp.SetNickTime);
|
|
return 0 != time;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 从剧情打开改名UI
|
|
/// </summary>
|
|
public async void OpenNamePanelFromStory()
|
|
{
|
|
if (GameStateManager.Instance.GetCurState() is GameStateStory gameStateStory)
|
|
gameStateStory.IsReady = false;
|
|
|
|
await UI_WriteNameController.Open(() =>
|
|
{
|
|
if (GameStateManager.Instance.GetCurState() is GameStateStory gameStateStory)
|
|
gameStateStory.IsReady = true;
|
|
});
|
|
}
|
|
}
|
|
} |