Exemple #1
0
 public SoundCaller(SoundEffect eff)
     : base()
 {
     publisher = new SoundPublisher(eff);
     subscriber = new SoundSubscriber();
     subscriber.Subscribe(publisher);
     publisher.Execute();
 }
 private void TakeAction(SoundPublisher publisher, EventArgs e)
 {
     publisher.SoundEffect.Play();
 }
 public void Subscribe(SoundPublisher publisher)
 {
     publisher.Tick += new SoundPublisher.EventHandler(TakeAction);
 }