protected override Composite CreateBehavior()
{
return new PrioritySelector
(
new Decorator(ret => FunkyGame.GameIsInvalid,
new Action(ret => m_IsDone = true)),
//Setup our Vector and SNO
new Decorator(ret => !Initalized,
new Action(ret => Init())),
new Decorator(ret => !UpdateObject() || MovementVector == Vector3.Zero || ZetaDia.Me.Position.Distance(MovementVector) <= PathPrecision,
new Action(ret => m_IsDone = true)),
new Decorator(ret => lastMoveResult== MoveResult.ReachedDestination || lastMoveResult == MoveResult.Failed,
new Action(ret => m_IsDone=true)),
//Movement
new Decorator(ret => ZetaDia.Me.Position.Distance(MovementVector) > PathPrecision,
new Action(ret => Movement(MovementVector)))
);
}