cocos2d-x CCTouch中的函数
来源:互联网 发布:便宜已备案域名出售 编辑:程序博客网 时间:2024/04/27 10:50
// returns the current touch location in screen coordinates 屏幕左上角为原点,向右为x轴,向下为y轴
CCPoint CCTouch::getLocationInView()
const
{
//获取屏幕坐标
return
m_point;
}
// returns the current previous location in screen coordinates
CCPoint CCTouch::getPreviousLocationInView()
const
{
//获取上一次的屏幕坐标
return
m_prevPoint;
}
// returns the current touch location in OpenGL coordinates 屏幕左下角为原点,向右为x轴,向上为y轴
CCPoint CCTouch::getLocation()
const
{
//获取在opengl坐标系中的坐标
return
CCDirector::sharedDirector()->convertToGL(m_point);
}
// returns the previous touch location in OpenGL coordinates
CCPoint CCTouch::getPreviousLocation()
const
{
//获取上一次在opengl坐标系中的位置
return
CCDirector::sharedDirector()->convertToGL(m_prevPoint);
}
// returns the delta position between the current location and the previous location in OpenGL coordinates
CCPoint CCTouch::getDelta()
const
{
//返回当前和上次位置在opengl坐标系中差值
return
ccpSub(getLocation(), getPreviousLocation());
}
getStartLocation()
getStartLocationInView()
- cocos2d-x CCTouch中的函数
- cocos2d-x CCTouch分析
- cocos2d-X 节点(CCTouch.h)API
- Cocos2D-X中的内部函数
- Cocos2d-x中的 数学函数
- Cocos2d—X游戏开发之CCTouch屏幕触摸事件获取(九)
- cocos2d-x-TiledMap-ccTouch-双指缩放-单指拖动-双击自动放大
- lua使用cocos2d-x中的函数
- 简述Cocos2D-X中的内部函数
- cocos2d-x 中的一些数学函数
- cocos2d-x之CCNode中的函数
- 简述Cocos2D-X中的内部函数
- Cocos2d-x 场景中的生命周期函数?
- cocos2d-x Lua 中的公共函数 handler
- CCTouch
- cocos2d-x 在LuaStudio中的基本函数自动补全
- cocos2d-x draw 函数
- cocos2d-x 随机函数
- char、varchar和varchar2的区别
- 收获,不止Oracle
- 面试感想
- 在Java语言里 ==和equals的区别
- Apache ServiceMix 介绍
- cocos2d-x CCTouch中的函数
- 虚幻3(导演动画)二触发音效
- UnboundLocalError: local variable ' ' referenced before assignment
- VC视频教程笔记!
- java正则表达式
- linux中断处理机制
- struts2 中action执行两次的问题
- C++ 中list容器的简要使用说明(2)
- 【程序42】 学习使用auto定义变量的用法