3.x

Cocos2dx 3.x std::bind CC_CALLBACK_* 回调函数

断了今生、忘了曾经 提交于 2019-12-07 01:11:34
boy = Sprite::create("boy.png")//创建boy boy->setPosition(Point(visibleSize.width/2, visibleSize.height/2)); this->addChild(boy,1); girl_1 = Sprite::create("girl1.png");//创建girl_1 girl_1->setPosition(Point(visibleSize.width/3,visibleSize.height/2)); girl_1->setTag(10); this->addChild(girl_1,1); gitl_2 = Sprite::create("girl2.png")//创建girl_2 gitl_2->setPosition(Point(2*visibleSize.width/3,visibleSize.height/2)); girl_2->setTag(20); this->addChild(girl_2,1); //让boy运动,通过Callfunc回调到callback1 boy->runAction(CCSequence::create(MoveBy::create(1.0f,Poin(0,100)), CallFunc::create(CC_CALLBACK_0(HelloWorld

redis cluster 安装部署

孤人 提交于 2019-12-04 06:15:18
redis cluster 依赖环境安装 redis 集群某些功能需要依赖 ruby 运行环境,基于yum进行安装: $ yum install ruby* 安装redis的ruby组件: $ gem install redis 提示: [root@bogon redis]# gem install redis ERROR: Could not find a valid gem 'redis' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://rubygems.org/latest_specs.4.8.gz) 解决办法 $ sudo gem sources -r https://rubygems.org $ sudo gem sources -a http://rubygems.org 重试,发现可以安装成功,之前的 ERROR 变成了 WARNING cluster 配置 本次实验采用4个节点来搭建 redis cluster,其中 16379, 16479, 16579 为集群的3个主节点,承担整个集群的槽位分配,16379 和 16380