上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 68 下一页
摘要: 1 #define _CRT_SECURE_NO_WARNINGS 2 #include 3 #include 4 #include 5 #include 6 7 int exeshell(char *cmd, char *result)//传递指令,返回结果 8 { 9 FILE *pf = _popen(cmd, "r");//打开一个管道,用管道执行cm... 阅读全文
posted @ 2018-01-25 19:21 喵小喵~ 阅读(995) 评论(0) 推荐(0) 编辑
摘要: memcpy 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <memory.h> 4 5 void * mymemcpy(void* _Dst, void const* _Src, size_t _Size) 6 { 7 if (_Dst 阅读全文
posted @ 2018-01-25 16:58 喵小喵~ 阅读(347) 评论(0) 推荐(0) 编辑
摘要: 一、笛卡儿坐标系 OpenGl坐标系为笛卡儿右手系。x向右,y向上,z向外。在cocos2d-lua中坐标系原点在屏幕的左下角,x向右,y向上,z则是指的zorder(层级)。 二、世界坐标系,本地坐标系 世界坐标系的原点固定在屏幕的左下角。 本地坐标是和节点相关的坐标系,每个节点都有独立的坐标系, 阅读全文
posted @ 2018-01-25 14:27 喵小喵~ 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 1.首先头文件定义事件处理的函数原型 2.实现原型 3.绑定事件 阅读全文
posted @ 2018-01-25 11:58 喵小喵~ 阅读(226) 评论(0) 推荐(0) 编辑
摘要: CCLayerCorlor bool CCLayerColor::initWithColor(const ccColor4B & color); bool CCLayerColor::initWithColor(const ccColor4B & color, GLfloat w, GLfloat 阅读全文
posted @ 2018-01-25 10:54 喵小喵~ 阅读(143) 评论(0) 推荐(0) 编辑
摘要: T3LayerZorder.h 1 #pragma once 2 #include "cocos2d.h" 3 USING_NS_CC; 4 5 class T3LayerZorder:public CCLayer 6 { 7 public: 8 static CCScene *scene(); 9 阅读全文
posted @ 2018-01-25 10:27 喵小喵~ 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 红色代码处是一个宏定义: 等同于: 调用顺序:scene->create->init->scene 2.T2LayerSprite.cpp 运行截图: 阅读全文
posted @ 2018-01-25 10:07 喵小喵~ 阅读(370) 评论(0) 推荐(0) 编辑
摘要: T1LayerAnchorPoint.h 1 #pragma once 2 #include "cocos2d.h" 3 USING_NS_CC; 4 5 class T1LayerAnchorPoint:public CCLayer 6 { 7 public: 8 //create->init 9 阅读全文
posted @ 2018-01-24 18:36 喵小喵~ 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 创建一个层T1LayerAnchorPoint AppDelegate.cpp 1 bool AppDelegate::applicationDidFinishLaunching() { 2 // initialize director 3 auto director = Director::get 阅读全文
posted @ 2018-01-24 17:13 喵小喵~ 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 调用关系: AppDeligate.cpp 1 bool AppDelegate::applicationDidFinishLaunching() { 2 // initialize director 3 auto director = Director::getInstance(); 4 auto 阅读全文
posted @ 2018-01-24 16:30 喵小喵~ 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 ··· 46 47 48 49 50 51 52 53 54 ··· 68 下一页