상속: GeneralScript
예제 #1
0
파일: NpcSession.cs 프로젝트: tkiapril/aura
		/// <summary>
		/// Cancels script and resets session.
		/// </summary>
		public void Clear()
		{
			if (this.Script != null)
				this.Script.Cancel();
			this.Script = null;
			this.Target = null;
		}
예제 #2
0
파일: NpcSession.cs 프로젝트: tkiapril/aura
		/// <summary>
		/// Starts session
		/// </summary>
		/// <param name="target"></param>
		/// <param name="creature"></param>
		private bool Start(NPC target, Creature creature)
		{
			this.Target = target;

			if (target.ScriptType == null)
				return false;

			var script = Activator.CreateInstance(target.ScriptType) as NpcScript;
			script.NPC = target;
			script.Player = creature;
			this.Script = script;
			return true;
		}