cocos2d-x onMouseMove中CCTouch *pTouch参数的细节
/****************************************************************************
Copyright (c) 2010 cocos2d-x.org http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/ #ifndef __CC_TOUCH_H__
#define __CC_TOUCH_H__ #include "cocoa/CCObject.h"
#include "cocoa/CCGeometry.h" NS_CC_BEGIN /**
* @addtogroup input
* @{
*/ class CC_DLL CCTouch : public CCObject
{
public:
CCTouch()
: m_nId()
{} /** returns the current touch location in OpenGL coordinates */
CCPoint getLocation() const;
/** returns the previous touch location in OpenGL coordinates */
CCPoint getPreviousLocation() const;
/** returns the delta of 2 current touches locations in screen coordinates */
CCPoint getDelta() const;
/** returns the current touch location in screen coordinates */
CCPoint getLocationInView() const;
/** returns the previous touch location in screen coordinates */
CCPoint getPreviousLocationInView() const; /** returns the current touch location in screen coordinates
@deprecated: use CCTouch::getLocationInView() instead.
CCTouch::getLocation() is recommended, it will return OpenGL coordinate.
*/
CC_DEPRECATED_ATTRIBUTE CCPoint locationInView() { return m_point; } /** returns the current previous location in screen coordinates
@deprecated: use CCTouch::getPreviousLocationInView() instead.
CCTouch::getPreviousLocation() is recommended, it will return OpenGL coordinate.
*/
CC_DEPRECATED_ATTRIBUTE CCPoint previousLocationInView() { return m_prevPoint; } void setTouchInfo(int id, float x, float y)
{
m_nId = id;
m_prevPoint = m_point;
m_point.x = x;
m_point.y = y;
} int getID() const
{
return m_nId;
} private:
int m_nId;
CCPoint m_point;
CCPoint m_prevPoint;
}; class CC_DLL CCEvent : public CCObject
{
}; // end of input group
/// @} NS_CC_END #endif // __PLATFORM_TOUCH_H__
cocos2d-x onMouseMove中CCTouch *pTouch参数的细节的更多相关文章
- cocos2D v3.x 中action的回调block变化
cocos2D v2.x中有带参数的回调block: id blk = [CCCallBlockN actionWithBlock:^(CCNode *node){ node.position = o ...
- 如何理解javaSript中函数的参数是按值传递
本文是我基于红宝书<Javascript高级程序设计>中的第四章,4.1.3传递参数小节P70,进一步理解javaSript中函数的参数,当传递的参数是对象时的传递方式. (结合资料的个人 ...
- Production环境中iptables常用参数配置
production环境中iptables常用参数配置 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 我相信在实际生产环境中有很多运维的兄弟跟我一样,很少用到iptables的这个 ...
- [原创]java WEB学习笔记109:Spring学习---spring对JDBC的支持:使用 JdbcTemplate 查询数据库,简化 JDBC 模板查询,在 JDBC 模板中使用具名参数两种实现
本博客的目的:①总结自己的学习过程,相当于学习笔记 ②将自己的经验分享给大家,相互学习,互相交流,不可商用 内容难免出现问题,欢迎指正,交流,探讨,可以留言,也可以通过以下方式联系. 本人互联网技术爱 ...
- VB类模块中属性的参数——VBA中Range对象的Value属性和Value2属性的一点区别
在VB中,属性是可以有参数的,而VBA中属性使用参数非常常见.比如最常用的:Worksheet.Range("A1:A10") VB的语法,使用参数的不一定是方法,也有可能是属性 ...
- 第一篇博文:PHP函数原型中的可选参数写法为什么这么写?
第一篇,算是开始吧.简单写点儿东西. 刚开始学PHP,在看PHP Manual时遇到一个问题:含可选参数的函数原型中,可选参数的写法看不懂. 例如explode函数 array explode ( s ...
- Elasticsearch——禁止Body中的index覆盖Url中的index参数
本篇继续一下Elasticsearch日常使用的技巧翻译. 在Elasticsearch有很多的api支持在body中指定_index等信息,比如mget或者msearch以及bulk. 默认的情况下 ...
- jax-rs中的一些参数标注简介(@PathParam,@QueryParam,@MatrixParam,@HeaderParam,@FormParam,@CookieParam)
先复习一下url的组成: scheme:[//[user:password@]host[:port]][/]path[?query][#fragment] jax-rs anotation @Path ...
- C#中方法的参数的四种类型
C#中方法的参数有四种类型: 1. 值参数类型 (不加任何修饰符,是默认的类型) 2. 引用型参数 (以ref 修饰符声明) 3. 输出型参数 (以out 修 ...
随机推荐
- (Inside Out) Web地图坐标系——TDT的奇妙
一个GIS科班出生的研究生.把已还到课本的基础GIS知识,准备又一次学习,并结合这几年下来自身在行业中GIS的应用.总结一些有用的GIS知识点.一备不时之需,二为积累沉淀,三则是年龄越大.记性越差,加 ...
- 从头開始写项目Makefile(十):make内嵌函数及make命令显示
[版权声明:转载请保留出处:blog.csdn.net/gentleliu.Mail:shallnew at 163 dot com] 这一节我们讲一下make的函数,在之前的章节已经讲到了几 ...
- 数学图形(1.39)TN constant curve
这是个类似巴黎铁塔的曲线. #http://www.mathcurve.com/courbes2d/tn/tn.shtml vertices = t = to (PI*0.999) a = s = s ...
- [Python爬虫] 之八:Selenium +phantomjs抓取微博数据
基本思路:在登录状态下,打开首页,利用高级搜索框输入需要查询的条件,点击搜索链接进行搜索.如果数据有多页,每页数据是20条件,读取页数 然后循环页数,对每页数据进行抓取数据. 在实践过程中发现一个问题 ...
- [Grunt] Uglify
Grunt Uglify to compress your javascript for production deployment. Install npm install grunt-contri ...
- 解决 vs2010问题 error MSB8008: 指定的平台工具集(v110)未安装或无效
一次编译程序时.出现故障 >------ 已启动生成: 项目: PhotoStore, 配置: Debug Win32 ------ 1>生成启动时间为 2013-01-15 18:10: ...
- python中各类时间的计算
python获取当前系统时间: nowTime=time.localtime() 获取当前系统日期: nowDate=datetime.datetime(nowTime[0],nowTime[1],n ...
- iOS socket Stream 服务器端 及 客户端 演示
iOS socket Stream 测试环境,mac osx 10.8 一:建立服务器端 由于mac osx10.8 已经集成 python2和 Twisted,我们可以直接利用此,构建一个简单的so ...
- es5 - array - push
/** * 参数:arr.push(element1, ..., elementN) * 作用:被添加到数组末尾的元素. * 当调用该方法时,新的 length 属性值将被返回. * 描述:push ...
- MySQL 清理slowlog方法
MySQL 清理slowlog方法 SET GLOBAL slow_query_log = 'OFF'; ALTER TABLE mysql.slow_log RENAME mysql.slow_lo ...