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 修 ...
随机推荐
- 一次SQL查询语句的优化
1.项目中之前的"我关注的拍品列表"需要添加筛选功能,因为目前显示的关注的拍品太多没有进行分类,用户体验差. 2.添加筛选条件之后,可以筛选出“未开始”“进行中”“已结束”三种情况 ...
- iOS: 删除真机测试的Provisioning Profile后,在Code Singing中出现entitlements.plist文件无效,解决办法如下:
问题主题:method to The entitlements specified in your application’s Code Signing Entitlements file do no ...
- Android NDK开发----- JNI多线程
一.概述 JNI编程和Linux上的C/C++编程还是挺相似的,每次java调用JNI中的函数时都会传入有关JVM的一些参数(如JNIEnv,jobject),每次JNI回调java中的方法时都要通过 ...
- go语言基础之全局变量
1.全局变量 示例: package main import "fmt" func test() { fmt.Println("test a =", a) } ...
- 不要让Javascript的等价表格看上去那么难看
时不时的会有人贴出一张表格,用来展现javascript的 '==' 比较出来的结果.像最近的这个例子,看看这张表格有多么的无序. 这些文章基本上都是对的,他们指出 '==' 设计的很糟糕.但是他们通 ...
- C#装饰者模式实例代码
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace 装饰者 ...
- SQL OUTER JOIN
When we want to select out all the record from two table, no matter it's present at second table or ...
- HTML-<a>标签添加下划线
<a href="ddrb/090630.asp" target="_blank" style="text-decoration:underli ...
- Windows 批处理 ping 某个网段
原文: https://blog.csdn.net/leuxcn/article/details/51288248 ------------------------------------------ ...
- Windows Xp不用安装软件管理多个远程桌面连接
一直使用系统默认的Mstsc来进行远程连接,但如果要连接N个远程的话就比较麻烦 之前也找过第三方的管理软件如:mRemoteNG 此软件有优点就不说了,但我在使用此软件时有一个很大的问题,就是如果一个 ...