Esempio n. 1
0
	void Instruct(string tag, object tree)
	{
		var groupMembers = GameObject.FindGameObjectsWithTag(tag);
		foreach(var member in groupMembers)
		{
			
		}
		var walk = new bt.NodeWalker ();
		walk.Initialise(localPlan.Root);
	//	Debug.Log("Root");
		walk.ComputeAllSteps ();

		//Debug.Log("Stopped : " + walk.Outcome.ToString());		
	//	Debug.Log("Instruct : " + tag);
	}
Esempio n. 2
0
    void Instruct(string tag, object tree)
    {
        var groupMembers = GameObject.FindGameObjectsWithTag(tag);

        foreach (var member in groupMembers)
        {
        }
        var walk = new bt.NodeWalker();

        walk.Initialise(localPlan.Root);
        //	Debug.Log("Root");
        walk.ComputeAllSteps();

        //Debug.Log("Stopped : " + walk.Outcome.ToString());
        //	Debug.Log("Instruct : " + tag);
    }
Esempio n. 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();
        }
Esempio n. 4
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 ();			
		}