예제 #1
0
        public override NodeLink Connect(NodeInputPort inputPort, NodeOutputPort outputPort)
        {
            if (outputPort.Node.CanSetTime)
            {
                outputPort.Node.Playable.SetTime(0f);
            }

            if (States.At(inputPort.Index) == CurrentState)
            {
                outputPort.Node.Playable.Play();
            }
            else if (States.At(inputPort.Index) == NextState)
            {
                outputPort.Node.Playable.Play();
            }
            //else if (outputPort.Node.Playable.GetOutputCount() < 2)
            //{
            //    outputPort.Node.Playable.Pause();
            //}

            inputPort.Weight = inputPort.Weight;

            return(base.Connect(inputPort, outputPort));
        }
예제 #2
0
 public NodeLink Connect(NodeOutputPort outputPort, LayerBlendMode blendMode, float weight = 1f, AvatarMask mask       = null) => Connect(CreateInputPort(blendMode, weight, mask), outputPort);
예제 #3
0
 public NodeLink ConnectWithThreshold(NodeOutputPort outputPort, float threshold) => Connect(CreateInputPort(threshold), outputPort);