Ejemplo n.º 1
0
 public SoundCaller(SoundEffect eff)
 {
     this.publisher  = new SoundPublisher(eff);
     this.subscriber = new SoundSubscriber();
     this.subscriber.Subscribe(this.publisher);
     this.publisher.Execute();
 }
Ejemplo n.º 2
0
 public void Subscribe(SoundPublisher publisher)
 {
     publisher.Tick += new SoundPublisher.EventHandler(this.TakeAction);
 }
Ejemplo n.º 3
0
 private void TakeAction(SoundPublisher publisher, EventArgs e)
 {
     publisher.SoundEffect.Play();
 }