summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XNpcAttributes.cs
blob: ee699ea21ccafd3a73adaba371825cf4e2a8e583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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<XCommon>.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;
		}
	}
}