Created
April 1, 2018 02:22
-
-
Save u8989332/c35c05d4fb64120eea05af3d8a73f27a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Rockman | |
{ | |
private AbstractWeapon weapon; | |
public void setWeapon(AbstractWeapon weapon) | |
{ | |
this.weapon = weapon; | |
} | |
public void killEnemy() | |
{ | |
Console.WriteLine("洛克人準備射擊!"); | |
weapon.shoot(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment