示例#1
0
        public override void Run(IGUI guiHandler)
        {
            Mum   leila   = new Mum("Leila");
            Dad   hanSolo = new Dad("Han Solo");
            Robot r2d2    = new Robot("R2D2");
            Baby  benSolo = leila.MakeBaby(hanSolo, "Ben Solo");

            //benSolo.AddComforter(r2d2.Comfort);

            benSolo.StartCrying();
            benSolo.StartCrying();
            benSolo.StartCrying();
            benSolo.StartCrying();
            benSolo.StartCrying();

            benSolo.AddComforter(TheForce.ComfortChild);
            benSolo.StartCrying();


            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            Robot r2d2 = new Robot("R2D2");

            Mum leila   = new Mum("Leila");
            Dad hanSolo = new Dad("Han Solo");

            leila.MakeBaby(hanSolo, "Kylo Ren");

            leila.Child.AddComforter(r2d2.Comfort);

            leila.Child.AddComforter(TheForce.ComfortChild);

            leila.Child.StartCrying();
            leila.Child.StartCrying();
            leila.Child.StartCrying();
            leila.Child.StartCrying();
            leila.Child.StartCrying();

            Console.Read();
        }