public Rider(Swordbeard swordbeard) { Attack = swordbeard.Attack - 10; Speed = 40 + swordbeard.Speed; Hp = 200 + swordbeard.Hp; Defence = 100 + swordbeard.Defence; }
static void Main(string[] args) { Human h = new Human(); HumanWarrior hw = new HumanWarrior(h); Swordbeard sb = new Swordbeard(hw); HumanWarrior hw2 = new HumanWarrior(h); Swordbeard sb2 = new Swordbeard(hw2); h.Operation(); }