SetGridLevel() 공개 메소드

public SetGridLevel ( int gridLevel ) : void
gridLevel int
리턴 void
예제 #1
0
        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;
                }
            }
        }
예제 #2
0
        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;
                }
            }
        }
예제 #3
0
        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;
                }
            }
        }
예제 #4
0
        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;
                }
            }
        }