当前位置: 首页>>代码示例>>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;未经允许,请勿转载。