public void ReStart(Vector3 startPosition, Vector3 startDirection) { mRunMode = eRunMode.straight; transform.eulerAngles = startDirection; mDirection = startDirection; float startXPosition = 0f; switch (mTrack) { case eTrack.left: startXPosition = -2f * xTrackOffset; break; case eTrack.midLeft: startXPosition = -xTrackOffset; break; case eTrack.middle: startXPosition = 0f; break; case eTrack.midRight: startXPosition = xTrackOffset; break; case eTrack.right: startXPosition = 2f * xTrackOffset; break; default: break; } Vector3 currentP = transform.right * startXPosition + startPosition; transform.position = currentP; mSurplusChangeTime = 0f; }
public void RoundLeft(Vector3 center) { roundCenter = center; radius = Vector3.Distance(center, transform.position); mRunMode = eRunMode.roundLeft; }
/* public Rule_Context(IMemoryRegion currentModule) { this.Initialize(); }*/ private void Initialize() { this.RunMode = Rule_Context.eRunMode.Enter; this.PermanantVariables = new System.Collections.Specialized.NameValueCollection(); this.GlobalVariables = new System.Collections.Specialized.NameValueCollection(); this.StandardVariables = new Dictionary<string, string>(); this.SelectString = new StringBuilder(); this.SortExpression = new StringBuilder(); this.DataSet = new System.Data.DataSet(); this.ProgramText = new StringBuilder(); this.IsFirstStatement = false; }