public void SetAutoCloseMode(float joiningPointTime) { if (mState != "Reset") { return; } mEndPointsMode = eEndPointsMode.AUTOCLOSED; mNodes.Add(new SplineNode(mNodes[0] as SplineNode)); mNodes[mNodes.Count - 1].Time = joiningPointTime; Vector3 vInitDir = (mNodes[1].Point - mNodes[0].Point).normalized; Vector3 vEndDir = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).normalized; float firstLength = (mNodes[1].Point - mNodes[0].Point).magnitude; float lastLength = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).magnitude; SplineNode firstNode = new SplineNode(mNodes[0] as SplineNode); firstNode.Point = mNodes[0].Point + vEndDir * firstLength; SplineNode lastNode = new SplineNode(mNodes[mNodes.Count - 1] as SplineNode); lastNode.Point = mNodes[0].Point + vInitDir * lastLength; mNodes.Insert(0, firstNode); mNodes.Add(lastNode); }
public void SetAutoCloseMode(float joiningPointTime) { if (mState != "Reset") { throw new System.Exception("Cannot change mode after start"); } mEndPointsMode = eEndPointsMode.AUTOCLOSED; mNodes.Add(new SplineNode(mNodes[0] as SplineNode)); mNodes[mNodes.Count - 1].ArrivalTime = joiningPointTime; Vector3 vInitDir = (mNodes[1].Point - mNodes[0].Point).normalized; Vector3 vEndDir = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).normalized; float firstLength = (mNodes[1].Point - mNodes[0].Point).magnitude; float lastLength = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).magnitude; SplineNode firstNode = new SplineNode(mNodes[0] as SplineNode); firstNode.Point = mNodes[0].Point + vEndDir * firstLength; SplineNode lastNode = new SplineNode(mNodes[mNodes.Count - 1] as SplineNode); lastNode.Point = mNodes[0].Point + vInitDir * lastLength; mNodes.Insert(0, firstNode); mNodes.Add(lastNode); }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mRotations = false; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mRotations = false; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mRotations = eRotationMode.PATH_ANGLE; mEndPointsMode = eEndPointsMode.AUTO; }
void SetExplicitMode() { if (mState != "Reset") { return; } mEndPointsMode = eEndPointsMode.EXPLICIT; }
void SetExplicitMode() { if (mState != "Reset") { throw new System.Exception("Cannot change mode after start"); } mEndPointsMode = eEndPointsMode.EXPLICIT; }
public void Reset() { // // commented Debug.Log ("reset"); mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mRotations = false; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; // TODO: revert this mCurrentTime = 0.6f; mRotations = false; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; _rotates = false; _rotationLookAhead = 0; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { //Debug.Log(Time.realtimeSinceStartup + " " + this + " Reset"); mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mCurrentTimePlusDelta = 0; mTimeSinceLevelStart = 0; mStartTime = Time.realtimeSinceStartup; mRotations = false; mEndPointsMode = eEndPointsMode.AUTO; }
public void Reset() { mNodes.Clear(); mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mRotations = false; mRigidBody = false; //TODO this is not properly correct; mScaling = false; mEndPointsMode = eEndPointsMode.AUTO; }
void SetExplicitMode() { if (mState != "Reset") throw new System.Exception("Cannot change mode after start"); mEndPointsMode = eEndPointsMode.EXPLICIT; }
public void SetAutoCloseMode(float joiningPointTime) { if (mState != "Reset") throw new System.Exception("Cannot change mode after start"); mEndPointsMode = eEndPointsMode.AUTOCLOSED; mNodes.Add(new SplineNode(mNodes[0] as SplineNode)); mNodes[mNodes.Count - 1].ArrivalTime = joiningPointTime; Vector3 vInitDir = (mNodes[1].Point - mNodes[0].Point).normalized; Vector3 vEndDir = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).normalized; float firstLength = (mNodes[1].Point - mNodes[0].Point).magnitude; float lastLength = (mNodes[mNodes.Count - 2].Point - mNodes[mNodes.Count - 1].Point).magnitude; SplineNode firstNode = new SplineNode(mNodes[0] as SplineNode); firstNode.Point = mNodes[0].Point + vEndDir * firstLength; SplineNode lastNode = new SplineNode(mNodes[mNodes.Count - 1] as SplineNode); lastNode.Point = mNodes[0].Point + vInitDir * lastLength; mNodes.Insert(0, firstNode); mNodes.Add(lastNode); }
public void Reset() { mState = "Reset"; mCurrentIdx = 1; mCurrentTime = 0; mRotations = false; mLastNodeCallback = 0; mEndPointsMode = eEndPointsMode.AUTO; }