From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/XNpcAttributes.cs | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XNpcAttributes.cs (limited to 'Client/Assets/Scripts/XMainClient/XNpcAttributes.cs') diff --git a/Client/Assets/Scripts/XMainClient/XNpcAttributes.cs b/Client/Assets/Scripts/XMainClient/XNpcAttributes.cs new file mode 100644 index 00000000..ee699ea2 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XNpcAttributes.cs @@ -0,0 +1,111 @@ +using System; +using UnityEngine; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XNpcAttributes : XAttributes + { + public override uint ID + { + get + { + return XNpcAttributes.uuID; + } + } + + public string Icon + { + get + { + return this._icon; + } + } + + public string Portrait + { + get + { + return this._portrait; + } + } + + public uint SceneId + { + get + { + return this._scene_id; + } + } + + public Vector3 Position + { + get + { + return this._position; + } + } + + public Vector3 Rotation + { + get + { + return this._rotation; + } + } + + public string[] Content + { + get + { + return this._content; + } + } + + public string[] Voice + { + get + { + return this._voice; + } + } + + public int[] FunctionList + { + get + { + return this._functionList; + } + } + + public new static readonly uint uuID = XSingleton.singleton.XHash("Npc_Attributes"); + + private string _icon = null; + + private string _portrait = null; + + private uint _scene_id = 0u; + + private Vector3 _position = Vector3.zero; + + private Vector3 _rotation = Vector3.zero; + + private string[] _content = null; + + private string[] _voice = null; + + private int[] _functionList = null; + + public void InitAttribute(XNpcInfo.RowData data) + { + this._icon = data.Icon; + this._portrait = data.Portrait; + this._scene_id = data.SceneID; + this._position.Set(data.Position[0], data.Position[1], data.Position[2]); + this._rotation.Set(data.Rotation[0], data.Rotation[1], data.Rotation[2]); + this._content = data.Content; + this._voice = data.Voice; + this._functionList = data.FunctionList; + } + } +} -- cgit v1.1-26-g67d0