Fork me on GitHub
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 125 下一页

2012年5月22日

摘要: //创建一个按钮直接调用这个函数 可以直接退出程序voidHelloWorld::menuCloseCallback(CCObject* pSender){ CCDirector::sharedDirector()->end(); //关闭界面 #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) //关闭游戏 exit(0); #endif} 阅读全文
posted @ 2012-05-22 11:15 pengyingh 阅读(212) 评论(0) 推荐(0)
摘要: http://hi.baidu.com/hzacxy123/blog/item/6528e2f9c8514c959e51468f.html全面剖析Cocos2d游戏触摸机制[注册触摸事件]1.先来看看层--CCLayer的声明部分:@interface CCLayer : CCNode <UIAccelerometerDelegate, CCStandardTouchDelegate, CCTargetedTouchDelegate>{ BOOL isTouchEnabled_; BOOL isAccelerometerEnabled_;} i:可以看出CCLayer实现了重... 阅读全文
posted @ 2012-05-22 11:11 pengyingh 阅读(1637) 评论(0) 推荐(0)
摘要: http://hi.baidu.com/hzacxy123/blog/item/f87bde2030c8615292580788.htmltypedef enum{ kCCTouchSelectorBeganBit = 1 << 0, kCCTouchSelectorMovedBit = 1 << 1, kCCTouchSelectorEndedBit = 1 << 2, kCCTouchSelectorCancelledBit = 1 << 3, kCCTouchSelectorAllBits = ( kCCTouchSelectorBegan 阅读全文
posted @ 2012-05-22 10:49 pengyingh 阅读(1278) 评论(0) 推荐(0)
摘要: question:In one of my iPhone projects, I have three views that you can move around by touching and dragging. However, I want to stop the user from moving two views at the same time, by using two fingers. I have therefore tried to experiment with UIView.exclusiveTouch, without any success.To understa 阅读全文
posted @ 2012-05-22 08:52 pengyingh 阅读(832) 评论(0) 推荐(0)

2012年5月21日

摘要: libFlurryAnalytics类 Targets -> buildPhases -> 点击加号添加 libFlurryAnalytics.a 则自动在librarySearchPath下添加了路径BugSense-ios.frameWork Targets -> buildPhases -> 点击加号添加 BugSense-iOS.framework文件夹 则自动在librarySearchPath下添加了路径 ,同时在 FrameWorkSearchPath 下也添加了路径 阅读全文
posted @ 2012-05-21 14:17 pengyingh 阅读(153) 评论(0) 推荐(0)
摘要: http://www.bugsense.com/docs/iosUsing BugSense in your iOS application is super easy!Download theBugSense-iOS [rev4.4].zipfile, and unzip it.In Xcode, select the target that you want to use and, in the "Build Phases" tab expand the "Link Binary With Libraries" section. Press the 阅读全文
posted @ 2012-05-21 12:26 pengyingh 阅读(208) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/fg313071405/article/details/7239387Flurry 是第三方的工具,包括三个部分,数据分析工具,广告,视频广告.对于一般的开发来说使用第一种就就足够了.FlurryAnalytics可以上官网去看的参考文档,全是英文的,不过内容也不是很多,很快就能熟悉,然后在和自己的业务联系起来,能很快上手.这里就自己这几天研究的情况记录下:1: 首先注册,注册完了后下载sdk. sdk里面带有说明文档和appkey2: 我首先下载的是3.6的sdk,后来升级为3.7的, 现在的sdk支持xcode 3.2.5及以上, 设备支持ios3 阅读全文
posted @ 2012-05-21 09:38 pengyingh 阅读(414) 评论(0) 推荐(0)

2012年5月19日

摘要: 满足正式协议 protocol 的委托只能执行协议中的方法,#import <Foundation/Foundation.h>@protocol GameBoardControllerDelegate <NSObject>@optional- (NSInteger)getColumns;- (NSInteger)getRows;@end#import "cocos2d.h"#import "GameBoardControllerDelegate.h" //MVC中的C@class GameBoard;@class GameBoar 阅读全文
posted @ 2012-05-19 18:30 pengyingh 阅读(521) 评论(0) 推荐(0)

2012年5月18日

摘要: 在用xcode4开发的时候,删除不用的文件后, 编译的时候会有missing file的警告,原因是由于SVN或git造成的。有几种方法可以解决。1.命令行进入missing file目录,然后运行svndeletenameOfMissingFile或gitrmnameOfMissingFile2.删除隐藏的.svn文件命令行运行defaultswritecom.apple.finderAppleShowAllFilesTRUE
killallFinder开启显示隐藏文件,然后到工程目录下删除.svn文件,然后再恢复defaultswritecom.apple.finderAppleShowA 阅读全文
posted @ 2012-05-18 15:43 pengyingh 阅读(9874) 评论(0) 推荐(0)
摘要: http://yarin.blog.51cto.com/1130898/381934在开发游戏时,总是要使用很多的资源文件,比如:图片、音乐等。而我们经常会遇到一些商业游戏中都看不到这些资源文件,那是因为商业游戏,一般都会将这些资源文件打包成二进制的文件,然后在程序中读取,并使用。这样的游戏看上去更显得专业一些,本文我们就来学习一个最简单的将资源文件打包成二进制文件的方法——使用BinCompiler将资源文件打包成二进制文件。所需工具:BinCompiler(见附件)运行“BinCompiler.exe”,指定要打包的资源文件的路径,和输出二进制文件的路径,如下图所示。点击create按钮, 阅读全文
posted @ 2012-05-18 14:54 pengyingh 阅读(568) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 125 下一页

导航