Setting behaviour dynamically
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user