Exemple #1
0
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.Experimental.Director.AnimationPlayable o;
         if (argc == 1)
         {
             o = new UnityEngine.Experimental.Director.AnimationPlayable();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 2)
         {
             System.Boolean a1;
             checkType(l, 2, out a1);
             o = new UnityEngine.Experimental.Director.AnimationPlayable(a1);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #2
0
 static public int RemoveInput(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(UnityEngine.Experimental.Director.AnimationPlayable)))
         {
             UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
             UnityEngine.Experimental.Director.AnimationPlayable a1;
             checkType(l, 2, out a1);
             var ret = self.RemoveInput(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         else if (matchType(l, argc, 2, typeof(int)))
         {
             UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
             System.Int32 a1;
             checkType(l, 2, out a1);
             var ret = self.RemoveInput(a1);
             pushValue(l, true);
             pushValue(l, ret);
             return(2);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public static int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.Experimental.Director.AnimationPlayable o;
         if(argc==1){
             o=new UnityEngine.Experimental.Director.AnimationPlayable();
             pushValue(l,true);
             pushValue(l,o);
             return 2;
         }
         else if(argc==2){
             System.Boolean a1;
             checkType(l,2,out a1);
             o=new UnityEngine.Experimental.Director.AnimationPlayable(a1);
             pushValue(l,true);
             pushValue(l,o);
             return 2;
         }
         return error(l,"New object failed.");
     }
     catch(Exception e) {
         return error(l,e);
     }
 }
 /// <summary>
 ///   <para>Sets an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">AnimationPlayable to be used as input.</param>
 /// <param name="index">Index of the input.</param>
 /// <returns>
 ///   <para>Returns false if the operation could not be completed.</para>
 /// </returns>
 public virtual bool SetInput(AnimationPlayable source, int index)
 {
   if (!this.CheckInputBounds(index))
     return false;
   if (this.GetInputs()[index] != (Playable) null)
     Playable.Disconnect((Playable) this, index);
   return Playable.Connect((Playable) source, (Playable) this, -1, index);
 }
 /// <summary>
 ///   <para>Automatically creates an AnimationClipPlayable for each supplied AnimationClip, then sets them as inputs to the mixer.</para>
 /// </summary>
 /// <param name="clips">AnimationClips to be used as inputs.</param>
 /// <returns>
 ///   <para>Returns false if the creation of the AnimationClipPlayables failed, or if the connection failed.</para>
 /// </returns>
 public bool SetInputs(AnimationClip[] clips)
 {
   if (clips == null)
     throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
   AnimationPlayable[] animationPlayableArray = new AnimationPlayable[clips.Length];
   for (int index = 0; index < clips.Length; ++index)
     animationPlayableArray[index] = (AnimationPlayable) new AnimationClipPlayable(clips[index]);
   return this.SetInputs((IEnumerable<AnimationPlayable>) animationPlayableArray);
 }
 public virtual bool SetInput(AnimationPlayable source, int index)
 {
     if (!base.CheckInputBounds(index))
     {
         return false;
     }
     if (base.GetInputs()[index] != null)
     {
         Playable.Disconnect(this, index);
     }
     return Playable.Connect(source, this, -1, index);
 }
Exemple #7
0
 /// <summary>
 ///   <para>Sets an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">AnimationPlayable to be used as input.</param>
 /// <param name="index">Index of the input.</param>
 /// <returns>
 ///   <para>Returns false if the operation could not be completed.</para>
 /// </returns>
 public virtual bool SetInput(AnimationPlayable source, int index)
 {
     if (!this.CheckInputBounds(index))
     {
         return(false);
     }
     if (this.GetInputs()[index] != (Playable)null)
     {
         Playable.Disconnect((Playable)this, index);
     }
     return(Playable.Connect((Playable)source, (Playable)this, -1, index));
 }
 static public int get_handle(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.handle);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable o;
         o = new UnityEngine.Experimental.Director.AnimationPlayable();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #10
0
 /// <summary>
 ///   <para>Automatically creates an AnimationClipPlayable for each supplied AnimationClip, then sets them as inputs to the mixer.</para>
 /// </summary>
 /// <param name="clips">AnimationClips to be used as inputs.</param>
 /// <returns>
 ///   <para>Returns false if the creation of the AnimationClipPlayables failed, or if the connection failed.</para>
 /// </returns>
 public bool SetInputs(AnimationClip[] clips)
 {
     if (clips == null)
     {
         throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
     }
     AnimationPlayable[] animationPlayableArray = new AnimationPlayable[clips.Length];
     for (int index = 0; index < clips.Length; ++index)
     {
         animationPlayableArray[index] = (AnimationPlayable) new AnimationClipPlayable(clips[index]);
     }
     return(this.SetInputs((IEnumerable <AnimationPlayable>)animationPlayableArray));
 }
 public bool SetInputs(AnimationClip[] clips)
 {
     if (clips == null)
     {
         throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
     }
     AnimationPlayable[] sources = new AnimationPlayable[clips.Length];
     for (int i = 0; i < clips.Length; i++)
     {
         sources[i] = new AnimationClipPlayable(clips[i]);
     }
     return base.SetInputs(sources);
 }
 /// <summary>
 ///   <para>Sets an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">AnimationPlayable to be used as input.</param>
 /// <param name="index">Index of the input.</param>
 /// <returns>
 ///   <para>Returns false if the operation could not be completed.</para>
 /// </returns>
 public virtual bool SetInput(AnimationPlayable source, int index)
 {
     if (!base.CheckInputBounds(index))
     {
         return(false);
     }
     Playable[] inputs = base.GetInputs();
     if (inputs[index] != null)
     {
         Playable.Disconnect(this, index);
     }
     return(Playable.Connect(source, this, -1, index));
 }
 /// <summary>
 ///   <para>Automatically creates an AnimationClipPlayable for each supplied AnimationClip, then sets them as inputs to the mixer.</para>
 /// </summary>
 /// <param name="clips">AnimationClips to be used as inputs.</param>
 /// <returns>
 ///   <para>Returns false if the creation of the AnimationClipPlayables failed, or if the connection failed.</para>
 /// </returns>
 public bool SetInputs(AnimationClip[] clips)
 {
     if (clips == null)
     {
         throw new NullReferenceException("Parameter clips was null. You need to pass in a valid array of clips.");
     }
     AnimationPlayable[] array = new AnimationPlayable[clips.Length];
     for (int i = 0; i < clips.Length; i++)
     {
         array[i] = new AnimationClipPlayable(clips[i]);
     }
     return(base.SetInputs(array));
 }
Exemple #14
0
 static public int RemoveAllInputs(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
         var ret = self.RemoveAllInputs();
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_handle(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
         UnityEngine.Experimental.Director.PlayableHandle    v;
         checkValueType(l, 2, out v);
         self.handle = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #16
0
 static public int AddInput(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
         UnityEngine.Experimental.Director.AnimationPlayable a1;
         checkType(l, 2, out a1);
         var ret = self.AddInput(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #17
0
 static public int SetInputs(IntPtr l)
 {
     try {
         UnityEngine.Experimental.Director.AnimationPlayable self = (UnityEngine.Experimental.Director.AnimationPlayable)checkSelf(l);
         System.Collections.Generic.IEnumerable <UnityEngine.Experimental.Director.AnimationPlayable> a1;
         checkType(l, 2, out a1);
         var ret = self.SetInputs(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 public virtual bool RemoveInput(AnimationPlayable playable)
 {
     if (Playable.CheckPlayableValidity(playable, "playable"))
     {
         Playable[] inputs = base.GetInputs();
         for (int i = 0; i < inputs.Length; i++)
         {
             if (inputs[i] == playable)
             {
                 Playable.Disconnect(this, i);
                 return true;
             }
         }
     }
     return false;
 }
Exemple #19
0
 public virtual bool RemoveInput(AnimationPlayable playable)
 {
     if (Playable.CheckPlayableValidity(playable, "playable"))
     {
         Playable[] inputs = base.GetInputs();
         for (int i = 0; i < inputs.Length; i++)
         {
             if (inputs[i] == playable)
             {
                 Playable.Disconnect(this, i);
                 return(true);
             }
         }
     }
     return(false);
 }
Exemple #20
0
 /// <summary>
 ///   <para>Removes a playable from the list of inputs.</para>
 /// </summary>
 /// <param name="index">Index of the playable to remove.</param>
 /// <param name="playable">AnimationPlayable to remove.</param>
 /// <returns>
 ///   <para>Returns false if the removal could not be removed because it wasn't found.</para>
 /// </returns>
 public virtual bool RemoveInput(AnimationPlayable playable)
 {
     if (!Playable.CheckPlayableValidity((Playable)playable, "playable"))
     {
         return(false);
     }
     Playable[] inputs = this.GetInputs();
     for (int inputPort = 0; inputPort < inputs.Length; ++inputPort)
     {
         if (inputs[inputPort] == (Playable)playable)
         {
             Playable.Disconnect((Playable)this, inputPort);
             return(true);
         }
     }
     return(false);
 }
Exemple #21
0
        public virtual bool SetInputs(IEnumerable <AnimationPlayable> sources)
        {
            int length = base.GetInputs().Length;

            for (int i = 0; i < length; i++)
            {
                Playable.Disconnect(this, i);
            }
            bool flag            = false;
            int  targetInputPort = 0;
            IEnumerator <AnimationPlayable> enumerator = sources.GetEnumerator();

            try
            {
                while (enumerator.MoveNext())
                {
                    AnimationPlayable current = enumerator.Current;
                    if (targetInputPort < length)
                    {
                        flag |= Playable.Connect(current, this, -1, targetInputPort);
                    }
                    else
                    {
                        flag |= Playable.Connect(current, this, -1, -1);
                    }
                    base.SetInputWeight(targetInputPort, 1f);
                    targetInputPort++;
                }
            }
            finally
            {
                if (enumerator == null)
                {
                }
                enumerator.Dispose();
            }
            for (int j = targetInputPort; j < length; j++)
            {
                base.SetInputWeight(j, 0f);
            }
            return(flag);
        }
 internal static bool RemoveInputValidated(AnimationPlayable target, int index, System.Type typeofTarget)
 {
     return target.RemoveInput(index);
 }
 public override int AddInput(AnimationPlayable source)
 {
     Debug.LogError((object)"AnimationClipPlayable doesn't support adding inputs");
     return(-1);
 }
 internal static bool SetInputsValidated(AnimationPlayable target, IEnumerable<Playable> sources, System.Type typeofTarget)
 {
     return target.SetInputs(sources);
 }
 internal static bool RemoveInputValidated(AnimationPlayable target, Playable playable, System.Type typeofTarget)
 {
     return target.RemoveInput(playable);
 }
 public virtual int AddInput(AnimationPlayable source)
 {
     Playable.Connect(source, this, -1, -1);
     return (base.GetInputs().Length - 1);
 }
 /// <summary>
 ///   <para>Adds an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">A playable to connect.</param>
 /// <returns>
 ///   <para>Returns the index of the port the playable was connected to.</para>
 /// </returns>
 public virtual int AddInput(AnimationPlayable source)
 {
   Playable.Connect((Playable) source, (Playable) this, -1, -1);
   return this.GetInputs().Length - 1;
 }
 internal static bool RemoveInputValidated(AnimationPlayable target, int index, System.Type typeofTarget)
 {
     return(target.RemoveInput(index));
 }
 internal static bool RemoveAllInputsValidated(AnimationPlayable target, System.Type typeofTarget)
 {
     return target.RemoveAllInputs();
 }
 internal static bool SetInputsValidated(AnimationPlayable target, IEnumerable <Playable> sources, System.Type typeofTarget)
 {
     return(target.SetInputs(sources));
 }
 internal static bool RemoveInputValidated(AnimationPlayable target, Playable playable, System.Type typeofTarget)
 {
     return(target.RemoveInput(playable));
 }
 internal static bool SetInputValidated(AnimationPlayable target, Playable source, int index, System.Type typeofTarget)
 {
     return(target.SetInput(source, index));
 }
 /// <summary>
 ///   <para>Adds an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">A playable to connect.</param>
 /// <returns>
 ///   <para>Returns the index of the port the playable was connected to.</para>
 /// </returns>
 public virtual int AddInput(AnimationPlayable source)
 {
     Playable.Connect(source, this, -1, -1);
     Playable[] inputs = base.GetInputs();
     return(inputs.Length - 1);
 }
 internal static int AddInputValidated(AnimationPlayable target, Playable input, System.Type typeofTarget)
 {
     return(target.AddInput(input));
 }
 public override bool SetInput(AnimationPlayable source, int index)
 {
     Debug.LogError((object)"AnimationClipPlayable doesn't support setting inputs");
     return(false);
 }
 internal static bool RemoveAllInputsValidated(AnimationPlayable target, System.Type typeofTarget)
 {
     return(target.RemoveAllInputs());
 }
 public override bool RemoveInput(AnimationPlayable playable)
 {
     Debug.LogError((object)"AnimationClipPlayable doesn't support removing inputs");
     return(false);
 }
 internal static int AddInputValidated(AnimationPlayable target, Playable input, System.Type typeofTarget)
 {
     return target.AddInput(input);
 }
Exemple #39
0
 /// <summary>
 ///   <para>Adds an AnimationPlayable as an input.</para>
 /// </summary>
 /// <param name="source">A playable to connect.</param>
 /// <returns>
 ///   <para>Returns the index of the port the playable was connected to.</para>
 /// </returns>
 public virtual int AddInput(AnimationPlayable source)
 {
     Playable.Connect((Playable)source, (Playable)this, -1, -1);
     return(this.GetInputs().Length - 1);
 }
 internal static bool SetInputValidated(AnimationPlayable target, Playable source, int index, System.Type typeofTarget)
 {
     return target.SetInput(source, index);
 }
 public override int AddInput(AnimationPlayable source)
 {
     Debug.LogError("AnimationClipPlayable doesn't support adding inputs");
     return -1;
 }
 public override bool RemoveInput(AnimationPlayable playable)
 {
     Debug.LogError("AnimationClipPlayable doesn't support removing inputs");
     return false;
 }
 public override bool SetInput(AnimationPlayable source, int index)
 {
     Debug.LogError("AnimationClipPlayable doesn't support setting inputs");
     return false;
 }
 /// <summary>
 ///   <para>Removes a playable from the list of inputs.</para>
 /// </summary>
 /// <param name="index">Index of the playable to remove.</param>
 /// <param name="playable">AnimationPlayable to remove.</param>
 /// <returns>
 ///   <para>Returns false if the removal could not be removed because it wasn't found.</para>
 /// </returns>
 public virtual bool RemoveInput(AnimationPlayable playable)
 {
   if (!Playable.CheckPlayableValidity((Playable) playable, "playable"))
     return false;
   Playable[] inputs = this.GetInputs();
   for (int inputPort = 0; inputPort < inputs.Length; ++inputPort)
   {
     if (inputs[inputPort] == (Playable) playable)
     {
       Playable.Disconnect((Playable) this, inputPort);
       return true;
     }
   }
   return false;
 }