本文整理汇总了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];
}
示例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 };
}
示例3: MechJebModuleJoke
public MechJebModuleJoke(MechJebCore core)
: base(core)
{
priority = -10000;
enabled = false;
hidden = true;
}
示例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);
}
示例5: OnStart
public override void OnStart(StartState state)
{
core = part.Modules.OfType<MechJebCore>().FirstOrDefault();
if (state != StartState.None && state != StartState.Editor)
{
InitializeLights();
}
}
示例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);
}
示例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 };
}
示例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;
}
}
}
示例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));
}
}
}
示例10: AutopilotStep
public AutopilotStep(MechJebCore core)
{
this.core = core;
}
示例11: MechJebModuleLandingAutopilot
public MechJebModuleLandingAutopilot(MechJebCore core)
: base(core)
{
}
示例12: MechJebModuleSpaceplaneGuidance
public MechJebModuleSpaceplaneGuidance(MechJebCore core) : base(core) { }
示例13: MechJebModuleRCSBalancer
public MechJebModuleRCSBalancer(MechJebCore core)
: base(core)
{
priority = 700;
}
示例14: MechJebModuleAscentAutopilot
public MechJebModuleAscentAutopilot(MechJebCore core)
: base(core)
{
}
示例15: DisplayModule
public DisplayModule(MechJebCore core)
: base(core)
{
ID = nextID;
nextID++;
}