您当前的位置: 首页 >  ar

鱼儿-1226

暂无认证

  • 0浏览

    0关注

    1100博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

cocos2dx 直接修改 Texture 里面的数据 mark一下 updateWithData

鱼儿-1226 发布时间:2020-08-27 10:48:04 ,浏览量:0

在原来的图片上增加了一个小黄块  

 

  // add "HelloWorld" splash screen"

    auto sprite = Sprite::create("HelloWorld.png");     // position the sprite on the center of the screen     sprite->setPosition(Vec2(visibleSize.width/2 + origin.x, visibleSize.height/2 + origin.y));     // add the sprite as a child to this layer     this->addChild(sprite, 0);     for (int i = 0; i < 16 * 16; i++)    redTest[i] = 0xFF00FFFF;     auto tex = sprite->getTexture();     tex->updateWithData(redTest, 0, 0, 16, 16);

关注
打赏
1604459285
查看更多评论
立即登录/注册

微信扫码登录

0.0662s