using Code.Scripts.Gameplay.Game; using Cysharp.Threading.Tasks; using Gameplay; using Gameplay.Net; using Gameplay.Story; using Gameplay.Utils; using PhxhSDK; using UnityEngine; using UnityEngine.UI; using Object = UnityEngine.Object; /// /// 选人UI /// public class UI_ChoosePersonController : UIWindow { /// /// 打开选人界面 /// /// public static async UniTask Open() { await CommonUtils.CaptureScreenshot(); // 截取当前屏幕截图 return await UIManager.Instance.CreateAndOpenWindow(UINameConst.UI_ChoosePerson); } #region UI /// /// 高斯模糊遮罩 /// private RawImage rawImageGaussianBlurMask; /// /// 形象1按钮 /// private Button buttonModel1; /// /// 形象2按钮 /// private Button buttonModel2; /// /// 确定按钮 /// private Button buttonConfirm; /// /// 选中状态1 /// private GameObject goSelect1; /// /// 选中状态2 /// private GameObject goSelect2; #endregion /// /// 形象模型名1 /// private const string MODEL_NAME_1 = "N00004"; /// /// 形象模型名2 /// private const string MODEL_NAME_2 = "N00005"; /// /// 模型缩放 /// private readonly Vector3 MODEL_SCALE = new(260f, 260f, 260f); /// /// 模型位置 /// private readonly Vector3 MODEL_POS = new(0f, -185f, -200f); /// /// 模型旋转 /// private readonly Quaternion MODEL_ROT = Quaternion.Euler(0f, 180f, 0f); /// /// 选择的模型id /// private int selectModelId; public override async void PreLoad(object data = null) { await AssetManager.Instance.PostPreload(PathEx.GetNpcDisplayModelPath(MODEL_NAME_1)); await AssetManager.Instance.PostPreload(PathEx.GetNpcDisplayModelPath(MODEL_NAME_2)); } public override void OnInit() { rawImageGaussianBlurMask = GetComponent("GaussianBlurMask"); buttonModel1 = GetComponent