我用的是cocos2dx 3.2版本
1.直接文件創建
a:static Sprite* create(const std::string& filename);?
filename表示圖片的路徑
b:追蹤到? bool Sprite::initWithFile(const std::string& filename) ,沒啥好解釋的。
c:追蹤到? Texture2D * TextureCache::addImage(const std::string &path),涉及到了Texture2D這個紋理類了。