예제 #1
0
 // Factory method that generates a playable based on this asset
 public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
 {
     return(RoleFaceAnimBehaviour.CreatePlayable(
                graph
                , LeftEyeIndex
                , RightEyeIndex
                , MouthIndex
                , speed
                , faceSeq
                ));
 }
예제 #2
0
    public static Playable CreatePlayable(
        PlayableGraph graph,
        int le,
        int re,
        int m,
        float speed,
        FaceSetting[] seq)
    {
        var playable = ScriptPlayable <RoleFaceAnimBehaviour> .Create(graph);

        RoleFaceAnimBehaviour behaviour = playable.GetBehaviour();

        behaviour.LeftEyeIndex  = le;
        behaviour.RightEyeIndex = re;
        behaviour.MouthIndex    = m;
        behaviour.faceSeq       = seq;
        behaviour.speed         = Mathf.Max(0.1f, speed);
        return(playable);
    }