public override void OnStart(PartModule.StartState state) { this.part.force_activate(); animator = part.Modules.OfType <IExtractorAnimator>().SingleOrDefault() ?? new DefaultExtractorAnimator(); headTransform = this.part.FindModelTransform(HeadTransform); tailTransform = this.part.FindModelTransform(TailTransform); if (state == StartState.Editor) { return; } if (FlightGlobals.fetch == null) { return; } emitters = part.Modules.OfType <KethaneParticleEmitter>().ToArray(); foreach (var emitter in emitters) { emitter.Setup(); emitter.EmitterTransform.parent = headTransform; emitter.EmitterTransform.localRotation = Quaternion.identity; } }
public override void OnStart(PartModule.StartState state) { this.part.force_activate(); animator = part.Modules.OfType<IExtractorAnimator>().SingleOrDefault(); if (animator == null) { animator = new DefaultExtractorAnimator(); } else { Events["DeployDrill"].guiActiveEditor = true; Events["RetractDrill"].guiActiveEditor = true; } headTransform = this.part.FindModelTransform(HeadTransform); tailTransform = this.part.FindModelTransform(TailTransform); if (state == StartState.Editor) { return; } if (FlightGlobals.fetch == null) { return; } emitters = part.Modules.OfType<KethaneParticleEmitter>().ToArray(); foreach (var emitter in emitters) { emitter.Setup(); emitter.EmitterTransform.parent = headTransform; emitter.EmitterTransform.localRotation = Quaternion.identity; } }
public override void OnStart(PartModule.StartState state) { this.part.force_activate(); animator = part.Modules.OfType<IExtractorAnimator>().Single(); }