/// <summary>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances. /// </summary> /// <remarks>Constructs a new SpriterAbstractPlayer object which is able to animate SpriterBone instances and SpriterObject instances. /// </remarks> /// <param name="loader"> /// /// <see cref="FileLoader{I}">FileLoader<I> /// </see> /// which you have to implement on your own. /// </param> /// <param name="keyframes"> /// A list of SpriterKeyFrame arrays. See /// <see cref="SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity) /// ">SpriterKeyFrameProvider.generateKeyFramePool(com.discobeard.spriter.dom.SpriterData, com.discobeard.spriter.dom.Entity) /// </see> /// to get the list. /// Generate these keyframes once to save memory. /// </param> public SpriterAbstractPlayer(FileLoader loader, IList <SpriterAnimation> animations) { this.loader = loader; this.animations = animations; this.rootParent = new SpriterBone(); this.tempParent = new SpriterBone(); this.rootParent.setName("playerRoot"); this.tempParent.setName("playerRoot"); this.lastFrame = new SpriterKeyFrame(); this.lastTempFrame = new SpriterKeyFrame(); this.interpolator = SpriterLinearInterpolator .interpolator; this.players = new List <SpriterAbstractPlayer>(); rect = new SpriterRectangle(0, 0, 0, 0); }
public SpriterBone() { this.childBones = new List <SpriterBone>(); this.childObjects = new List <SpriterObject>(); this.boundingBox = new Com.Brashmonkey.Spriter.SpriterRectangle(0, 0, 0, 0); }