public static int GetVersionInt(CorridorState rwState) { string sVersion2 = GetVersion(rwState); sVersion2 = sVersion2.Substring(1); return(int.Parse(sVersion2)); }
public void GetLogicalNames() { Transaction trans = null; CorridorState corridorState = null; try { trans = StartTransaction(); corridorState = CivilApplication.ActiveDocument.CorridorState; GetLogicalNamesImplement(corridorState); trans.Commit(); } catch (Exception ex) { ProjectData.SetProjectError(ex); Exception e = ex; Utilities.RecordError(corridorState, e); if (trans != null) { trans.Abort(); } ProjectData.ClearProjectError(); } finally { if (trans != null) { trans.Dispose(); } } }
void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "boat") { state = CorridorState.current; } }
public void GetOutputParameters() { Transaction trans = null; CorridorState corridorState = null; try { trans = StartTransaction(); GetOutputParametersImplement(corridorState); corridorState = CivilApplication.ActiveDocument.CorridorState; trans.Commit(); } catch (Exception ex) { Exception e = ex; Utilities.RecordError(corridorState, e); if (trans != null) { trans.Abort(); } } finally { if (trans != null) { trans.Dispose(); } } }
public static void RecordError(CorridorState corridorState, CorridorError corridorError, string message, string source) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) if (corridorState == null) { throw new ArgumentNullException("corridorState"); } corridorState.RecordError(corridorError, 3, message, source, true); }
void OnTriggerEnter(Collider collider) { if (collider.gameObject.tag == "boat") { state = CorridorState.current; if (previousIceCorridor != null) { previousIceCorridor.state = CorridorState.finished; } } }
public static void RecordError(CorridorState corridorState, Exception e) { if (corridorState == null) { throw new ArgumentNullException("corridorState"); } if (e == null) { throw new ArgumentNullException("e"); } corridorState.RecordError(-2147221503, 3, e.Message, e.Source, true); }
public static void ClearSEAORUnsupportedTag(CorridorState corridorState) { if (corridorState == null) { throw new ArgumentNullException("corridorState"); } IParam param = corridorState.ParamsLong.Add("SE AOR Unsupported", 0); if (param != null) { param.Access = ParamAccessType.Output; } }
public void Draw() { CorridorState corridorState = null; try { corridorState = CivilApplication.ActiveDocument.CorridorState; DrawImplement(corridorState); } catch (Exception ex) { Exception e = ex; Utilities.RecordError(corridorState, e); } }
public static ParamPoint GetMarkedPoint(string strMarkedPointName, CorridorState corridorState) { if (corridorState == null) { throw new ArgumentNullException("corridorState"); } ParamPointCollection paramsPoint = corridorState.ParamsPoint; ParamPoint GetMarkedPoint = null; if (paramsPoint != null) { GetMarkedPoint = paramsPoint.get_Item(Strings.UCase(strMarkedPointName)); } return(GetMarkedPoint); }
// Update is called once per frame void Update() { if (this.networkView.isMine) { // The current corridor spawns shards, moves walls and stuff if (state == CorridorState.current) { firstWallCounter += Time.deltaTime; if (firstWallCounter < firstWallTimerMax && !wallMoving) { RightWall = new Vector3(rightWall.transform.position.x + speedWall * Time.deltaTime, rightWall.transform.position.y, rightWall.transform.position.z); rightWall.transform.position = RightWall; } else { wallMoving = true; } if (wallMoving) { leftWallMovingCounter += Time.deltaTime; rightWallMovingCounter += Time.deltaTime; if (leftWallMovingCounter < leftWallMovingTimerMax) { LeftWall = new Vector3(leftWall.transform.position.x, leftWall.transform.position.y, leftWall.transform.position.z + speedWall * Time.deltaTime); // move left objects to the right leftWall.transform.position = LeftWall; } else { // do nothing brah } if (rightWallMovingCounter < rightWallMovingTimerMax) { RightWall = new Vector3(rightWall.transform.position.x, rightWall.transform.position.y, rightWall.transform.position.z + speedWall * Time.deltaTime); // move right objects to the left rightWall.transform.position = RightWall; } else { wallMoving = false; state = CorridorState.finished; } } } } }
public static void SetSEAORCrownPointForLayout(CorridorState corridorState, int nCrownPoint) { if (corridorState == null) { throw new ArgumentNullException("corridorState"); } checked { long nCPlusPlusIndex = nCrownPoint - 1; IParam param = corridorState.ParamsLong.Add("SE AOR Crown Point For Layout", (int)nCPlusPlusIndex); if (param != null) { param.Access = ParamAccessType.Output; } } }
public static double AdjustOffset(CorridorState oRwyState, double dOffset) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Invalid comparison between Unknown and I4 if (oRwyState == null) { throw new ArgumentNullException("oRwyState"); } if ((int)oRwyState.Mode == 1) { return(dOffset); } if (oRwyState.CurrentAlignmentIsOffsetAlignment & oRwyState.CurrentAssemblyOffsetIsFixed) { return(dOffset + oRwyState.CurrentAssemblyFixedOffset); } return(dOffset); }
public static void GetAlignmentAndOrigin(CorridorState rwState, ref ObjectId oAlignmentId, ref PointInMem oOrigin) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Invalid comparison between Unknown and I4 //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) if (rwState == null) { throw new ArgumentNullException("rwState"); } if (oOrigin == null) { oOrigin = new PointInMem(); } if ((int)rwState.Mode == 1) { oOrigin.Station = 0.0; oOrigin.Offset = 0.0; oOrigin.Elevation = 0.0; return; } bool isFixedAlignmentOffset = rwState.CurrentAlignmentIsOffsetAlignment & rwState.CurrentAssemblyOffsetIsFixed; oOrigin.Station = rwState.CurrentStation; if (isFixedAlignmentOffset) { oAlignmentId = rwState.CurrentBaselineId; oOrigin.Offset = rwState.CurrentOffset + rwState.CurrentAssemblyFixedOffset; oOrigin.Elevation = rwState.CurrentElevation + rwState.CurrentAssemblyFixedElevation; } else { oAlignmentId = rwState.CurrentAlignmentId; oOrigin.Offset = rwState.CurrentOffset; oOrigin.Elevation = rwState.CurrentElevation; } }
public static string GetVersion(CorridorState rwState) { if (rwState == null) { throw new ArgumentNullException("rwState"); } ParamStringCollection oParamsString = rwState.ParamsString; string vVersion; try { vVersion = oParamsString.Value("Version"); } catch (Exception projectError) { ProjectData.SetProjectError(projectError); vVersion = "R2005"; ProjectData.ClearProjectError(); } return(vVersion); }
protected abstract void DrawImplement(CorridorState corridorState);
protected virtual void GetOutputParametersImplement(CorridorState corridorState) { }
protected virtual void GetLogicalNamesImplement(CorridorState corridorState) { }
// Update is called once per frame void Update() { if (this.networkView.isMine) { // The current corridor spawns shards, moves walls and stuff if (state == CorridorState.current) { firstWallCounter += Time.deltaTime; if(firstWallCounter < firstWallTimerMax && !wallMoving) { RightWall = new Vector3 (rightWall.transform.position.x + speedWall*Time.deltaTime, rightWall.transform.position.y, rightWall.transform.position.z); rightWall.transform.position = RightWall; } else { wallMoving = true; } if(wallMoving) { leftWallMovingCounter += Time.deltaTime; rightWallMovingCounter += Time.deltaTime; if (leftWallMovingCounter < leftWallMovingTimerMax) { LeftWall = new Vector3 (leftWall.transform.position.x, leftWall.transform.position.y, leftWall.transform.position.z + speedWall*Time.deltaTime); // move left objects to the right leftWall.transform.position = LeftWall; } else { // do nothing brah } if (rightWallMovingCounter < rightWallMovingTimerMax) { RightWall = new Vector3 (rightWall.transform.position.x, rightWall.transform.position.y, rightWall.transform.position.z + speedWall*Time.deltaTime); // move right objects to the left rightWall.transform.position = RightWall; } else { wallMoving = false; state = CorridorState.finished; } } } } }
public static double GetSlope(string strShoulderSlope, CorridorState rwState, ShoulderSubbaseType shoulderSubbaseType, bool blnInsertLeft) { //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Expected O, but got Unknown if (rwState == null) { throw new ArgumentNullException("rwState"); } if (Versioned.IsNumeric(strShoulderSlope)) { return(Conversion.Val(strShoulderSlope) / 100.0); } ObjectId alignmentId = (!(rwState.CurrentAlignmentIsOffsetAlignment & rwState.CurrentAssemblyOffsetIsFixed)) ? rwState.CurrentAlignmentId : rwState.CurrentBaselineId; Alignment alignment = HostApplicationServices.WorkingDatabase.TransactionManager.GetObject(alignmentId, 0, false); string sTempSlope = Strings.UCase(strShoulderSlope); switch (shoulderSubbaseType) { case ShoulderSubbaseType.Shoulder: if (blnInsertLeft) { if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 2, true)); } if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 0, true)); } if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 3, true)); } if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 1, true)); } } else { if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 258, true)); } if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 256, true)); } if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 259, true)); } if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 257, true)); } } break; case ShoulderSubbaseType.Subbase: if (blnInsertLeft) { if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 2, true)); } if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 0, true)); } if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 3, true)); } if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 1, true)); } } else { if (Operators.CompareString(sTempSlope, "SI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 258, true)); } if (Operators.CompareString(sTempSlope, "SO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 256, true)); } if (Operators.CompareString(sTempSlope, "LI", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 259, true)); } if (Operators.CompareString(sTempSlope, "LO", TextCompare: false) == 0) { return(alignment.GetCrossSlopeAtStation(rwState.CurrentStation, 257, true)); } } break; } double GetSlope = default(double); return(GetSlope); }