ModernUO/Projects/UOContent/Mobiles/BT/MageBehaviorTree.cs
2021-09-10 20:58:02 -04:00

35 lines
969 B
C#

using System;
namespace Server.Mobiles.BT
{
public sealed class MageBehaviorTree : BehaviorTree
{
private static MageBehaviorTree instance;
private MageBehaviorTree()
{
}
public static MageBehaviorTree Instance
{
get
{
if (instance == null)
{
instance = new MageBehaviorTree();
instance.InitTree();
}
return instance;
}
}
private void InitTree()
{
TryAddRoot(
// do the first thing that succeeds of the three children
new SelectorNode(this)
.AddChild(new TapNode(this, (mob, board) => mob.DebugSay("Thinking...")))
.AddChild(new BehaviorMageCombatNodeSet(this))
.AddChild(new BehaviorMagePassiveNodeSet(this))
);
}
}
}