-------------------------------- -- @module SpriteFrameCache -- @extend Ref -- @parent_module cc -------------------------------- -- -- @function [parent=#SpriteFrameCache] reloadTexture -- @param self -- @param #string plist -- @return bool#bool ret (return value: bool) -------------------------------- -- Adds multiple Sprite Frames from a plist file content. The texture will be associated with the created sprite frames.
-- js NA
-- lua addSpriteFrames
-- param plist_content Plist file content string.
-- param texture Texture pointer. -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFileContent -- @param self -- @param #string plist_content -- @param #cc.Texture2D texture -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- 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.
-- param frame A certain sprite frame.
-- param frameName The name of the sprite frame. -- @function [parent=#SpriteFrameCache] addSpriteFrame -- @param self -- @param #cc.SpriteFrame frame -- @param #string frameName -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- @overload self, string, string -- @overload self, string -- @overload self, string, cc.Texture2D -- @function [parent=#SpriteFrameCache] addSpriteFramesWithFile -- @param self -- @param #string plist -- @param #cc.Texture2D texture -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- 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.
-- js getSpriteFrame
-- lua getSpriteFrame
-- param name A certain sprite frame name.
-- return The sprite frame. -- @function [parent=#SpriteFrameCache] getSpriteFrameByName -- @param self -- @param #string name -- @return SpriteFrame#SpriteFrame ret (return value: cc.SpriteFrame) -------------------------------- -- 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
-- param plist The name of the plist that needs to removed. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFile -- @param self -- @param #string plist -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Initialize method.
-- return if success return true. -- @function [parent=#SpriteFrameCache] init -- @param self -- @return bool#bool ret (return value: bool) -------------------------------- -- 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. -- @function [parent=#SpriteFrameCache] removeSpriteFrames -- @param self -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- 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.
-- js NA -- @function [parent=#SpriteFrameCache] removeUnusedSpriteFrames -- @param self -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Removes multiple Sprite Frames from a plist file content.
-- Sprite Frames stored in this file will be removed.
-- It is convenient to call this method when a specific texture needs to be removed.
-- param plist_content The string of the plist content that needs to removed.
-- js NA -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromFileContent -- @param self -- @param #string plist_content -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Deletes an sprite frame from the sprite frame cache.
-- param name The name of the sprite frame that needs to removed. -- @function [parent=#SpriteFrameCache] removeSpriteFrameByName -- @param self -- @param #string name -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Check if multiple Sprite Frames from a plist file have been loaded.
-- js NA
-- lua NA
-- param plist Plist file name.
-- return True if the file is loaded. -- @function [parent=#SpriteFrameCache] isSpriteFramesWithFileLoaded -- @param self -- @param #string plist -- @return bool#bool ret (return value: bool) -------------------------------- -- 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.
-- param texture The texture that needs to removed. -- @function [parent=#SpriteFrameCache] removeSpriteFramesFromTexture -- @param self -- @param #cc.Texture2D texture -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Destroys the cache. It releases all the Sprite Frames and the retained instance.
-- js NA -- @function [parent=#SpriteFrameCache] destroyInstance -- @param self -- @return SpriteFrameCache#SpriteFrameCache self (return value: cc.SpriteFrameCache) -------------------------------- -- Returns the shared instance of the Sprite Frame cache.
-- return The instance of the Sprite Frame Cache.
-- js NA -- @function [parent=#SpriteFrameCache] getInstance -- @param self -- @return SpriteFrameCache#SpriteFrameCache ret (return value: cc.SpriteFrameCache) return nil