Ejemplo n.º 1
0
            public void Setup(GraphInstance graph, Node parent, Actor target)
            {
                this.target = target;
                AiRandNode stats = (AiRandNode)parent;

                random.OnRequested += RandomRequested;

                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("AiRandNode: Setup Behaviour on " + this.target);
            }
Ejemplo n.º 2
0
            public void Setup(GraphInstance graph, Node parent, Actor target)
            {
                this.target = target;
                RollNode stats = (RollNode)parent;

                int newValue = new Random().Next(stats.MinValue, stats.MaxValue);

                Console.ForegroundColor = ConsoleColor.DarkGreen;
                Console.WriteLine("RollNode: Setup Behaviour on " + this.target + " with a value of " + newValue);

                output.Value = newValue;
            }
Ejemplo n.º 3
0
            public void Setup(GraphInstance graph, Node parent, Actor target)
            {
                this.target = target;
                AiOrNode stats = (AiOrNode)parent;

                graph.Connect(ref stats.RequirementA, out requirementA);
                graph.Connect(ref stats.RequirementB, out requirementB);

                Console.ForegroundColor = ConsoleColor.Gray;
                //Console.WriteLine("AiOrNode: Fetching A " + requirementA.Weight);
                //Console.WriteLine("AiOrNode: Fetching B " + requirementB.Weight);
            }
Ejemplo n.º 4
0
            public void Setup(GraphInstance graph, Node parent, Actor target)
            {
                this.target = target;
                StatsNode stats = (StatsNode)parent;

                seed = Guid.NewGuid().ToString();

                valueA.OnAfterChanged        += Log;
                valueB.OnAfterChanged        += Log;
                target.Health.OnAfterChanged += HealthChanged;

                Console.ForegroundColor = ConsoleColor.Green;
                Console.WriteLine("StatsNode: Setup Behaviour on " + this.target);
            }
Ejemplo n.º 5
0
 public override SocketMap[] Connect(GraphInstance graph, Metadata instance) => new[]
 {
     graph.Connect(ref Output, out instance.output),
 };
Ejemplo n.º 6
0
 public override SocketMap[] Connect(GraphInstance graph, Metadata instance) => new[]
 {
     graph.Connect(ref ValueA, out instance.valueA),
     graph.Connect(ref ValueB, out instance.valueB)
 };
Ejemplo n.º 7
0
 public override SocketMap[] Connect(GraphInstance graph, Metadata instance) => new[]
 {
     graph.Connect(ref Rand, out instance.random)
 };
Ejemplo n.º 8
0
 public override SocketMap[] Connect(GraphInstance graph, Metadata instance) => new[]
 {
     graph.Connect(ref RequirementA, out instance.requirementA),
     graph.Connect(ref RequirementB, out instance.requirementB)
 };