public void Start() { GameObject.DontDestroyOnLoad(this); GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady); GameEvents.onHideUI.Add(onHideUI); GameEvents.onShowUI.Add(onShowUI); Instance = this; overlayRenderer = gameObject.AddComponent <OverlayRenderer>(); overlayRenderer.SetGridLevel(KethaneData.GridLevel); var node = ConfigNode.Load(KSPUtil.ApplicationRootPath + "GameData/Kethane/Grid.cfg"); if (node == null) { return; } foreach (var body in FlightGlobals.Bodies) { double result; if (double.TryParse(node.GetValue(body.name), out result)) { bodyRadii[body] = result; } } }
public void Start() { if (Instance != null) { Destroy(Instance.gameObject); } Instance = this; overlayRenderer = gameObject.AddComponent <OverlayRenderer>(); overlayRenderer.SetGridLevel(KethaneData.GridLevel); if (button == null) { var tex = GameDatabase.Instance.GetTexture("Kethane/toolbar", false); button = ApplicationLauncher.Instance.AddModApplication(null, null, null, null, null, null, ApplicationLauncher.AppScenes.MAPVIEW | ApplicationLauncher.AppScenes.TRACKSTATION, tex); } var node = ConfigNode.Load(KSPUtil.ApplicationRootPath + "GameData/Kethane/Grid.cfg"); if (node == null) { return; } foreach (var body in FlightGlobals.Bodies) { double result; if (double.TryParse(node.GetValue(body.name), out result)) { bodyRadii[body] = result; } } }
public void Start() { if (Instance != null) { Destroy(Instance.gameObject); } Instance = this; overlayRenderer = gameObject.AddComponent<OverlayRenderer>(); overlayRenderer.SetGridLevel(KethaneData.GridLevel); if (button == null) { var tex = GameDatabase.Instance.GetTexture("Kethane/toolbar", false); button = ApplicationLauncher.Instance.AddModApplication(null, null, null, null, null, null, ApplicationLauncher.AppScenes.MAPVIEW | ApplicationLauncher.AppScenes.TRACKSTATION, tex); } var node = ConfigNode.Load(KSPUtil.ApplicationRootPath + "GameData/Kethane/Grid.cfg"); if (node == null) { return; } foreach (var body in FlightGlobals.Bodies) { double result; if (double.TryParse(node.GetValue(body.name), out result)) { bodyRadii[body] = result; } } }
public void Start() { GameObject.DontDestroyOnLoad(this); GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady); GameEvents.onHideUI.Add (onHideUI); GameEvents.onShowUI.Add (onShowUI); Instance = this; overlayRenderer = gameObject.AddComponent<OverlayRenderer>(); overlayRenderer.SetGridLevel(KethaneData.GridLevel); var node = ConfigNode.Load(KSPUtil.ApplicationRootPath + "GameData/Kethane/Grid.cfg"); if (node == null) { return; } foreach (var body in FlightGlobals.Bodies) { double result; if (double.TryParse(node.GetValue(body.name), out result)) { bodyRadii[body] = result; } } }