forked from cocos2d/cocos2d-objc
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CCSpriteFrameCache & CCAnimationCache Support. #9
Labels
Comments
psineur
added a commit
that referenced
this issue
Jan 28, 2012
psineur
added a commit
that referenced
this issue
Jan 28, 2012
psineur
added a commit
that referenced
this issue
Jan 28, 2012
psineur
added a commit
that referenced
this issue
Jan 28, 2012
psineur
added a commit
that referenced
this issue
Jan 28, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CCAnimate retains given CCAnimation instead of copying it.
Also CCAnimation retains CCSpriteFrames, instead of copying them.
This saves memory.
So if you have 50 sprites and they share the same Animatiom from CCAnimationCache - their frames will be saved & loaded independently.
As well as spriteFrames.
So here's the plan:
If it doesnt exist - save it in cache on load.
If it exist - always use cached version. But check for equality and log any inequality between cached and curLoading version.
This approach will give us ability to load only used parts of CCAnimationCache & CCSpriteFramesCache & reuse CCAnimations & CCSpriteFrames without using a lot of memory for the same objects.
Also it can speed up loading process.
The text was updated successfully, but these errors were encountered: