public void RenderSkeletalSprite(string sprite, string animation, Vector3 position, float frame, float rotation, float scale) { SkeletalSprite spr = dSkeletalSpriteDict[sprite]; spr.SetAnimation(dBoneAnimationDict[animation]); spr.GetBone("root").AddRotation(rotation); spr.GetBone("root").AddPosition(position); spr.UpdateSkeleton(frame); spr.RenderSkeleton(scale); }
public void LoadSkeletalSprite(String path, String skelName) { try { SkeletalSprite spr = new SkeletalSprite(); spr.LoadSkeleton(path, skelName); dSkeletalSpriteDict.Add(skelName, spr); } catch (ContentLoadException e) { dSkeletalSpriteDict.Add(skelName, null); CConsole.Instance.Print("Tried to load skeletal sprite " + skelName + " but failed, error " + e.ToString()); } }