- 博客(12)
- 收藏
- 关注
原创 cocos2dx创建场景
class Diglett2:public Layer{public: static Scene*createScene() ; bool init()override; void onEnter()override; void onExit()override; CREATE_FUNC(Diglett2); };#inclu...
2018-06-19 16:07:49 479
原创 多线程
#ifndef pthreadTest_hpp#define pthreadTest_hppclass pthreadTest : public cocos2d::Layer{public: pthreadTest(); ~pthreadTest(); static cocos2d::Scene* createScene(); virtual boo...
2018-06-14 19:26:51 117
原创 菱形继承
//// LingXing.hpp// jicheng//// Created by LXBig on 18/2/5.// Copyright © 2018年 LXBig. All rights reserved.//#ifndef LingXing_hpp#define LingXing_hpp#include <stdio.h>#include <iostream&g...
2018-06-14 09:25:40 147
原创 字符串反转
反转#include <stdio.h>#include<string.h>char* str_reverse(char* str){ int n = strlen(str) / 2; int i = 0; char tmp = 0; for(i = 0; i < n; i++) { tmp = str[i]; ...
2018-06-13 14:37:51 112
原创 设计模式代理
#include <stdio.h>#include <iostream>using namespace std;/*抽象类*/class Subject{public: virtual void Request() = 0; virtual ~Subject(){};};/*真实的抽象类*/class RealSubject:public Subject{pu...
2018-06-05 20:45:17 116
原创 经典博客的地址
链接】WindowsC语言Socket编程client端(客户端)--断线https://blog.csdn.net/S_O_L_O_R/article/details/78444757?locationNum=8&fps=1微信登录SDK接入https://blog.csdn.net/sinat_28338727/article/details/51744953微信分享的代码SDK接入h...
2018-06-05 19:31:28 146
原创 cocos2dx观察者模式
开始第一次运行#ifndef EventListenerCustomTest_hpp#define EventListenerCustomTest_hpp#include <stdio.h>#include "cocos2d.h"USING_NS_CC;#include "cocostudio/CocoStudio.h"#include "ui/CocosGUI.h"using nam...
2018-06-05 19:20:11 318
原创 物理场景关节Chipmunk
//// PhysicsJoints2.hpp// day01//// Created by MAC on 16/7/14.////#ifndef PhysicsJoints2_hpp#define PhysicsJoints2_hpp#include <stdio.h>#include <iostream>using namespace std;#include "...
2018-06-04 21:16:31 261
原创 物理引擎Chipmunk--引力球
//// PhysicsJoints2.hpp// day01//// Created by MAC on 16/7/14.////#ifndef PhysicsJoints2_hpp#define PhysicsJoints2_hpp#include <stdio.h>#include <iostream>using namespace std;#include "...
2018-06-04 21:13:39 773
原创 cocos2dx 常见的22种特效 3D特效
可以参考3D特效或https://blog.csdn.net/zmzsoftware/article/details/9750373//创建网格节点 auto gridNodeTarget= NodeGrid::create(); this->addChild(gridNodeTarget);//随便找个底图 auto sprite= Sprite::create("JS原型继承.pn...
2018-06-02 14:24:16 3476
原创 斗地主文本
1、创建一副扑克牌,写代码首先创建一张牌的类。如下所示:1234567891011121314151617181920212223242526class Poker : public Sprite { public: Poker(); ~Poker(); static Poker* create(const char *pszFil...
2018-06-01 21:04:21 665
原创 非阻塞select
select_client客户端//// main.cpp// 111//// Created by LXBig on 18/4/9.// Copyright © 2018年 LXBig. All rights reserved.//#include <iostream>#include <string.h>#include <stdlib.h>#inc...
2018-06-01 20:21:49 869
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人