From 11d9f27c00a789bd431586946e859ce1fee0dc2b Mon Sep 17 00:00:00 2001 From: yangxiao Date: Fri, 5 Dec 2014 16:11:14 +0800 Subject: [PATCH] createAsync comment --- cocos/3d/CCSprite3D.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cocos/3d/CCSprite3D.h b/cocos/3d/CCSprite3D.h index 3503ba51fc..5e854c75be 100644 --- a/cocos/3d/CCSprite3D.h +++ b/cocos/3d/CCSprite3D.h @@ -57,9 +57,12 @@ public: static Sprite3D* create(const std::string &modelPath, const std::string &texturePath); /* create 3d sprite asynchronously - * If the 3d model was not previously loaded, it will create a new 3d sprite and it will return it. - * Otherwise it will load the model file in a new thread, and when the 3d sprite is loaded, the callback will be called with the Sprite3D as a parameter. + * If the 3d model was previously loaded, it will create a new 3d sprite and the callback will be called at once. + * Otherwise it will load the model file in a new thread, and when the 3d sprite is loaded, the callback will be called with the created Sprite3D and a userdefined parameter. * The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback. + * @param modelPath model to be loaded + * @param callback callback after loading + * @param callbackparam user defined parameter for the callback */ static void createAsync(const std::string &modelPath, const std::function& callback, void* callbackparam);