public void Awake() { Debug.Log("TSTGalaxies Galaxies Awake"); if (Instance != null) { Destroy(this); } else { Instance = this; } DontDestroyOnLoad(this); Debug.Log("TSTGalaxies Starting Galaxies"); baseTransform = new GameObject(); baseTransform.transform.localPosition = Vector3.zero; baseTransform.transform.localRotation = Quaternion.identity; if (ScaledSun.Instance != null) { baseTransform.transform.parent = ScaledSun.Instance.transform; Debug.Log("TSTGalaxies BaseTransform set to the ScaledSun.Instance"); } else { baseTransform.SetActive(false); Debug.Log("TSTGalaxies BaseTransform setactive = false, ScaledSun does not exist"); } if (Utilities.IsKopInstalled) { baseTransform.transform.parent = FlightGlobals.Bodies[1].transform; Debug.Log("TSTGalaxies - Detected Kopernicus - BaseTransform set to Home Planet"); } UrlDir.UrlConfig[] galaxyCfgs = GameDatabase.Instance.GetConfigs("GALAXY"); foreach (UrlDir.UrlConfig cfg in galaxyCfgs) { GameObject go = new GameObject(name, typeof(MeshFilter), typeof(MeshRenderer), typeof(TSTGalaxy)); go.transform.parent = baseTransform.transform; TSTGalaxy galaxy = go.GetComponent <TSTGalaxy>(); galaxy.Load(cfg.config); Debug.Log("TSTGalaxies Adding Galaxy " + galaxy.name); Galaxies.Add(galaxy); GameObject goCB = new GameObject(name, typeof(CelestialBody)); goCB.transform.parent = go.transform; CelestialBody celestialBody = goCB.GetComponent <CelestialBody>(); celestialBody.bodyName = galaxy.name; celestialBody.bodyDisplayName = galaxy.displayName; celestialBody.transform.position = galaxy.position; celestialBody.atmosphere = false; celestialBody.ocean = false; celestialBody.timeWarpAltitudeLimits = new float[0]; celestialBody.Radius = 500; celestialBody.orbitDriver = null; celestialBody.progressTree = null; CBGalaxies.Add(celestialBody); } }
public Galaxies Get(Int64 ixGalaxy) { Galaxies galaxies = _context.Galaxies.AsNoTracking().Where(x => x.ixGalaxy == ixGalaxy).First(); galaxies.Universes = _context.Universes.Find(galaxies.ixUniverse); return(galaxies); }
public static void ShowGalaxies() { var theGalaxies = new Galaxies(); foreach (Galaxy theGalaxy in theGalaxies.NextGalaxy) { Console.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears.ToString() + "광년"); } }
public static void ShowGalaxies() { var theGalaxies = new Galaxies(); foreach (Galaxy theGalaxy in theGalaxies.NextGalaxy) { Debug.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears.ToString()); } }
public static void ShowGalaxies() { var theGalaxies = new Galaxies(); foreach (Galaxy theGalaxy in theGalaxies.NextGalaxy) { Console.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears); } }
public static void Run() { var theGalaxies = new Galaxies(); foreach (var theGalaxy in theGalaxies.NextGalaxy) { Debug.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears); } }
private void button11_Click(object sender, EventArgs e) { var theGalaxies = new Galaxies(); foreach (Galaxy theGalaxy in theGalaxies.NextGalaxy) { MessageBox.Show(theGalaxy.Name + " " + theGalaxy.MegaLightYears.ToString()); } }
public static void ExecuteExample() { // Display powers of 2 up to the exponent of 8: foreach (int i in Power(2, 8)) { Console.Write("{0} ", i); } var theGalaxies = new Galaxies(); foreach (Galaxy theGalaxy in theGalaxies.NextGalaxy) { Console.WriteLine(theGalaxy.Name + " " + theGalaxy.MegaLightYears.ToString()); } X(); }