Example #1
0
 public override void OnPlayableCreate(Playable playable)
 {
     base.OnPlayableCreate(playable);
     vmOperatePlayable = behaviour as VMOperateBehaviour;
     cinemachineCamera = vmOperatePlayable.cinemachineCamera;
     priority          = vmOperatePlayable.priority;
     roleData          = vmOperatePlayable.roleData;
     if (roleData != null)
     {
         roleObj = World.Instance.GetRoleObj(roleData);
     }
 }
    public static BehaviourExecuterBase GetVMOperateExecuter(MYPlayableBehaviour behaviour)
    {
        VMOperateBehaviour vmBehaviour = behaviour as VMOperateBehaviour;

        if (CreatVmOperateExecuter == null || vmBehaviour == null)
        {
            return(null);
        }
        BehaviourExecuterBase vmOperateExecuter = CreatVmOperateExecuter(vmBehaviour.operateType);

        if (vmOperateExecuter == null)
        {
            return(null);
        }
        vmOperateExecuter.behaviour = behaviour;
        return(vmOperateExecuter);
    }