SkeletonDrawable constructor
SkeletonDrawable(
- Atlas atlas,
- SkeletonData skeletonData,
- bool _ownsAtlasAndSkeletonData
Constructs a new skeleton drawable from the given (possibly shared) Atlas and SkeletonData. If
the atlas and skeleton data are not shared, the drawable can take ownership by passing true for _ownsAtlasAndSkeletonData
.
In that case a call to dispose will also dispose the atlas and skeleton data.
Implementation
SkeletonDrawable(this.atlas, this.skeletonData, this._ownsAtlasAndSkeletonData) : _disposed = false {
_drawable = _bindings.spine_skeleton_drawable_create(skeletonData._data);
skeleton = Skeleton._(_bindings.spine_skeleton_drawable_get_skeleton(_drawable));
animationStateData = AnimationStateData._(_bindings.spine_skeleton_drawable_get_animation_state_data(_drawable));
animationState = AnimationState._(_bindings.spine_skeleton_drawable_get_animation_state(_drawable),
_bindings.spine_skeleton_drawable_get_animation_state_events(_drawable));
skeleton.updateWorldTransform();
}