Beispiel #1
0
        public override void OnEnter()
        {
            var mo = nodes.Value as FsmNodes;

            if (mo == null || (mo.Value == null) || !node.UseVariable)
            {
                Debug.Log("No Input");
                Finish();
                return;
            }

            if ((mo.Value as List <Node>).Count <= index.Value)
            {
                Debug.Log("index is higher than the number of nodes in the nodes list/variable");
                Finish();
                return;
            }

            node.Value = FsmConverter.SetNode((nodes.Value as FsmNodes).Value[index.Value]);
            Finish();
        }
 public void mohogony()
 {
     node.Value = FsmConverter.SetNode(AstarPath.active.GetNearest(Position.Value).node as Node);
     return;
 }