示例#1
0
 public Duck(ISoundBehaviour soundBehaviour)
 {
     SoundBehaviour = soundBehaviour;
 }
 public QuackSoundDecorator(ISoundBehaviour soundBehaviour) : base(soundBehaviour)
 {
 }
示例#3
0
 protected SoundBehaviourDecorator(ISoundBehaviour soundBehaviour)
 {
     _soundBehaviour = soundBehaviour;
 }
示例#4
0
 protected Duck(IFlyBehaviour flyBehaviour, ISoundBehaviour soundBehaviour)
 {
     FlyBehaviour   = flyBehaviour;
     SoundBehaviour = soundBehaviour;
 }
示例#5
0
 public SqueakSoundDecorator(ISoundBehaviour soundBehaviour) : base(soundBehaviour)
 {
 }
示例#6
0
 public void setSoundBehaviour(ISoundBehaviour newsound)
 {
     this.sound = newsound;
 }