Ejemplo n.º 1
0
 /// <summary>
 /// Creates a ChuteParameters from the given ProceduralChute
 /// </summary>
 /// <param name="pChute"></param>
 /// <param name="secondary"></param>
 public ChuteParameters(ProceduralChute pChute, ChuteTemplate chute)
 {
     this._material            = MaterialsLibrary.instance.GetMaterial(chute.materialsID).name;
     this._preDeployedDiameter = chute.preDepDiam;
     this._deployedDiameter    = chute.depDiam;
     this._minIsPressure       = chute.isPressure;
     this._minDeployment       = this.minIsPressure ? chute.parachute.minDeployment.ToString() : chute.predepClause;
     this._minPressure         = this.minIsPressure ? chute.predepClause : chute.parachute.minPressure.ToString();
     this._deploymentAlt       = chute.deploymentAlt;
     this._cutAlt             = chute.cutAlt;
     this._preDeploymentSpeed = chute.preDepSpeed;
     this._deploymentSpeed    = chute.depSpeed;
     if (pChute.textureLibrary != "none")
     {
         if (pChute.textures.canopies.Count > 0)
         {
             this._chuteTexture = pChute.textures.GetCanopy(chute.chuteID).name;
         }
         if (pChute.textures.models.Count > 0)
         {
             this._modelName = pChute.textures.GetModel(chute.modelID).name;
         }
     }
     this._type         = RCUtils.types[chute.typeID];
     this._calcSelect   = chute.calcSelect;
     this._getMass      = chute.getMass;
     this._useDry       = chute.useDry;
     this._mass         = chute.mass;
     this._landingSpeed = chute.landingSpeed;
     this._deceleration = chute.deceleration;
     this._refDepAlt    = chute.refDepAlt;
     this._chuteCount   = chute.chuteCount;
 }
Ejemplo n.º 2
0
            /// <summary>
            /// Creates a ChuteParameters from the given ProceduralChute
            /// </summary>
            public ChuteParameters(ProceduralChute pChute, ChuteTemplate chute)
            {
                TemplateGUI templateGui = chute.templateGUI;

                this.material            = MaterialsLibrary.MaterialsLibrary.Instance.GetMaterial(templateGui.materialsId).Name;
                this.preDeployedDiameter = templateGui.preDepDiam;
                this.deployedDiameter    = templateGui.depDiam;
                this.minIsPressure       = templateGui.isPressure;
                this.minDeployment       = this.MinIsPressure ? chute.parachute.minDeployment.ToString() : templateGui.predepClause;
                this.minPressure         = this.MinIsPressure ? templateGui.predepClause : chute.parachute.minPressure.ToString();
                this.deploymentAlt       = templateGui.deploymentAlt;
                this.cutAlt             = templateGui.cutAlt;
                this.preDeploymentSpeed = templateGui.preDepSpeed;
                this.deploymentSpeed    = templateGui.depSpeed;
                if (pChute.textureLibrary != "none")
                {
                    if (pChute.textures.Canopies.Count > 0)
                    {
                        this.chuteTexture = pChute.textures.GetCanopy(templateGui.chuteId).Name;
                    }
                    if (pChute.textures.Models.Count > 0)
                    {
                        this.modelName = pChute.textures.GetModel(templateGui.modelId).Name;
                    }
                }
                this.type         = templateGui.TypeId;
                this.calcSelect   = templateGui.calcSelect;
                this.getMass      = templateGui.getMass;
                this.useDry       = templateGui.useDry;
                this.mass         = templateGui.mass;
                this.landingSpeed = templateGui.landingSpeed;
                this.deceleration = templateGui.deceleration;
                this.refDepAlt    = templateGui.refDepAlt;
                this.chuteCount   = templateGui.chuteCount;
            }
Ejemplo n.º 3
0
            /// <summary>
            /// Creates a ChuteParameters from the given ProceduralChute
            /// </summary>
            /// <param name="pChute"></param>
            /// <param name="secondary"></param>
            public ChuteParameters(ProceduralChute pChute, bool secondary)
            {
                ChuteTemplate temp = secondary ? pChute.secondary : pChute.main;

                this._material            = MaterialsLibrary.instance.GetMaterial(temp.materialsID).name;
                this._preDeployedDiameter = temp.preDepDiam;
                this._deployedDiameter    = temp.depDiam;
                this._minIsPressure       = temp.isPressure;
                this._minDeployment       = this.minIsPressure ? temp.chute.minDeployment.ToString() : temp.predepClause;
                this._minPressure         = this.minIsPressure ? temp.predepClause : temp.chute.minPressure.ToString();
                this._deploymentAlt       = temp.deploymentAlt;
                this._cutAlt             = temp.cutAlt;
                this._preDeploymentSpeed = temp.preDepSpeed;
                this._deploymentSpeed    = temp.depSpeed;
                if (pChute.textureLibrary != "none")
                {
                    if (pChute.textures.canopies.Count > 0)
                    {
                        this._chuteTexture = pChute.textures.GetCanopy(temp.chuteID).name;
                    }
                    if (pChute.textures.models.Count > 0)
                    {
                        this._modelName = pChute.textures.GetModel(temp.modelID).name;
                    }
                }
                this._type         = RCUtils.types[temp.typeID];
                this._calcSelect   = temp.calcSelect;
                this._getMass      = temp.getMass;
                this._useDry       = temp.useDry;
                this._mass         = temp.mass;
                this._landingSpeed = temp.landingSpeed;
                this._deceleration = temp.deceleration;
                this._refDepAlt    = temp.refDepAlt;
                this._chuteCount   = temp.chuteCount;
            }
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a ChuteParameters from the given ProceduralChute
 /// </summary>
 /// <param name="pChute"></param>
 /// <param name="secondary"></param>
 public ChuteParameters(ProceduralChute pChute, ChuteTemplate chute)
 {
     this._material = MaterialsLibrary.instance.GetMaterial(chute.materialsID).name;
     this._preDeployedDiameter = chute.preDepDiam;
     this._deployedDiameter = chute.depDiam;
     this._minIsPressure = chute.isPressure;
     this._minDeployment = this.minIsPressure ? chute.parachute.minDeployment.ToString() : chute.predepClause;
     this._minPressure = this.minIsPressure ? chute.predepClause : chute.parachute.minPressure.ToString();
     this._deploymentAlt = chute.deploymentAlt;
     this._cutAlt = chute.cutAlt;
     this._preDeploymentSpeed = chute.preDepSpeed;
     this._deploymentSpeed = chute.depSpeed;
     if (pChute.textureLibrary != "none")
     {
         if (pChute.textures.canopies.Count > 0) { this._chuteTexture = pChute.textures.GetCanopy(chute.chuteID).name; }
         if (pChute.textures.models.Count > 0) { this._modelName = pChute.textures.GetModel(chute.modelID).name; }
     }
     this._type = RCUtils.types[chute.typeID];
     this._calcSelect = chute.calcSelect;
     this._getMass = chute.getMass;
     this._useDry = chute.useDry;
     this._mass = chute.mass;
     this._landingSpeed = chute.landingSpeed;
     this._deceleration = chute.deceleration;
     this._refDepAlt = chute.refDepAlt;
     this._chuteCount = chute.chuteCount;
 }