上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: 1、CCTransitionProgress 该类继承了CCTransitionScene,并且有两个子类:实现了顺时针跟逆时针的进度切屏动作。 void CCTransitionProgress::onEnter() { CCSize size = CCDirector::sharedDirect 阅读全文
posted @ 2020-05-14 00:50 LCAC 阅读(228) 评论(0) 推荐(0)
摘要: 场景切换的类 cocos已经给我们实现了很多的场景切换。这里以CCTransitionJumpZoom* create(float t, CCScene* scene);为例 CCTransitionJumpZoom是继承CCTransitionScene,创建一个新的CCTransitionJum 阅读全文
posted @ 2020-05-12 23:57 LCAC 阅读(154) 评论(0) 推荐(0)
摘要: 前言: animate需要使用CCAnimation对象来进行初始化。该对象是继承CCObject CCAnimation的构造过程有多种方式,可以通过plist也可以通过直接设置图片的方式。 一、CCAnimationCache:animation的解析器 通过addAnimationsWithF 阅读全文
posted @ 2020-05-10 22:31 LCAC 阅读(171) 评论(0) 推荐(0)
摘要: 这道题的意思是往字符串前面添加字串,使得整个字符串是回文串; 第一种方法: 既然是回文串,那么最先想到的是最长回文子串。最长回文子串的pat是pat[index] 代表以index为中点左右两边最长的回文串。 那么如果pat[index] == index说明从起始点到该点再加上index是回文串的 阅读全文
posted @ 2020-05-10 21:42 LCAC 阅读(134) 评论(0) 推荐(0)
摘要: 1、CCToggleVisibility对当前的action动作的精灵对象进行取反的visible设置 CCActionInterval* move1 = CCMoveBy::create(1, ccp(250,0)); CCActionInterval* move2 = CCMoveBy::cre 阅读全文
posted @ 2020-05-10 13:06 LCAC 阅读(176) 评论(0) 推荐(0)
摘要: 1、CCSpriteBatchNode 该方式适用在导入多张一样的图片时候的优化。 CCSpriteBatchNode* batchNode = CCSpriteBatchNode::create("sprite.png"); this->addChild(batchNode); bool bRet 阅读全文
posted @ 2020-04-27 22:34 LCAC 阅读(640) 评论(0) 推荐(0)
摘要: 1、创建工程 main函数里面的:要设置尺寸,根据图片的大小来设置:eglView->setFrameSize(800, 500); 遇到一个问题是,图片800*500,但是窗口显示的是1024*768;这里需要看AppDelegate类里面的 bool AppDelegate::applicati 阅读全文
posted @ 2020-04-26 18:15 LCAC 阅读(176) 评论(0) 推荐(0)
摘要: 一、C环境使用mingw 的gcc 可从这里下载完整版那的mingw: http://pan.baidu.com/s/1crx1s 可参考该设置环境变量及编译lua的教程:https://www.cnblogs.com/jessicas/articles/4477655.html?tdsourcet 阅读全文
posted @ 2020-04-16 12:39 LCAC 阅读(317) 评论(0) 推荐(0)
摘要: find、match、gsub、gmatch find返回的是找到的第一个字符的位置和最后一个字符的位置。 match返回的是找到的字符串;有一个比较特殊的地方 print(string.match("hello", "()ll()")) 这里返回的是找到的ll的第一个位置跟最后一个位置的下个位置比 阅读全文
posted @ 2020-04-15 09:37 LCAC 阅读(1776) 评论(0) 推荐(0)
摘要: lua通过使用table来实现对应的面向对象 lua中有函数,有对应的变量如下所示 Account = {balance = 0} function Account:withdraw( v ) if v > self.balance then error("insufficient funds") 阅读全文
posted @ 2020-04-15 09:11 LCAC 阅读(126) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 下一页