// Use this for initialization
 void Awake()
 {
     instance = this;
     vecMove = new TimedVector3 ();
     vecLook = new TimedVector3 ();
     lastMoveEndTime = 0;
     lastLookEndTime = 0;
 }
Exemple #2
0
    public override Vector2 RelativeLerp(TimedValue <Vector2> otherRef, float time)
    {
        Vector3 lerpedVec = TimedVector3.Lerp(this.Value,
                                              this.Timestamp,
                                              otherRef.Value,
                                              otherRef.Timestamp,
                                              time);

        return((Vector2)lerpedVec);
    }
Exemple #3
0
/*AUTO SCRIPT*/
/*AUTO SCRIPT*/
/*AUTO SCRIPT*/
/*AUTO SCRIPT*/ public void Invoke(TimedVector3 val)
/*AUTO SCRIPT*/ {
/*AUTO SCRIPT*/ if (debug)
            {
/*AUTO SCRIPT*/ Debug.Log($"{name} event invoked: {val}");
            }
/*AUTO SCRIPT*/ ahoyEvent.Invoke(val);
/*AUTO SCRIPT*/            //important to do this incase a listener removes its self from the list
/*AUTO SCRIPT*/ unityEventListeners.ToArray().ForEach(l => l.Invoke(val));
/*AUTO SCRIPT*/ assetEventListeners.ToArray().ForEach(l => l.Invoke(val));
/*AUTO SCRIPT*/ }
Exemple #4
0
    public override Quaternion RelativeLerp(TimedValue <Quaternion> otherRef, float time)
    {
        Vector3 thisEuler  = this.Value.eulerAngles;
        Vector3 otherEuler = otherRef.Value.eulerAngles;

        Vector3 lerpedVec = TimedVector3.Lerp(thisEuler,
                                              this.Timestamp,
                                              otherEuler,
                                              otherRef.Timestamp,
                                              time);

        return(Quaternion.Euler(lerpedVec));
    }
Exemple #5
0
/*AUTO SCRIPT*/
/*AUTO SCRIPT*/ public void Push(TimedVector3 val)
/*AUTO SCRIPT*/ {
/*AUTO SCRIPT*/ array.Push(val);
/*AUTO SCRIPT*/ Invoke();
/*AUTO SCRIPT*/ }
/*AUTO SCRIPT*/ public void Log(TimedVector3 val)
        {
/*AUTO SCRIPT*/ Debug.Log($"{prefix}: {val}");
/*AUTO SCRIPT*/ }