示例#1
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;
            }
示例#2
0
            /// <summary>
            /// Creates a ChuteParameters from the given ProceduralChute
            /// </summary>
            /// <param name="pChute"></param>
            /// <param name="secondary"></param>
            public ChuteParameters(ProceduralChute pChute, ChuteTemplate chute)
            {
                TemplateGUI templateGUI = chute.templateGUI;

                this._material            = 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;
            }