CheckPlayableValidity() 정적인 개인적인 메소드

static private CheckPlayableValidity ( Playable playable, string name ) : bool
playable Playable
name string
리턴 bool
예제 #1
0
 /// <summary>
 ///   <para>Disconnects an input from a Playable.</para>
 /// </summary>
 /// <param name="right">Playable from which the input will be disconnected.</param>
 /// <param name="inputPort">Index of the input to disconnect.</param>
 /// <param name="target"></param>
 public static void Disconnect(Playable target, int inputPort)
 {
     if (!Playable.CheckPlayableValidity(target, "target") || !target.CheckInputBounds(inputPort))
     {
         return;
     }
     Playable.DisconnectInternal(target, inputPort);
 }
예제 #2
0
 /// <summary>
 ///   <para>Connects two Playables together.</para>
 /// </summary>
 /// <param name="source">Playable to be used as input.</param>
 /// <param name="target">Playable on which the input will be connected.</param>
 /// <param name="sourceOutputPort">Optional index of the output on the source Playable.</param>
 /// <param name="targetInputPort">Optional index of the input on the target Playable.</param>
 /// <returns>
 ///   <para>Returns false if the operation could not be completed.</para>
 /// </returns>
 public static bool Connect(Playable source, Playable target, int sourceOutputPort, int targetInputPort)
 {
     if (!Playable.CheckPlayableValidity(source, "source") && !Playable.CheckPlayableValidity(target, "target") || source != (Playable)null && !source.CheckInputBounds(sourceOutputPort, true) || !target.CheckInputBounds(targetInputPort, true))
     {
         return(false);
     }
     return(Playable.ConnectInternal(source, target, sourceOutputPort, targetInputPort));
 }
예제 #3
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);
 }
예제 #4
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);
 }
예제 #5
0
 /// <summary>
 ///   <para>Connects two Playables together.</para>
 /// </summary>
 /// <param name="source">Playable to be used as input.</param>
 /// <param name="target">Playable on which the input will be connected.</param>
 /// <param name="sourceOutputPort">Optional index of the output on the source Playable.</param>
 /// <param name="targetInputPort">Optional index of the input on the target Playable.</param>
 /// <returns>
 ///   <para>Returns false if the operation could not be completed.</para>
 /// </returns>
 public static bool Connect(Playable source, Playable target, int sourceOutputPort, int targetInputPort)
 {
     return((Playable.CheckPlayableValidity(source, "source") || Playable.CheckPlayableValidity(target, "target")) && (!(source != null) || source.CheckInputBounds(sourceOutputPort, true)) && target.CheckInputBounds(targetInputPort, true) && Playable.ConnectInternal(source, target, sourceOutputPort, targetInputPort));
 }