Example #1
0
 static public int reverse_s(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Vector3[] a1;
         checkArray(l, 1, out a1);
         var ret = LTUtility.reverse(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #2
0
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         LTUtility o;
         o = new LTUtility();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #3
0
    /**
     * Set the direction of a tween -1f for backwards 1f for forwards (currently only bezier and spline paths are supported)
     * @method setDirection
     * @param {float} direction:float the direction that the tween should run, -1f for backwards 1f for forwards
     * @return {LTDescr} LTDescr an object that distinguishes the tween
     * @example
     * LeanTween.moveSpline(gameObject, new Vector3[]{new Vector3(0f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,0f),new Vector3(1f,0f,1f)}, 1.5f).setDirection(-1f);<br>
     */

    public LTDescr setDirection(float direction)
    {
        if (this.direction != -1f && this.direction != 1f)
        {
            Debug.LogWarning("You have passed an incorrect direction of '" + direction + "', direction must be -1f or 1f");
            return(this);
        }

        if (this.direction != direction)
        {
            // Debug.Log("reverse path:"+this.path+" spline:"+this.spline+" hasInitiliazed:"+this.hasInitiliazed);
            if (this.hasInitiliazed)
            {
                this.direction = direction;
            }
            else
            {
                if (this.path != null)
                {
                    this.path = new LTBezierPath(LTUtility.reverse(this.path.pts));
                }
                else if (this.spline != null)
                {
                    this.spline = new LTSpline(LTUtility.reverse(this.spline.pts));
                }
                // this.passed = this.time - this.passed;
            }
        }

        return(this);
    }
Example #4
0
 public override void Select()
 {
     if (!_taiChiVoiceInput.IsRecording)
     {
         LTUtility.ButtonClickWobble(this.gameObject);
         rend.material.color = _highlightColor;
         _taiChiVoiceInput.StartRecording();
     }
 }
Example #5
0
 static public int constructor(IntPtr l)
 {
     try {
         LTUtility o;
         o = new LTUtility();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #6
0
 static public int reverse_s(IntPtr l)
 {
     try {
         UnityEngine.Vector3[] a1;
         checkArray(l, 1, out a1);
         var ret = LTUtility.reverse(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #7
0
 public virtual void Select()
 {
     FMODUnity.RuntimeManager.PlayOneShot("event:/main/ui_sound_gamelan", transform.position);
     LTUtility.ButtonClickWobble(this.gameObject);
 }