public UtilityAIBehaviour Launch(WhiteRabbit rabbit)
    {
        MovementController ctr = new WhiteRabbitController(rabbit);

        this.AddController(ctr);

        return(this);
    }
Beispiel #2
0
        static void Main(string[] args)
        {
            WhiteRabbit[] rabbitsArray = new WhiteRabbit[]
            {
                new WhiteRabbit()
                {
                    Name = "Roger", Time = DateTime.Now
                },
                new WhiteRabbit()
                {
                    Name = "Buggs", Time = DateTime.Now.AddMinutes(+2)
                },
                new WhiteRabbit()
                {
                    Name = "Buggs", Time = DateTime.Now.AddMinutes(-2)
                }
            };

            List <WhiteRabbit> rabbits = new List <WhiteRabbit>();

            rabbits.Add(new WhiteRabbit()
            {
                Name = "James", Time = DateTime.Now.AddMinutes(-2)
            });
            rabbits.AddRange(rabbitsArray);

            rabbits.Sort(new RabbitComparer());

            foreach (WhiteRabbit rabbit in rabbits)
            {
                Console.WriteLine(rabbit);
            }

            Array.Sort(rabbitsArray, new RabbitComparer());
            foreach (var rab in rabbitsArray)
            {
                Console.WriteLine(rab);
            }
        }
 public WhiteRabbitController(WhiteRabbit r) : base(r)
 {
 }