Example #1
0
 void ChangeSystem()
 {
     if (sysIndex != sysIndexLoaded)
     {
         camera.UpdateProjection();
         camera.Free = false;
         camera.Zoom = 5000;
         Resources.ClearTextures();
         if (universeBackgroundTex != null)
         {
             ImGuiHelper.DeregisterTexture(universeBackgroundTex);
         }
         universeBackgroundTex = (Resources.FindTexture("fancymap.tga") as Texture2D);
         if (universeBackgroundTex != null)
         {
             universeBackgroundRegistered = ImGuiHelper.RegisterTexture(universeBackgroundTex);
         }
         else
         {
             universeBackgroundRegistered = -1;
         }
         curSystem      = GameData.GetSystem(systems[sysIndex]);
         systemInfocard = GameData.GetInfocard(curSystem.Infocard, fontMan);
         if (icard != null)
         {
             icard.SetInfocard(systemInfocard);
         }
         GameData.LoadAllSystem(curSystem);
         world.LoadSystem(curSystem, Resources);
         systemMap.SetObjects(curSystem);
         sysIndexLoaded = sysIndex;
     }
 }