public string propertyName; // the real name - could be "Width" public SourceValueInfo(SourceValueType t, DrillIn d, string n) { type = t; drillIn = d; name = n; paramList = null; propertyName = null; }
public SourceValueInfo(SourceValueType t, DrillIn d, FrugalObjectList<IndexerParamInfo> list) { type = t; drillIn = d; name = null; paramList = list; propertyName = null; }
// Token: 0x06007620 RID: 30240 RVA: 0x0021ABBF File Offset: 0x00218DBF public SourceValueInfo(SourceValueType t, DrillIn d, string n) { this.type = t; this.drillIn = d; this.name = n; this.paramList = null; this.propertyName = null; }
// Token: 0x06007621 RID: 30241 RVA: 0x0021ABE4 File Offset: 0x00218DE4 public SourceValueInfo(SourceValueType t, DrillIn d, FrugalObjectList <IndexerParamInfo> list) { this.type = t; this.drillIn = d; this.name = null; this.paramList = list; this.propertyName = null; }
protected override void onFlightStart() { #region Configuration ValidateConfiguration(); foreach (CelestialBody Body in FlightGlobals.Bodies) { CollsionLayerMask = 1 << Body.gameObject.layer; } #endregion #region Sound effects DrillIn = gameObject.AddComponent <AudioSource>(); WWW dIn = new WWW("file://" + KSPUtil.ApplicationRootPath.Replace("\\", "/") + "PluginData/mmi_kethane/sounds/drillIn.wav"); if ((DrillIn != null) && (dIn != null)) { DrillIn.clip = dIn.GetAudioClip(false); DrillIn.volume = 2; DrillIn.Stop(); } DrillOut = gameObject.AddComponent <AudioSource>(); WWW dOut = new WWW("file://" + KSPUtil.ApplicationRootPath.Replace("\\", "/") + "PluginData/mmi_kethane/sounds/drillOut.wav"); if ((DrillOut != null) && (dOut != null)) { DrillOut.clip = dOut.GetAudioClip(false); DrillOut.volume = 0.25f; DrillOut.Stop(); } #endregion #region Child model parts BaseTransform = base.transform.FindChild("model").FindChild("Kethane Small Miner").FindChild("Main Box"); Cyl3Transform = base.transform.FindChild("model").FindChild("Kethane Small Miner").FindChild("Main Box").FindChild("1 Cyl"); Cyl2Transform = base.transform.FindChild("model").FindChild("Kethane Small Miner").FindChild("Main Box").FindChild("1 Cyl").FindChild("2 Cyl"); Cyl1Transform = base.transform.FindChild("model").FindChild("Kethane Small Miner").FindChild("Main Box").FindChild("1 Cyl").FindChild("2 Cyl").FindChild("3 Cyl"); #endregion #region Setup effects for (int i = 0; i < EffectsNumber; i++) { DigEffects[i] = (GameObject)GameObject.Instantiate(UnityEngine.Resources.Load("Effects/fx_gasJet_white")); DigEffects[i].name = "DigEffect" + i.ToString(); DigEffects[i].transform.parent = BaseTransform; DigEffects[i].gameObject.active = false; } DigEffectRotations[0] = new Vector3(30, 0, 0); DigEffectRotations[1] = new Vector3(0, 0, 30); DigEffectRotations[2] = new Vector3(-30, 0, 0); DigEffectRotations[3] = new Vector3(0, 0, -30); UpdateEffects(); #endregion }
internal SourceValueInfo(SourceValueType t, DrillIn d, string n) { this.type = t; this.drillIn = d; this.name = n; }
private void StartNewLevel() { if (this.index >= this.pathLength) this.state = State.Done; this.drillIn = DrillIn.Never; }
internal List<SourceValueInfo> Parse(string path, bool returnResultBeforeError) { this.pathValue = (path != null) ? path.Trim() : String.Empty; this.pathLength = this.pathValue.Length; this.index = 0; this.drillIn = DrillIn.IfNeeded; this.al.Clear(); this.error = null; this.state = State.Init; if (this.pathLength > 0 && this.pathValue[0] == '.') { //empty first prop - > input path was like ".bar"; need to add first empty property SourceValueInfo info = new SourceValueInfo(SourceValueType.Property, this.drillIn, string.Empty); this.al.Add(info); } while (this.state != State.Done) { char c = (this.index < this.pathLength) ? this.pathValue[this.index] : NullChar; switch (this.state) { case State.Init: switch (c) { case '/': case '.': case '[': case NullChar: this.state = State.Prop; break; case ']'://unexpected close indexer, report error this.error = "path[" + this.index + "] = " + c; return returnResultBeforeError ? this.al : EmptyInfo; default: AddProperty(); break; } break; case State.Prop: bool isIndexer = false; switch (c) { case '.': this.drillIn = DrillIn.Never; break; case '[': isIndexer = true; break; case NullChar: --this.index; break; default: this.error = "path[" + this.index + "] = " + c; return returnResultBeforeError ? this.al : EmptyInfo; } ++this.index; // skip over special character if (isIndexer) AddIndexer(); else AddProperty(); break; } } return (this.error == null || returnResultBeforeError) ? this.al : EmptyInfo; }
internal SourceValueInfo(SourceValueType t, DrillIn d, string n) { type = t; drillIn = d; name = n; }
internal List <SourceValueInfo> Parse(string path, bool returnResultBeforeError) { this.pathValue = (path != null) ? path.Trim() : string.Empty; this.pathLength = this.pathValue.Length; this.index = 0; this.drillIn = DrillIn.IfNeeded; this.al.Clear(); this.error = null; this.state = State.Init; if ((this.pathLength > 0) && (this.pathValue[0] == '.')) { SourceValueInfo item = new SourceValueInfo(SourceValueType.Property, this.drillIn, string.Empty); this.al.Add(item); } while (this.state != State.Done) { bool flag; char ch = (this.index < this.pathLength) ? this.pathValue[this.index] : '\0'; switch (this.state) { case State.Init: switch (ch) { case ']': goto Label_010C; } goto Label_015C; case State.Prop: flag = false; switch (ch) { case '\0': goto Label_018C; case '.': goto Label_017F; case '[': goto Label_0188; } goto Label_019C; default: { continue; } } this.state = State.Prop; continue; Label_010C :; this.error = string.Concat(new object[] { "path[", this.index, "] = ", ch }); if (!returnResultBeforeError) { return(EmptyInfo); } return(this.al); Label_015C: this.AddProperty(); continue; Label_017F: this.drillIn = DrillIn.Never; goto Label_01EC; Label_0188: flag = true; goto Label_01EC; Label_018C: this.index--; goto Label_01EC; Label_019C :; this.error = string.Concat(new object[] { "path[", this.index, "] = ", ch }); if (!returnResultBeforeError) { return(EmptyInfo); } return(this.al); Label_01EC: this.index++; if (flag) { this.AddIndexer(); } else { this.AddProperty(); } } if ((this.error != null) && !returnResultBeforeError) { return(EmptyInfo); } return(this.al); }
internal List<SourceValueInfo> Parse(string path, bool returnResultBeforeError) { this.pathValue = (path != null) ? path.Trim() : string.Empty; this.pathLength = this.pathValue.Length; this.index = 0; this.drillIn = DrillIn.IfNeeded; this.al.Clear(); this.error = null; this.state = State.Init; if ((this.pathLength > 0) && (this.pathValue[0] == '.')) { SourceValueInfo item = new SourceValueInfo(SourceValueType.Property, this.drillIn, string.Empty); this.al.Add(item); } while (this.state != State.Done) { bool flag; char ch = (this.index < this.pathLength) ? this.pathValue[this.index] : '\0'; switch (this.state) { case State.Init: switch (ch) { case ']': goto Label_010C; } goto Label_015C; case State.Prop: flag = false; switch (ch) { case '\0': goto Label_018C; case '.': goto Label_017F; case '[': goto Label_0188; } goto Label_019C; default: { continue; } } this.state = State.Prop; continue; Label_010C:; this.error = string.Concat(new object[] { "path[", this.index, "] = ", ch }); if (!returnResultBeforeError) { return EmptyInfo; } return this.al; Label_015C: this.AddProperty(); continue; Label_017F: this.drillIn = DrillIn.Never; goto Label_01EC; Label_0188: flag = true; goto Label_01EC; Label_018C: this.index--; goto Label_01EC; Label_019C:; this.error = string.Concat(new object[] { "path[", this.index, "] = ", ch }); if (!returnResultBeforeError) { return EmptyInfo; } return this.al; Label_01EC: this.index++; if (flag) { this.AddIndexer(); } else { this.AddProperty(); } } if ((this.error != null) && !returnResultBeforeError) { return EmptyInfo; } return this.al; }