Example #1
0
        public override void OnEnter()
        {
            var mo = InputPath.Value as FsmPath;

            if ((mo == null) || (mo.Value == null) || !OutputPath.UseVariable)
            {
                Debug.Log("Input Incomplete");
                Finish();
                return;
            }             // also abort the action if there is no variable to save to.

            var a = (InputPath.Value as FsmPath).Value as ABPath;
            var b = PathPool <ABPath> .GetPath();           // I can't instantiate so there's nothing but the manual way left

            b.duration         = a.duration;
            b.heuristicScale   = a.heuristicScale;
            b.enabledTags      = a.enabledTags;
            b.radius           = a.radius;
            b.searchedNodes    = a.searchedNodes;
            b.searchIterations = a.searchIterations;
            b.speed            = a.speed;
            b.turnRadius       = a.turnRadius;
            b.recycled         = a.recycled;
            b.nnConstraint     = a.nnConstraint;
            b.path             = a.path;
            b.vectorPath       = a.vectorPath;

            OutputPath.Value = FsmConverter.SetPath(b);
            Finish();
        }