美文网首页
cocos2d-js 缓存

cocos2d-js 缓存

作者: xpf2000 | 来源:发表于2017-10-10 10:53 被阅读40次

    一、纹理缓存

    二、精灵帧缓存

    cc.SpriteFrameCache
    方法列表:

    addSpriteFrame(frame, frameName)
    Adds an sprite frame with a given name.
    
     
    addSpriteFrames(url, texture)
    Adds multiple Sprite Frames from a plist or json file.
    
     
    getSpriteFrame(name)
    Returns an Sprite Frame that was previously added.
    
     
    removeSpriteFrameByName(name)
    Deletes an sprite frame from the sprite frame cache.
    
     
    removeSpriteFrames()
    Purges the dictionary of loaded sprite frames.
    
     
    removeSpriteFramesFromFile(url)
    Removes multiple Sprite Frames from a plist file.
    
     
    removeSpriteFramesFromTexture(texture)
    Removes all Sprite Frames associated with the specified textures.
    

    三、动画缓存

    相关文章

      网友评论

          本文标题:cocos2d-js 缓存

          本文链接:https://www.haomeiwen.com/subject/dshvyxtx.html