示例#1
0
 /// <summary>
 /// Share an existing animation controller with this model
 /// </summary>
 /// <param name="controller"></param>
 public void SetSharedAnimationController(AnimationController controller)
 {
     if (controller == null)
     {
         throw new ArgumentNullException();
     }
     if (this.controller == controller)
     {
         return;
     }
     if (this.controller != null)
     {
         throw new InvalidOperationException("AnimationController already set");
     }
     if (controller.ModelData != this.modelData || (this.modelData == null && controller.ModelData == null))
     {
         throw new ArgumentException("ModelData mismatch");
     }
     controller.AddParnet(this);
     this.controller = controller;
 }