Ejemplo n.º 1
0
 public Scene()
 {
     dialogs = new DialogSystem();
     sceneResources = new ResourceManager();
     jukebox = new Jukebox(sceneResources);
     entityTable = new Dictionary<string, Entity>();
     AddEntity(player = new EntityPlayer());
 }
Ejemplo n.º 2
0
 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);
 }