shadowTextDef._fontSize =
20
;
//字号
shadowTextDef._fontName = std::string(
"Marker Felt"
//字体
shadowTextDef._shadow._shadowEnabled =
true
//设置是否有阴影
shadowTextDef._shadow._shadowOffset = shadowOffset;
shadowTextDef._shadow._shadowOpacity =
1.0
//设置透明度
shadowTextDef._shadow._shadowBlur =
;
shadowTextDef._fontFillColor = tintColorRed;
// shadow only label
3、对于3.0中SpriteBatchNode,不鼓励使用,文档看这里点击打开链接,在此不再赘述SpriteBatchNode的用法。
4、帧动画创建方式
animation->setDelayPerUnit(
/ fps);
for
(
int
i =
; i <= count; i++) {
const
char
*filename = String::createWithFormat(fmt,i)->getCString();
SpriteFrame* frame = SpriteFrameCache::getInstance()->spriteFrameByName(
filename);
animation->addSpriteFrame(frame);
}
5、序列帧动画Sprite sheet animation
(1)通过.plist文件来创建
(2)通过数组来创建
char
str[
100
] = {
};
(
; i <
; i++)
{
sprintf(str,monospace!important; font-size:1em!important; min-height:inherit!important; color:blue!important">"grossini_dance_%02d.png"
SpriteFrame* frame = cache->spriteFrameByName( str );
animFrames->addObject(frame);
}
Animation* animation = Animation::createWithSpriteFrames(animFrames,monospace!important; font-size:1em!important; min-height:inherit!important">.3f);