cocos2d-x-3.0

What is “Other Linker Flags” issue in Xcode build settings?

亡梦爱人 提交于 2019-12-24 23:10:53
问题 I have a cocos2d-x project that I'm working on, I added cocoapods to it and originally all that was in "Other linker flags" was $(_COCOS_LIB_IOS_BEGIN) AND $(_COCOS_LIB_IOS_END) everything works fine but then I added google-mobile-ads and amazon ads to my pod file and ran pod install and it said to add $(inherited) to my other linker flags target and I did but then I get this error, If I remove ($inherited) everything builds fine, if I keep ($inherited) and remove $(_COCOS_LIB_IOS_BEGIN) AND

How velocity impacts on CCSprite in Cocos2d Chipmunk?

浪子不回头ぞ 提交于 2019-12-24 14:05:04
问题 I am in need of the basic understanding of how velocity changing works? i.e. how CCSprite is able to jump at particular height when some velocity is set? Let me give you an example on which I am working currently. I am preparing a demo like flappy bird, in which I wanted my bird to land on vertical pipes. So, it is like, my birdy jumps from the pipe to another pipe :smile:. Check the gif I place here: https://www.dropbox.com/s/n46vak6qy5wu4x4/jumpyBall_15_jul_152.gif?dl=0 I am using Sprite

TextField in cocos2d-x 3.0 with background image, text alignment and colored shadow

醉酒当歌 提交于 2019-12-24 00:23:32
问题 I need a input text filed with: background image text aligned to center text color, shadow and shadow color options But I cannot find and appropriate one. I have investigated and found: cocos2d::extension::EditBox which has 1, but 2 and 3 are missing as I understand cocos2d::TextFieldTTF ui::UICCTextField ui::TextField The latest 3 ones don't have 2 and 3 and also are not easy to use in terms of getting input. cocos2d::Label seams to hove what I want (I can use a sprite for background), but

Linking errors when adding AdMob to IOS cocos2d-x 3.2

你说的曾经没有我的故事 提交于 2019-12-22 06:00:48
问题 i trying to add AdMob to cocos2d-x 3.2 simple game using Xcode 5.1 iOS 7.1 i following the tutorials in https://developers.google.com/mobile-ads-sdk/docs/#ios and http://plaincode.blogspot.co.il/2014/02/example-of-admob-integration-in-cocos2d.html and after adding the -ObjC flag in the "Other Linker Flags" I'm getting linking errors: Undefined symbols for architecture armv7s: "_GCControllerDidDisconnectNotification", referenced from: -[GCControllerConnectionEventHandler observerConnection

why “cocos compile -p android” gives “The android command is no longer available.” error

泄露秘密 提交于 2019-12-22 04:37:16
问题 I am working on a cocos2d-x project. i always compile android project using cocos command cocos compile -p android --android-studio -m debug . But now this command returning an error. The android command is no longer available. For manual SDK and AVD management, please use Android Studio. For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager Error running command, return code: 1. Error running command, return code: 14. i can't figure out the problem. why this is giving

cocos2d::Menu click detection is a bit off to bottom left whenever using a custom window size

谁都会走 提交于 2019-12-19 10:59:10
问题 After weeks of debugging, I struggle to figure out what was going on with cocos2d::Menu. I was surprise that my MenuItemImage was not receiving callbacks when I click on the button. So I click anywhere else out of frustration and boom, as I clicked on the bottom left corner, the callback registers in! Its a bit off towards the bottom-left and wondering what might caused this? I already reproduce the problem using the crappy sample project provided as is and was not able to reproduce this

cocos2d::Menu click detection is a bit off to bottom left whenever using a custom window size

大兔子大兔子 提交于 2019-12-19 10:59:02
问题 After weeks of debugging, I struggle to figure out what was going on with cocos2d::Menu. I was surprise that my MenuItemImage was not receiving callbacks when I click on the button. So I click anywhere else out of frustration and boom, as I clicked on the bottom left corner, the callback registers in! Its a bit off towards the bottom-left and wondering what might caused this? I already reproduce the problem using the crappy sample project provided as is and was not able to reproduce this

cocos2d-x-3.0 draw vs onDraw

空扰寡人 提交于 2019-12-18 11:43:13
问题 I'm using cocos2d-x v3.0 and in some test project I'm doing some custom drawing by overriding Node 's draw method, but in the DrawPrimitives example provided they do something like this: void DrawPrimitivesTest::draw() { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(DrawPrimitivesTest::onDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); } void DrawPrimitivesTest::onDraw() { // drawing code here, why? } From reading the header and

How to access Physics World in Layer

拟墨画扇 提交于 2019-12-13 01:29:27
问题 I need to create joint between two bodies in layer. Joints are to be added in physics world. How can i access physics world in layer? 回答1: My JavaScript implementation. Hope it will help. var space; function initPhysics() { space = new cp.Space(); space.gravity = cp.v(0, -800); space.iterations = 30; space.sleepTimeThreshold = Infinity; space.collisionSlop = Infinity; } function addJoints() { chainTableJoint1 = new cp.PivotJoint(chainEnd1, tableBackBody, cp.v.add(cp.v(chainEnd1.getPos().x,

How to call callfunc function in cocos2dx 3.0

让人想犯罪 __ 提交于 2019-12-12 11:47:40
问题 I have to convert objective c++ to C++ 11. I have stuck with the following syntax. I have referred in testcpp and try the following syntax. Here the code which i tried: this->runAction ( Sequence::create ( blink, CallFunc::create(CC_CALLBACK_0(Hero::stopBlinking, NULL)), -> issue this line. NULL ) ); It shows error "no matching function for call to 'bind'" in "CallFunc::create". Can any one assist or help me. 回答1: In your coding, just replace the below code: CallFuncN::create(CC_CALLBACK_1