Cocos2d触摸:多点触摸
来源:互联网 发布:炫浪网络社区 - 电脑版 编辑:程序博客网 时间:2024/04/25 22:16
// 多点触摸
Size visibleSize = Director::getInstance()->getVisibleSize();
auto label = Label::createWithSystemFont("多点触摸demo", "", 24);
label->setPosition(Vec2(visibleSize.width/2,visibleSize.height/2));
this->addChild(label,1,100);
auto listener = EventListenerTouchAllAtOnce::create();
listener->onTouchesBegan = [&](const std::vector<Touch*>& touchs, Event* event) {
auto label1 = (Label*) this->getChildByTag(100);
for (auto &touch: touchs) {
auto finger = touch->getID() + 1;
label1->setString( "按下去"+Value(finger).asString() + "根手指^^");
}
};
_eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this);
0 0
- Cocos2d触摸:多点触摸
- cocos2d - 多点触摸
- cocos2d - 多点触摸
- cocos2d多点触摸
- cocos2d-x 多点触摸
- Cocos2d-x 多点触摸
- Cocos2d-x 多点触摸
- Cocos2d-x_多点触摸
- Cocos2d-x3.1 多点触摸
- cocos2d多点触摸(转)
- Cocos2d-3.x_触摸事件(单点触摸和多点触摸)
- cocos2d-x多点触摸以及ios模拟器模拟多点触摸
- 多点触摸
- 多点触摸
- 多点触摸
- 多点触摸
- 多点触摸
- cocos2d-x——触摸事件(多点触摸)
- 将对称矩阵压缩存储,实现矩阵相乘,输出相乘后结果(用二维数组)
- Cocos2d触摸:单点触摸
- datatable转List<T>集合
- Ubuntu环境下配置下载器uget+aria2
- cygwin安装redis3.0集群报未知的类型名‘fd_set’解决方案
- Cocos2d触摸:多点触摸
- SQL基础入门(android,java)
- [深入浅出Cocoa]Block编程值得注意的那些事儿
- 反编译
- AndroidStudio:图片有jpg改为png之后报错
- UNP学习:套接字地址结构
- App性能优化浅谈
- CAS 登录流程
- <css 十三> 关于选择器selector(1)