private async void Form1_Load(object sender, EventArgs e) { Players = await GameFacade.GetAllPlayersFromDatabase(); Connect(); Players = await GameFacade.GetAllPlayersFromDatabase(); timer1.Tick += timer1_Tick; timer1.Start(); timer1.Interval = 100; // Composite ---------------------------------------------- var salmas = new Helmet(); var sautuvas = new Pistol(); bazuka.Inventory.Add(sautuvas); bazuka.Inventory.Add(salmas); bazuka.Inventory.Add(bazuka); int i = 0; foreach (var t in bazuka.Inventory) { textBox1.AppendText(t.SayHello() + Environment.NewLine); wpns[i++] = t.SayHello(); } // --------------------------------------------------------- }