![]() ![]() Example: 2 virtual float getScale() 3 4 5 float getScale() const V2.1 methods are still available,but they were tagged as deprecated.Īnd getters were also tagged as constin their declaration. 7 auto action = move->clone() Singletons use getInstance() and destroyInstance()Īll singletons use getInstance()and destroyInstance()(if applicable) to get and destroy the instance. ![]() If you use it,it will compile,but the code will crash.ġ // v2.1 2 CCMoveBy *action = ( CCMoveBy*) move->copy() 3action->autorelease() 4 5 // v3.0 6 // No need to do autorelease,no need to do casting. 对于类的使用改变: 2dx-3.0 两也不用使用using coco2d namespace clone() instead of copy()Ĭlone()returns an autoreleased version of the copy.Ĭopy()is no longer supported. The old values can still be used,but are not deprecated. See ActionsTest.cpp for more examples MenuItemsupports std::functionas callbacks 强大枚举类型更新: Examples: v2.1 重要更新内容: Replace Objective-C patters with C++ (C++11) patterns and best practices Improve Labels Improve renderer 其中C++ 11 新特性:Ī subset of C++11 features are being used in cocos2d-x: std::function,including lambda objects for callbacks strongly typed enums,for most of the cocos2d-x enums and constants std::threadfor threading overrIDecontext keyword,for overrIDen methods st std::function CallFunccan be created with an std::function CallFuncNcan be created with an std::function CallFuncNDand CallFuncOwere removed since it can be created with simulated with CallFuncNand CallFunc. ![]() For AndroID ndk-r8e or newer is required. 运行环境需求: AndroID 2.3 or newer iOS 5.0 or newer OS X 10.7 or newer windows (which version?) linux Ubuntu 12.04 (or newer) 编译环境需求: Xcode 4.6 (for iOS or Mac) gcc 4.7 for linux or AndroID. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |