cocos2d-iphone

Cocos2d - lunar eclipse effect on iPhone

a 夏天 提交于 2020-01-03 19:35:16
问题 i have a question about achieving an effect like on a lunar eclipse. The effect should look like in the first seconds of this gif. So just like a black shadow which goes over the circle. The ideal situation would be a function where i can passed a parameter in percentage to get this amount as a shadow on the circle: The problem which i am facing is that my background is an gradient. So it's not possible to have a black circle which moves over the moon to get the effect. I tried something with

Cocos2d - lunar eclipse effect on iPhone

流过昼夜 提交于 2020-01-03 19:35:03
问题 i have a question about achieving an effect like on a lunar eclipse. The effect should look like in the first seconds of this gif. So just like a black shadow which goes over the circle. The ideal situation would be a function where i can passed a parameter in percentage to get this amount as a shadow on the circle: The problem which i am facing is that my background is an gradient. So it's not possible to have a black circle which moves over the moon to get the effect. I tried something with

Can I support VoiceOver in my Cocos2D-iPhone Game?

自闭症网瘾萝莉.ら 提交于 2020-01-03 17:12:30
问题 I'm making a game where a player reacts to sounds via motion - seeing as the visual element isn't needed to play it, and many play with their eyes closed, it seems a shame to not be fully VoiceOver compatible. I'm currently using Cocos2D-iPhone and CocosDenshion for audio, and am now starting to think about how I'll be building my menu system to choose levels and configure controls. Is it reasonably easy to support VoiceOver in Cocos2D's menu system, or should I look in to trying to create my

My Xcode4 cannot find CCRibbon

时间秒杀一切 提交于 2020-01-03 06:38:13
问题 I installed cocos2D 2.0 beta on my Mac. But, my Xcode4 cannot find the class of CCRibbon. So, I look for CCRibbon in the templates, but there is no CCRibbon. Maybe it's an unstable version I think, but I'm not sure. How can I use CCRibbon on my Xcode? Do I install old version of cocos2D? 回答1: Cocos2D 2.0 beta does not include CCRibbon, but v1.x does. I'm not aware of any plans to re-add CCRibbon. I consider it unlikely that it will be added again because it's just one of the classes that were

My Xcode4 cannot find CCRibbon

眉间皱痕 提交于 2020-01-03 06:38:06
问题 I installed cocos2D 2.0 beta on my Mac. But, my Xcode4 cannot find the class of CCRibbon. So, I look for CCRibbon in the templates, but there is no CCRibbon. Maybe it's an unstable version I think, but I'm not sure. How can I use CCRibbon on my Xcode? Do I install old version of cocos2D? 回答1: Cocos2D 2.0 beta does not include CCRibbon, but v1.x does. I'm not aware of any plans to re-add CCRibbon. I consider it unlikely that it will be added again because it's just one of the classes that were

How do I stop Cocos2D from requiring standard definition resources (SD images)?

别等时光非礼了梦想. 提交于 2020-01-03 05:21:29
问题 I am developing an iPhone game with Cocos2d-iphone. I want my game to only be available to the iPhone 4 AND iPad. Retina enabled for iPhone 4. I don't want the game to run on older devices. Cocos2d will always ask me for -hd and non-hd files. If I don't provide the SD files, I get errors. I don't want that: is there a way to disable Cocos2d from trying to retrieve SD files, and only get -hd suffixed files by default? Oh, and when the game is run by an iPad, the graphics will be the -hd ones

iphone sdk 4.1 memory leackage: may be scene replace problem (cocos2d)

大憨熊 提交于 2020-01-02 23:02:58
问题 I have used scheduler to return from a scene to the main menu. There is nothing in the scene page except menu. But scenes are not deallocating and memory leakage increasing as i navigate through the scenes. So application is not closing(kept running in background when close using iphone/ipod button) but crashing. Hope some of you faced and resolved this type of problem.Expecting a way to out from here. Here are my class sources- Delegator @implementation BubbleWordAppDelegate @synthesize

Slows down the iPad retina simulator 6.0

孤街醉人 提交于 2020-01-02 21:01:12
问题 I have a game made in cocos2d for iPhone, I've adapted for iPad and works well if not retina. When I run my game in the retina iPad simulator, the game is very slow, the images of the characters take a lot to load. Why does this happen? Is the problem the simulator? Am I missing a line of code to run normal? The code is exactly the iPhone and iPhone is great. 回答1: The simulator can have a very different performance profile than a device—in this case your computer’s graphics card might just be

CCSprite: Batched sprites should use the same texture as the batchnode?

谁说我不能喝 提交于 2020-01-02 10:02:58
问题 I keep getting a crash that says: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'CCSprite: Batched sprites should use the same texture as the batchnode' I am not quite sure what this means. I googled the crash but got no results. Also this only happens when I go back to my first scene after coming back from the second scene in my game. I double checked my code and I make sure all the images in my sprite sheets are added as children to the batch node

Why use Cocos over UI Kit for a 2D iPhone game?

余生颓废 提交于 2020-01-02 06:25:33
问题 I have been building a game in cocos for a while now I it has just occurred to me that it might just be a whole lot easier to use UIKit. Could you please help me weight up the pros and cons, and share some experiences you have. Here is my basic list of advantages for each. I feel I dont know enought about cocos to make a informed decision which is best. Cocos Game engine comes for free. Pause / resume callbacks every frame Sprite animations Uses open GL (is this true? is this an advantage?) .