public Vector(string iedType, string lnType) { this.name = "Vector"; this.bTypeEnum = tBasicTypeEnum.Struct; this.id = this.type = lnType + "Vector"; this.iedType = iedType; this.magField = new mag(iedType, this.id); this.angField = new ang(iedType, this.id); }
static void Main(string[] args) { int N, M; mag php = new mag(); Console.WriteLine("Input Size of eng"); N = Convert.ToInt32(Console.ReadLine()); php.SizeE(N); for (int i = 0; i < N; i++) { string nname; string ppower; string dis; string eff; nname = Console.ReadLine(); ppower = Console.ReadLine(); dis = Console.ReadLine(); eff = Console.ReadLine(); php.AddEng(nname, ppower, dis, eff, i); Console.WriteLine(); } Console.WriteLine("Input Size of car"); M = Convert.ToInt32(Console.ReadLine()); php.SizeC (M); for (int i = 0; i < M; i++) { string ccarName; string eengName; string wweight; string ccolor; ccarName = Console.ReadLine(); eengName = Console.ReadLine(); wweight = Console.ReadLine(); ccolor = Console.ReadLine(); Console.WriteLine(); php.AddCar(ccarName, eengName, wweight, ccolor, i); } Console.WriteLine(); php.PrintArr(); Console.ReadLine(); }
static void Main(string[] args) { mag Xardas = new mag(Bohater.Rasa.Człowiek); rzezimieszek Diego = new rzezimieszek(Bohater.Rasa.Niziolek); wojownik Gorn = new wojownik(Bohater.Rasa.Krasnolud); uruk Random = new uruk(Bohater.Rasa.Ork); Xardas.bijWroga(); Xardas.atakmaga(); Xardas.sprawdzHp(); Diego.bijWroga(); Diego.sprawdzHp(); Gorn.bijWroga(); Gorn.atakwoja(); Gorn.sprawdzHp(); Random.bijWroga(); Random.sprawdzHp(); }