public static void Main() { Lion herman = new Lion(); Giraffe zelda = new Giraffe(); Animal[] two = {herman, zelda}; Feed(two); herman.Attack(); }
void Start() { Lion butcher = new Lion(); butcher.Power = 5; Gazelle nextMeal = new Gazelle(); butcher.Attack(nextMeal); }
public MainWindow() { InitializeComponent(); Lion l1 = new Lion(); Lion l2 = new Lion(); Console.WriteLine(l1.Hp); Console.WriteLine(l2.Hp); l1.Attack(l2); Console.WriteLine(l1.Hp); Console.WriteLine(l2.Hp); Szirszar.Content = l1.Hp; }