Пример #1
0
            public static NodeState TryGetState(Node node, Animation animation)
            {
                var node3D = node as Node3D;

                if (node3D != null)
                {
                    return(Node3DState.TryGetState(node3D, animation));
                }
                var widget = node as Widget;

                if (widget != null)
                {
                    return(WidgetState.TryGetState(widget, animation));
                }
                var point = node as DistortionMeshPoint;

                if (point != null)
                {
                    return(DistortionMeshPointState.TryGetState(point, animation));
                }
                var bone = node as Bone;

                if (bone != null)
                {
                    return(BoneState.TryGetState(bone, animation));
                }

                return(null);
            }
Пример #2
0
 public static NodeState TryGetState(Node node, Animation animation)
 {
     if (node is Node3D node3D)
     {
         return(Node3DState.TryGetState(node3D, animation));
     }
     if (node is Widget widget)
     {
         return(WidgetState.TryGetState(widget, animation));
     }
     if (node is DistortionMeshPoint point)
     {
         return(DistortionMeshPointState.TryGetState(point, animation));
     }
     if (node is Bone bone)
     {
         return(BoneState.TryGetState(bone, animation));
     }
     return(null);
 }