Esempio n. 1
0
    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);
    }
Esempio n. 3
0
 public void Reset()
 {
     mNodes.Clear();
     mState         = "Reset";
     mCurrentIdx    = 1;
     mCurrentTime   = 0;
     mEndPointsMode = eEndPointsMode.AUTO;
 }
Esempio n. 4
0
 public void Reset()
 {
     mNodes.Clear();
     mState         = "Reset";
     mCurrentIdx    = 1;
     mRotations     = false;
     mEndPointsMode = eEndPointsMode.AUTO;
 }
Esempio n. 5
0
	public void Reset()
	{
		mNodes.Clear();
		mState = "Reset";
		mCurrentIdx = 1;
		mCurrentTime = 0;
		mRotations = false;
		mEndPointsMode = eEndPointsMode.AUTO;
	}
Esempio n. 6
0
 public void Reset()
 {
     mNodes.Clear();
     mState         = "Reset";
     mCurrentIdx    = 1;
     mCurrentTime   = 0;
     mRotations     = eRotationMode.PATH_ANGLE;
     mEndPointsMode = eEndPointsMode.AUTO;
 }
Esempio n. 7
0
    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;
    }
Esempio n. 9
0
    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;
 }
Esempio n. 11
0
    public void Reset()
    {
        mNodes.Clear();
        mState       = "Reset";
        mCurrentIdx  = 1;
        mCurrentTime = 0;

        _rotates           = false;
        _rotationLookAhead = 0;

        mEndPointsMode = eEndPointsMode.AUTO;
    }
Esempio n. 12
0
 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;
 }
Esempio n. 14
0
    void SetExplicitMode()
    {
        if (mState != "Reset")
            throw new System.Exception("Cannot change mode after start");

        mEndPointsMode = eEndPointsMode.EXPLICIT;
    }
Esempio n. 15
0
    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);
    }
Esempio n. 16
0
 public void Reset()
 {
     mState = "Reset";
     mCurrentIdx = 1;
     mCurrentTime = 0;
     mRotations = false;
     mLastNodeCallback = 0;
     mEndPointsMode = eEndPointsMode.AUTO;
 }
Esempio n. 17
0
 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;
 }