Exemple #1
0
 void Pig_Unloaded(object sender, RoutedEventArgs e)
 {
     RootLayout.Children.Clear();
     this.Loaded -= Pig_Loaded;
     this.Unloaded -= Pig_Unloaded;
     Exploded = null;
     sc = null;
 }
 public BrokeThePigWeapon()
 {
     this.Tap += BrokeThePigWeapon_Tap;
     this.Loaded += BrokeThePigWeapon_Loaded;
     AI.Instance.AddWeapon(this);
     sc = new SoundController();
     AI.Instance.LevelEnded += Instance_LevelEnded;           
     
 }
Exemple #3
0
 void OnExplodeComplete(object sender, EventArgs e)
 {
     Body_broke.Visibility = Visibility.Collapsed;
     sc = new SoundController();
     sc.PlaySound("Sounds/win.wav");
     if (Exploded != null)
     {
         Exploded();
     }
 }