Singleton that handles the loading of the sprite frames.
More...
#include <CCSpriteFrameCache.h>
Singleton that handles the loading of the sprite frames.
It saves in a cache the sprite frames.
- Since
- v0.9
void addSpriteFrame |
( |
CCSpriteFrame * |
pobFrame, |
|
|
const char * |
pszFrameName |
|
) |
| |
Adds an sprite frame with a given name.
If the name already exists, then the contents of the old name will be replaced with the new one.
var addSpriteFrame |
( |
var |
pobFrame, |
|
|
var |
pszFrameName |
|
) |
| |
Adds an sprite frame with a given name.
If the name already exists, then the contents of the old name will be replaced with the new one.
local addSpriteFrame |
( |
local |
pobFrame, |
|
|
local |
pszFrameName |
|
) |
| |
Adds an sprite frame with a given name.
If the name already exists, then the contents of the old name will be replaced with the new one.
void addSpriteFramesWithFile |
( |
const char * |
pszPlist) | |
|
Adds multiple Sprite Frames from a plist file.
A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png If you want to use another texture, you should use the addSpriteFramesWithFile:texture method.
var addSpriteFrames |
( |
var |
pszPlist) | |
|
Adds multiple Sprite Frames from a plist file.
A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png If you want to use another texture, you should use the addSpriteFramesWithFile:texture method.
local addSpriteFramesWithFile |
( |
local |
pszPlist) | |
|
Adds multiple Sprite Frames from a plist file.
A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png If you want to use another texture, you should use the addSpriteFramesWithFile:texture method.
void addSpriteFramesWithFile |
( |
const char * |
plist, |
|
|
const char * |
textureFileName |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
- Since
- v0.99.5
var addSpriteFrames |
( |
var |
plist, |
|
|
var |
textureFileName |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
- Since
- v0.99.5
local addSpriteFramesWithFile |
( |
local |
plist, |
|
|
local |
textureFileName |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
- Since
- v0.99.5
void addSpriteFramesWithFile |
( |
const char * |
pszPlist, |
|
|
CCTexture2D * |
pobTexture |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
var addSpriteFrames |
( |
var |
pszPlist, |
|
|
var |
pobTexture |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
local addSpriteFramesWithFile |
( |
local |
pszPlist, |
|
|
local |
pobTexture |
|
) |
| |
Adds multiple Sprite Frames from a plist file.
The texture will be associated with the created sprite frames.
static void
purgeSharedSpriteFrameCache |
( |
void |
) | |
|
|
static |
Purges the cache.
It releases all the Sprite Frames and the retained instance.
var purgeSharedSpriteFrameCache |
( |
|
) | |
|
|
static |
Purges the cache.
It releases all the Sprite Frames and the retained instance.
local purgeSharedSpriteFrameCache |
( |
|
) | |
|
|
static |
Purges the cache.
It releases all the Sprite Frames and the retained instance.
void removeSpriteFrameByName |
( |
const char * |
pszName) | |
|
Deletes an sprite frame from the sprite frame cache.
var getSpriteFrame |
( |
var |
pszName) | |
|
Deletes an sprite frame from the sprite frame cache.
local removeSpriteFrameByName |
( |
local |
pszName) | |
|
Deletes an sprite frame from the sprite frame cache.
void removeSpriteFrames |
( |
void |
) | |
|
Purges the dictionary of loaded sprite frames.
Call this method if you receive the "Memory Warning". In the short term: it will free some resources preventing your app from being killed. In the medium term: it will allocate more resources. In the long term: it will be the same.
var removeSpriteFrames |
( |
|
) | |
|
Purges the dictionary of loaded sprite frames.
Call this method if you receive the "Memory Warning". In the short term: it will free some resources preventing your app from being killed. In the medium term: it will allocate more resources. In the long term: it will be the same.
local removeSpriteFrames |
( |
|
) | |
|
Purges the dictionary of loaded sprite frames.
Call this method if you receive the "Memory Warning". In the short term: it will free some resources preventing your app from being killed. In the medium term: it will allocate more resources. In the long term: it will be the same.
void removeSpriteFramesFromFile |
( |
const char * |
plist) | |
|
Removes multiple Sprite Frames from a plist file.
Sprite Frames stored in this file will be removed. It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.99.5
var removeSpriteFramesFromFile |
( |
var |
plist) | |
|
Removes multiple Sprite Frames from a plist file.
Sprite Frames stored in this file will be removed. It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.99.5
local removeSpriteFramesFromFile |
( |
local |
plist) | |
|
Removes multiple Sprite Frames from a plist file.
Sprite Frames stored in this file will be removed. It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.99.5
void removeSpriteFramesFromTexture |
( |
CCTexture2D * |
texture) | |
|
Removes all Sprite Frames associated with the specified textures.
It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.995.
var removeSpriteFramesFromTexture |
( |
var |
texture) | |
|
Removes all Sprite Frames associated with the specified textures.
It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.995.
local removeSpriteFramesFromTexture |
( |
local |
texture) | |
|
Removes all Sprite Frames associated with the specified textures.
It is convenient to call this method when a specific texture needs to be removed.
- Since
- v0.995.
void removeUnusedSpriteFrames |
( |
void |
) | |
|
Removes unused sprite frames.
Sprite Frames that have a retain count of 1 will be deleted. It is convenient to call this method after when starting a new Scene.
var removeUnusedSpriteFrames |
( |
|
) | |
|
Removes unused sprite frames.
Sprite Frames that have a retain count of 1 will be deleted. It is convenient to call this method after when starting a new Scene.
local removeUnusedSpriteFrames |
( |
|
) | |
|
Removes unused sprite frames.
Sprite Frames that have a retain count of 1 will be deleted. It is convenient to call this method after when starting a new Scene.
Returns the shared instance of the Sprite Frame cache.
Returns the shared instance of the Sprite Frame cache.
local sharedSpriteFrameCache |
( |
|
) | |
|
|
static |
Returns the shared instance of the Sprite Frame cache.
Returns an Sprite Frame that was previously added.
If the name is not found it will return nil. You should retain the returned copy if you are going to use it.
var getSpriteFrame |
( |
var |
pszName) | |
|
Returns an Sprite Frame that was previously added.
If the name is not found it will return nil. You should retain the returned copy if you are going to use it.
local spriteFrameByName |
( |
local |
pszName) | |
|
Returns an Sprite Frame that was previously added.
If the name is not found it will return nil. You should retain the returned copy if you are going to use it.
std::set<std::string>
* m_pLoadedFileNames |
|
protected |
var m_pSpriteFramesAliases |
|
protected |
local m_pSpriteFramesAliases |
|
protected |
The documentation for this class was generated from the following file: