summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/AI/AIRuntimeCallScript.cs
blob: afa36b8e4a86e6ffc3f22475bc22c3aec1dfc1bf (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
using System;
using System.Xml;
using XUtliPoolLib;

namespace XMainClient
{
	internal class AIRuntimeCallScript : AIRunTimeNodeAction
	{
		public float mAIArgDelayTime;

		public string mAIArgScriptName;

		public AIRuntimeCallScript(XmlElement node) : base(node)
		{
			this.mAIArgDelayTime = float.Parse(node.GetAttribute("DelayTime"));
			this.mAIArgScriptName = node.GetAttribute("FuncName");
		}

		public override bool Update(XEntity entity)
		{
			XSingleton<XAIOtherActions>.singleton.CallScript(this.mAIArgScriptName, this.mAIArgDelayTime);
			return true;
		}
	}
}