public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     particleTexture = GameDatabase.Instance.GetTexture(particleTextureName, false);
     if (particleTexture != null)
     {
         particleFX = new Firespitter.FSparticleFX(part.gameObject, particleTexture);
         particleFX.EmitterLocalVelocity = EmitterLocalVelocity;
         Log.dbg("KTvelocityController: particle texture found: {0}", particleTextureName);
         particleFX.setupFXValues();
         //particleFX.pEmitter.minEmission = 0f;
         //particleFX.pEmitter.maxEmission = 0f;
         particleFX.pEmitter.localVelocity = Vector3.zero;
         particleFX.pEmitter.useWorldSpace = true;
     }
     refTransform        = new GameObject().transform;
     refTransform.parent = part.transform;
 }
    public override void OnStart(PartModule.StartState state)
    {
        base.OnStart(state);
        if (!HighLogic.LoadedSceneIsFlight)
        {
            return;
        }

        transformArray = part.FindModelTransforms(thrustTransformName);
        if (transformArray.Length > 0)
        {
            transformsFound = true;
            particleFX      = new Firespitter.FSparticleFX[transformArray.Length];
        }
        else
        {
            Debug.Log("KTvelocityController: Transforms not found named " + thrustTransformName + ", disabling the module");
            this.enabled = false;
        }

        if (this.enabled && particleTextureName != string.Empty)
        {
            // set up fx ---- TODO, assign each transform its own FX
            particleTexture = GameDatabase.Instance.GetTexture(particleTextureName, false);
            if (particleTexture != null)
            {
                for (int i = 0; i < particleFX.Length; i++)
                {
                    particleFX[i] = new Firespitter.FSparticleFX(transformArray[i].gameObject, particleTexture);
                    particleFX[i].EmitterLocalVelocity = EmitterLocalVelocity;
                    //Debug.Log("KTvelocityController: particle texture found: " + particleTextureName);
                    particleFX[i].setupFXValues();
                    particleFX[i].pEmitter.minEmission   = 0f;
                    particleFX[i].pEmitter.maxEmission   = 0f;
                    particleFX[i].pEmitter.useWorldSpace = false;
                }
            }
            else
            {
                useFX = false;
                Debug.Log("KTvelocityController: particle texture not found, disabling fx");
            }
        }
    }
 public override void OnStart(PartModule.StartState state)
 {
     base.OnStart(state);
     particleTexture = GameDatabase.Instance.GetTexture(particleTextureName, false);
     if (particleTexture != null)
     {            
             particleFX = new Firespitter.FSparticleFX(part.gameObject, particleTexture);
             particleFX.EmitterLocalVelocity = EmitterLocalVelocity;
             //Debug.Log("KTvelocityController: particle texture found: " + particleTextureName);
             particleFX.setupFXValues();
             //particleFX.pEmitter.minEmission = 0f;
             //particleFX.pEmitter.maxEmission = 0f;
             particleFX.pEmitter.localVelocity = Vector3.zero;
             particleFX.pEmitter.useWorldSpace = true;
         
     }
     refTransform = new GameObject().transform;
     refTransform.parent = part.transform;
 }
    public override void OnStart(PartModule.StartState state)
    {
        base.OnStart(state);
        if (!HighLogic.LoadedSceneIsFlight) return;

        transformArray = part.FindModelTransforms(thrustTransformName);
        if (transformArray.Length > 0)
        {
            transformsFound = true;
            particleFX = new Firespitter.FSparticleFX[transformArray.Length];
        }
        else
        {
            Debug.Log("KTvelocityController: Transforms not found named " + thrustTransformName + ", disabling the module");
            this.enabled = false;
        }

        if (this.enabled && particleTextureName != string.Empty)
        {
            // set up fx ---- TODO, assign each transform its own FX
            particleTexture = GameDatabase.Instance.GetTexture(particleTextureName, false);
            if (particleTexture != null)
            {
                for (int i = 0; i < particleFX.Length; i++)
                {
                    particleFX[i] = new Firespitter.FSparticleFX(transformArray[i].gameObject, particleTexture);
                    particleFX[i].EmitterLocalVelocity = EmitterLocalVelocity;
                    //Debug.Log("KTvelocityController: particle texture found: " + particleTextureName);
                    particleFX[i].setupFXValues();
                    particleFX[i].pEmitter.minEmission = 0f;
                    particleFX[i].pEmitter.maxEmission = 0f;
                    particleFX[i].pEmitter.useWorldSpace = false;
                }
            }
            else
            {
                useFX = false;
                Debug.Log("KTvelocityController: particle texture not found, disabling fx");
            }
        }
    }