當前位置: 首頁>>代碼示例>>C#>>正文


C# MuMech.MechJebCore類代碼示例

本文整理匯總了C#中MuMech.MechJebCore的典型用法代碼示例。如果您正苦於以下問題:C# MechJebCore類的具體用法?C# MechJebCore怎麽用?C# MechJebCore使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


MechJebCore類屬於MuMech命名空間,在下文中一共展示了MechJebCore類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: MechJebModuleFlightRecorder

 public MechJebModuleFlightRecorder(MechJebCore core)
     : base(core)
 {
     priority = 2000;
     maximums = new double[typeCount];
     minimums = new double[typeCount];
 }
開發者ID:StevilKnevil,項目名稱:MechJeb2,代碼行數:7,代碼來源:MechJebModuleFlightRecorder.cs

示例2: OnStart

 public override void OnStart(StartState state)
 {
     core = part.Modules.OfType<MechJebCore>().FirstOrDefault();
     eye_base = part.FindModelTransform("r4m0n_Control_point_socket"); //    Rotation: 0, 0, Z Azimuth
     eye_ball = part.FindModelTransform("r4m0n_Control_point_Eye"); //       Rotation: X, 0, 0 Altitude
     lastFlaps = new float[] { 0, 0, 0, 0 };
 }
開發者ID:BryceSchroeder,項目名稱:MechJeb2,代碼行數:7,代碼來源:MechJebPod.cs

示例3: MechJebModuleJoke

 public MechJebModuleJoke(MechJebCore core)
     : base(core)
 {
     priority = -10000;
     enabled = false;
     hidden = true;
 }
開發者ID:BryceSchroeder,項目名稱:MechJeb2,代碼行數:7,代碼來源:MechJebModuleJoke.cs

示例4: onAttitudeChange

        public override void onAttitudeChange(MechJebCore.AttitudeReference oldReference, Quaternion oldTarget, MechJebCore.AttitudeReference newReference, Quaternion newTarget)
        {
            if (!core.attitudeActive && ((mode != Mode.SURFACE) || srf_act))
            {
                mode = Mode.OFF;
            }

            base.onAttitudeChange(oldReference, oldTarget, newReference, newTarget);
        }
開發者ID:Veterok,項目名稱:MuMech,代碼行數:9,代碼來源:MechJebModuleSmartASS.cs

示例5: OnStart

        public override void OnStart(StartState state)
        {
            core = part.Modules.OfType<MechJebCore>().FirstOrDefault();

            if (state != StartState.None && state != StartState.Editor)
            {
                InitializeLights();
            }
        }
開發者ID:numerobis,項目名稱:MechJeb2,代碼行數:9,代碼來源:MechJebAR202.cs

示例6: MechJebModuleRCSController

        public MechJebModuleRCSController(MechJebCore core)
            : base(core)
        {
            priority = 600;

            Kd = 0.53 / Tf;
            Kp = Kd / (3 * Math.Sqrt(2) * Tf);
            Ki = Kp / (12 * Math.Sqrt(2) * Tf);

            pid = new PIDControllerV2(Kp, Ki, Kd, 1, -1);
        }
開發者ID:Conti,項目名稱:MechJeb2,代碼行數:11,代碼來源:MechJebModuleRCSController.cs

示例7: MechJebModuleManeuverPlanner

 public MechJebModuleManeuverPlanner(MechJebCore core)
     : base(core)
 {
     references[Operation.CIRCULARIZE] = new TimeReference[] { TimeReference.APOAPSIS, TimeReference.PERIAPSIS, TimeReference.ALTITUDE, TimeReference.X_FROM_NOW };
     references[Operation.PERIAPSIS] = new TimeReference[] { TimeReference.X_FROM_NOW, TimeReference.APOAPSIS, TimeReference.PERIAPSIS };
     references[Operation.APOAPSIS] = new TimeReference[] { TimeReference.X_FROM_NOW, TimeReference.APOAPSIS, TimeReference.PERIAPSIS };
     references[Operation.ELLIPTICIZE] = new TimeReference[] { TimeReference.X_FROM_NOW };
     references[Operation.INCLINATION] = new TimeReference[] { TimeReference.EQ_ASCENDING, TimeReference.EQ_DESCENDING, TimeReference.X_FROM_NOW };
     references[Operation.PLANE] = new TimeReference[] { TimeReference.REL_ASCENDING, TimeReference.REL_DESCENDING };
     references[Operation.TRANSFER] = new TimeReference[] { TimeReference.COMPUTED };
     references[Operation.MOON_RETURN] = new TimeReference[] { TimeReference.COMPUTED };
     references[Operation.INTERPLANETARY_TRANSFER] = new TimeReference[] { TimeReference.COMPUTED };
     references[Operation.COURSE_CORRECTION] = new TimeReference[] { TimeReference.COMPUTED };
     references[Operation.LAMBERT] = new TimeReference[] { TimeReference.X_FROM_NOW };
     references[Operation.KILL_RELVEL] = new TimeReference[] { TimeReference.CLOSEST_APPROACH, TimeReference.X_FROM_NOW };
 }
開發者ID:Conti,項目名稱:MechJeb2,代碼行數:16,代碼來源:MechJebModuleManeuverPlanner.cs

示例8: MechJebModuleJoke

        public MechJebModuleJoke(MechJebCore core)
            : base(core)
        {
            hidden = true;
            enabled = true;

            sorry = core.part.gameObject.AddComponent<AudioSource>();
            WWW www = new WWW("file://" + KSPUtil.ApplicationRootPath.Replace("\\", "/") + "Parts/mumech_MechJebPod/snd1.wav");
            if ((sorry != null) && (www != null))
            {
                sorry.clip = www.GetAudioClip(false);
                sorry.volume = 0;
                sorry.Stop();
            }

            glitch = core.part.gameObject.AddComponent<AudioSource>();
            glitchClips = new AudioClip[NUM_GLITCH_SOUNDS];
            for (int i = 0; i < NUM_GLITCH_SOUNDS; i++)
            {
                www = new WWW("file://" + KSPUtil.ApplicationRootPath.Replace("\\", "/") + "Parts/mumech_MechJebPod/glitch" + i + ".wav");
                if (www != null)
                {
                    glitchClips[i] = www.GetAudioClip(false);
                }
            }

            foreach (ComputerModule module in core.modules)
            {
                if (module is MechJebModuleAscentAutopilot)
                {
                    ascent = (MechJebModuleAscentAutopilot)module;
                }
                if (module is MechJebModuleLandingAutopilot)
                {
                    landing = (MechJebModuleLandingAutopilot)module;
                }
                if (module is MechJebModuleTranslatron)
                {
                    translatron = (MechJebModuleTranslatron)module;
                }
            }
        }
開發者ID:Veterok,項目名稱:MuMech,代碼行數:42,代碼來源:MechJebModuleJoke.cs

示例9: MechJebModuleAutom8

        public MechJebModuleAutom8(MechJebCore core)
            : base(core)
        {
            instance = this;
            luaEnv = LuaRuntime.CreateGlobalEnviroment();
            mechjeb = new LuaTable();
            core.registerLuaMembers(mechjeb);
            luaEnv.SetNameValue("mechjeb", mechjeb);
            luaEnv.SetNameValue("vessel", ObjectToLua.ToLuaValue(vesselState));

            if (KSP.IO.File.Exists<MuMechJeb>("autorun.lua"))
            {
                try
                {
                    LuaRuntime.GlobalEnvironment = luaEnv;
                    LuaRuntime.RunFile("autorun.lua", luaEnv);
                }
                catch (Exception e)
                {
                    A8Console.WriteLine(e.GetType().Name + ": " + e.Message);
                    luaEnv.SetNameValue("lastError", ObjectToLua.ToLuaValue(e));
                }
            }
        }
開發者ID:Majiir,項目名稱:MuMechLib,代碼行數:24,代碼來源:MechJebModuleAutom8.cs

示例10: AutopilotStep

 public AutopilotStep(MechJebCore core)
 {
     this.core = core;
 }
開發者ID:CliftonMarien,項目名稱:MechJeb2,代碼行數:4,代碼來源:AutopilotModule.cs

示例11: MechJebModuleLandingAutopilot

 public MechJebModuleLandingAutopilot(MechJebCore core)
     : base(core)
 {
 }
開發者ID:BloodyRain2k,項目名稱:MechJeb2,代碼行數:4,代碼來源:MechJebModuleLandingAutopilot.cs

示例12: MechJebModuleSpaceplaneGuidance

 public MechJebModuleSpaceplaneGuidance(MechJebCore core) : base(core) { }
開發者ID:CliftonMarien,項目名稱:MechJeb2,代碼行數:1,代碼來源:MechJebModuleSpaceplaneGuidance.cs

示例13: MechJebModuleRCSBalancer

 public MechJebModuleRCSBalancer(MechJebCore core)
     : base(core)
 {
     priority = 700;
 }
開發者ID:bruchpilotxxl,項目名稱:MechJeb2,代碼行數:5,代碼來源:MechJebModuleRCSBalancer.cs

示例14: MechJebModuleAscentAutopilot

 public MechJebModuleAscentAutopilot(MechJebCore core)
     : base(core)
 {
 }
開發者ID:kext,項目名稱:MechJeb2,代碼行數:4,代碼來源:MechJebModuleAscentAutopilot.cs

示例15: DisplayModule

 public DisplayModule(MechJebCore core)
     : base(core)
 {
     ID = nextID;
     nextID++;
 }
開發者ID:Kerbas-ad-astra,項目名稱:MechJeb2,代碼行數:6,代碼來源:DisplayModule.cs


注:本文中的MuMech.MechJebCore類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。