local uilocal function createLayerUI() if not ui then ui=cc.Layer:create(); createLayerUI=nil; end return ui;endlocal sceneGame=cc.Scene:create()sce.....
分类:
其他好文 时间:
2014-06-28 21:43:20
阅读次数:
204
local function onTouchBegan(x, y) 层单击事件end local function onTouchMoved(x, y) end local function onTouchEnded(x, y) print("哈哈哈") endlocal function...
分类:
其他好文 时间:
2014-06-18 22:00:39
阅读次数:
235
--滚动条 labar local function valueChanged(strEventName,pSender) if nil == pSender then return end ...
分类:
其他好文 时间:
2014-06-18 22:00:01
阅读次数:
332
单播模型echoserver.c 1 #include 2 3 #define PORT 8080 4 #define LEN_BUF 255 5 6 void do_business(int sockfd); 7 8 int main(void) 9 {10 //1.创建sock...
分类:
其他好文 时间:
2014-06-18 17:17:03
阅读次数:
268
echoserver_select.c 1 #include 2 3 #define BACKLOG 10 4 #define PORT 8080 5 #define MAXCLIENT 20 6 #define LEN_BUF 255 7 8 fd_set grset; 9...
分类:
其他好文 时间:
2014-06-18 16:03:55
阅读次数:
325
CCLabelTTFCCLabelBMFontCCLabelAtlas我们经常会用到CCLabelTTF、CCLabelBMFont以及CCLabelAtlas在层或精灵中添加文字。1. CCLabelTTFCCLabelTTF::labelWithString(constchar*label, ....
分类:
其他好文 时间:
2014-06-18 13:51:21
阅读次数:
217
【动机】 之前看到一款卡牌游戏,当你要看全屏高清卡牌的时候,游戏会单独从网络上下载,本地只存了非高清的,这样可以省点包大小,所以我萌生了实现一个读取网络图片的类。【联想】之前浏览网页的时候经常看到一张图片渐进(由模糊变清晰)的显示,如果在游戏中,诸如像显示高清卡牌的时候,使用有这种方式去显示一张图片...
分类:
其他好文 时间:
2014-06-17 23:56:47
阅读次数:
522
题意超难懂,实则一道概率论的题目。求P(n)。P(n) = n*(1+1/2+1/3+1/4+...+1/n)。结果如果可以除尽则表示为整数,否则表示为假分数。 1 #include 2 #include 3 4 #define MAXN 25 5 6 __int64 buf[MAXN]; ...
分类:
其他好文 时间:
2014-06-17 23:44:34
阅读次数:
335
bool CDlgResetAlarmInfo::GetLocalUserNameAddIP(CString &a_lstrUserName ,CString &a_IpStr)
{
char buf[256]="";
WSADATA w;
WSAStartup(0x0101, &w);
struct hostent *ph = 0;
gethostname(buf, 256)...
分类:
编程语言 时间:
2014-06-17 16:38:03
阅读次数:
223
最近在学习cocos2dx的过程中需要和服务器进行交互,所以这几天在学习libpomelo静态库的编译和使用。之前在windows系统下编译libpomelo,并在VS中引入比较顺利;但是,目前对Mac系统和XCode不是很熟悉,所以多花了些时间。不过,最终还是成功了,在这里就将我编译引入libp....
分类:
其他好文 时间:
2014-06-17 13:29:29
阅读次数:
256