コード例 #1
0
	// Use this for initialization
	void Start () {
		var builder = new bt.TreeBuilder ();

		builder
			.AddSequence ()
			.Begin ()
		//	.AddNode(null)
				.AddSequence ()
				.Begin ()
					//.AddAction(new AlwaysFails())
					.AddSequence()
					//.AddAction(new UseScript())
					.AddSequence()
				.End()
				.AddSequence ()
				//.AddAction (null)
			//	.AddDecorator (null)
			//	.AddSelector (null)
				//	.Begin ()
				//		.AddAction (null)
				//		.AddAction (null)
				//	.End ()
			.End ();
		localPlan = builder.Build();	
		//Debug.Log("Start");
	}
コード例 #2
0
    // Use this for initialization
    void Start()
    {
        var builder = new bt.TreeBuilder();

        builder
        .AddSequence()
        .Begin()
        //	.AddNode(null)
        .AddSequence()
        .Begin()
        //.AddAction(new AlwaysFails())
        .AddSequence()
        //.AddAction(new UseScript())
        .AddSequence()
        .End()
        .AddSequence()
        //.AddAction (null)
        //	.AddDecorator (null)
        //	.AddSelector (null)
        //	.Begin ()
        //		.AddAction (null)
        //		.AddAction (null)
        //	.End ()
        .End();
        localPlan = builder.Build();
        //Debug.Log("Start");
    }
コード例 #3
0
        public static void Main(string[] args)
        {
            var builder = new bt.TreeBuilder();

            builder
            .Sequence()
            .Begin()
            //	.AddNode(null)
            .Sequence()
            .Begin()
            //.AddAction(new AlwaysFails())
            .Sequence()
            //.AddAction(new UseScript())
            .Sequence()
            .End()
            .Sequence()
            //.AddAction (null)
            //	.AddDecorator (null)
            //	.AddSelector (null)
            //	.Begin ()
            //		.AddAction (null)
            //		.AddAction (null)
            //	.End ()
            .End();
            var localPlan = builder.Build();

            var builder2 = new bt.TreeBuilder();

            builder2
            .Sequence()
            .Begin()
            .AddTree(localPlan)
            .Parallel()
            .End();

            Console.WriteLine("SECOND PLAN");
            var secondPlan = builder2.Build();


            var walk = new bt.NodeWalker();

            walk.Initialise(secondPlan.Root);
            //	Debug.Log("Root");
            walk.ComputeAllSteps();
        }
コード例 #4
0
ファイル: Main.cs プロジェクト: tgsstdio/BirdNest.Nodes
		public static void Main (string[] args)
		{
			var builder = new bt.TreeBuilder ();
	
			builder
				.Sequence ()
				.Begin ()
			//	.AddNode(null)
					.Sequence ()
					.Begin ()
						//.AddAction(new AlwaysFails())
						.Sequence()
						//.AddAction(new UseScript())
						.Sequence()
					.End()
					.Sequence ()
					//.AddAction (null)
				//	.AddDecorator (null)
				//	.AddSelector (null)
					//	.Begin ()
					//		.AddAction (null)
					//		.AddAction (null)
					//	.End ()
				.End ();
			var localPlan = builder.Build();	
			
			var builder2 = new bt.TreeBuilder();
			
			builder2
				.Sequence()
				.Begin()
					.AddTree(localPlan)
					.Parallel()
				.End();
			
			Console.WriteLine("SECOND PLAN");
			var secondPlan = builder2.Build();
			
			
			var walk = new bt.NodeWalker ();
			walk.Initialise(secondPlan.Root);
		//	Debug.Log("Root");
			walk.ComputeAllSteps ();			
		}