summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/AI/AIRuntimeActionNavigation.cs
blob: be44c0bff0e914fdbc1315078dba3ad1b541bd34 (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 AIRuntimeActionNavigation : AIRunTimeNodeAction
	{
		public string _move_dir_name;

		private int _old_move_dir = 1;

		public AIRuntimeActionNavigation(XmlElement node) : base(node)
		{
			this._move_dir_name = node.GetAttribute("Shared_MoveDirName");
		}

		public override bool Update(XEntity entity)
		{
			int old_move_dir = this._old_move_dir;
			this._old_move_dir = entity.AI.AIData.GetIntByName(this._move_dir_name, 1);
			return XSingleton<XAIMove>.singleton.UpdateNavigation(entity, this._old_move_dir, old_move_dir);
		}
	}
}