Beispiel #1
0
 void Events_Quit(object sender, QuitEventArgs e)
 {
     MeleeMusic.Close();
     MeleeSound.Close();
     Events.QuitApplication();
     Application.Exit();
 }
Beispiel #2
0
        private void Tick(object sender, TickEventArgs e)
        {
#if Release
            try
            {
#endif
            if (first)
            {
                new Thread(StartThread).Start();
                physicsTimer.Enabled = false;
                first = false;
                demo.AddObjects();
                lastTime = DateTime.Now;
            }
            else
            {
                physicsTimer.EndUpdate();
            }
            MeleeSound.PlaySounds();

            DrawGLScene();

            physicsTimer.BeginUpdate();

            Video.GLSwapBuffers();

#if Release
        }

        catch (Exception ex)
        {
            ErrorBox.DisplayError(ex);
        }
#endif
        }
 public ActionSounds(MeleeSound Activated, MeleeSound Running, MeleeSound DeActivated)
 {
     this.Activated   = Activated;
     this.Running     = Running;
     this.DeActivated = DeActivated;
     if (Activated == null)
     {
         this.Activated = new MeleeSound();
     }
     if (Running == null)
     {
         this.Running = new MeleeSound();
     }
     if (DeActivated == null)
     {
         this.DeActivated = new MeleeSound();
     }
 }
 public void Play(float dt)
 {
     if (Name != null)
     {
         if (playDelay == null)
         {
             MeleeSound.QueueSound(Name);
         }
         else
         {
             playDelay.Value += dt;
             if (playDelay.IsFull)
             {
                 playDelay.Empty();
                 MeleeSound.QueueSound(Name);
             }
         }
     }
 }
 public ControlableSounds(string CreatedName, string DeathName)
 {
     this.Created = new MeleeSound(CreatedName);
     this.Death   = new MeleeSound(DeathName);
 }
 public ControlableSounds()
 {
     this.Created = new MeleeSound();
     this.Death   = new MeleeSound();
 }
 public ActionSounds(string ActivatedName, string RunningName, string DeActivatedName)
 {
     this.Activated   = new MeleeSound(ActivatedName);
     this.Running     = new MeleeSound(RunningName);
     this.DeActivated = new MeleeSound(DeActivatedName);
 }
 public ActionSounds()
 {
     this.Activated   = new MeleeSound();
     this.Running     = new MeleeSound();
     this.DeActivated = new MeleeSound();
 }
 public DamageSound(float minDamage, float maxDamage, string sound)
 {
     this.minDamage = minDamage;
     this.maxDamage = maxDamage;
     this.sound     = new MeleeSound(sound);
 }
 public EffectSounds(string AttachedName, string AppliedName, string ExhaustedName)
 {
     this.Attached  = new MeleeSound(AttachedName);
     this.Applied   = new MeleeSound(AppliedName);
     this.Exhausted = new MeleeSound(ExhaustedName);
 }
 public EffectSounds()
 {
     this.Attached  = new MeleeSound();
     this.Applied   = new MeleeSound();
     this.Exhausted = new MeleeSound();
 }
 public WeaponSounds(string CollisionName)
 {
     this.Collision = new MeleeSound(CollisionName);
 }
 public WeaponSounds()
 {
     this.Collision = new MeleeSound();
 }