cocos2d::ui::Button
Instead of cocos2d::MenuItemSprite , you can use cocos2d::ui::Button when you need to specify an action/event other than the button press released.
Continue readingEverything should be made as simple as possible, but not simpler – Einstein
Instead of cocos2d::MenuItemSprite , you can use cocos2d::ui::Button when you need to specify an action/event other than the button press released.
Continue readingfrom: Cocos2d-x Cookbook by Akihito Matsuura (Packt Publishing, 2015) With Bitmap font label, each character sprite can be accessed via
Continue readingTo pause a game scene, cocos2d::Director::pushScene can be used. The old scene would be suspended and when the new scene is popped
Continue readingIn constructor: _variable= Node::create(); _variable->retain(); In destructor: CC_SAFE_RELEASE(_variable);
Continue readingfrom: Cocos2d-x Cookbook by Akihito Matsuura (Packt Publishing, 2015) By extending Director class and adding two methods, previousScene and popScene, we can
Continue readingcocos2d::StringUtils::toString method can generate std::string value from variety of values int i= 100; std::string int_string= cocos2d::StringUtils::toString(i); CCLOG(“%s”, int_string.c_str()); float j= 123.4f;
Continue readingfrom: http://discuss.cocos2d-x.org/t/why-use-cocos2d-vector-instead-of-std-vector/14527 cocos2d::Vector has the limitation that the objects added to it must have cocos2d::Ref as a base class. The benefit
Continue readingfrom: http://discuss.cocos2d-x.org/t/any-differences-between-vec2-and-point-in-cocos2d-x3-2/15612 Point was refactored to Vector2 and then Vec2. However, Because Point was already wide-spread, it was typedef-ed to Point in
Continue reading
Recent Comments