示例#1
0
        static void Main(string[] args)
        {
            Postac[] p = new Postac[3];
            p[0] = new Mag();
            p[1] = new Warrior();


            Postac.wypiszEmlementy(p);

            TeamOfHeroes tof     = new TeamOfHeroes("czytelncy", p[0]);
            Warrior      warrior = new Warrior("Kot", 12, 36);

            Console.WriteLine(warrior);
            List <Postac> t = new List <Postac>();

            t.Add(new Warrior());
            t.Add(new Mag());

            foreach (var item in t)
            {
                Console.WriteLine(item);
            }
            TeamOfHeroes th = new TeamOfHeroes("opeki", new Postac("Janusz", 1), new Postac("Karol", .23));

            th.OpiszDruzynke();
            Console.ReadKey();
        }
示例#2
0
        public TeamOfHeroes(string name, params Postac[] p)
        {
            Postac postac = new Postac();

            this.Name = name;
        }