private BoneInfo[] played_boneInfos; //tu wrzucac wszystko i tym sterowac caloscia #endregion Fields #region Constructors /// <summary> /// Constructor for the animation player. It makes the /// association between a clip and a model and sets up for playing /// </summary> /// <param name="clip"></param> public AnimationPlayer(Dictionary<String, AnimationClip> Clips, AnimatedModel model) { blendedBones = new AnimationClip.Bone[model.Bones.Count]; this.Clips = Clips; this.model = model; current_clip = Clips["Take 001"]; looping = true; // Create the bone information classes boneCnt = current_clip.Bones.Count; played_boneInfos = new BoneInfo[boneCnt]; for (int b = 0; b < played_boneInfos.Length; b++) { // Create it played_boneInfos[b] = new BoneInfo(current_clip.Bones[b]); // Assign it to a model bone played_boneInfos[b].SetModel(model); } Position = 0; }
public GameObject(Game game, Player player, String path) { this.player = player; this.messages = new List<Message>(); this.game = game; currentModel = new AnimatedModel(path); currentModel.LoadContent(game.Content); }
/// <summary> /// Assign this bone to the correct bone in the model /// </summary> /// <param name="model"></param> public void SetModel(AnimatedModel model) { // Find this bone assignedBone = model.FindBone(ClipBone.Name); }