Setting behaviour dynamically

This commit is contained in:
2025-10-30 15:24:03 +01:00
parent 695fb26ce4
commit e5a041da0d
3 changed files with 22 additions and 3 deletions

View File

@@ -14,4 +14,10 @@ public class FlyNoWay: IFlyBehaviour {
public void Fly() {
Console.WriteLine("I can't fly");
}
}
public class FlyRocketPowered: IFlyBehaviour {
public void Fly() {
Console.WriteLine("I'm flying with a rocket!");
}
}