public Scene()
 {
     dialogs = new DialogSystem();
     sceneResources = new ResourceManager();
     jukebox = new Jukebox(sceneResources);
     entityTable = new Dictionary<string, Entity>();
     AddEntity(player = new EntityPlayer());
 }
 public Jukebox(ResourceManager resmgr)
 {
     res_manager = resmgr;
     soundEngine = new ISoundEngine();
     listenerViewDir = new Vector3D(0, 0, 1);
     listenerPosition = new Vector3D();
     soundEngine.SetListenerPosition(
         listenerPosition, listenerViewDir);
     sounds = new Dictionary<string, ISoundSource>();
 }
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (jukebox != null)
         {
             if (!jukebox.IsDisposed)
                 jukebox.Dispose();
             jukebox = null;
         }
         if (dialogs != null)
         {
             if (!dialogs.IsDisposed)
                 dialogs.Dispose();
             dialogs = null;
         }
         if (sceneResources != null)
         {
             if (!sceneResources.IsDisposed)
                 sceneResources.Dispose();
             sceneResources = null;
         }
         if (entityTable != null)
         {
             entityTable.Clear();
             entityTable = null;
         }
     }
     base.Dispose(disposing);
 }