本文来自http://blog.csdn.net/runaying ,引用必须注明出处!
cocos2d-x节点(CCDevice.h)API
温馨提醒:为了大家能更好学习,强烈推荐大家看看本人的这篇博客 Cocos2d-X权威指南笔记
设备的 DPI 启用/禁用加速度传感器,设置加速的时间间隔
///cocos2d-x-3.0alpha0/cocos2dx/platform
//设备的 DPI 启用/禁用 加速度传感器,设置加速的时间间隔
#ifndef __CCDEVICE_H__
#define __CCDEVICE_H__
#include "CCPlatformMacros.h"
NS_CC_BEGIN
class CC_DLL Device
{
private:
Device();
public:
/**
* Gets the DPI of device
* @return The DPI of device.
*/
static int getDPI();
/**
* 启用/禁用 加速度传感器
*/
static void setAccelerometerEnabled(bool isEnabled);
/**
* 设置加速度的时间间隔
*/
static void setAccelerometerInterval(float interval);
};
NS_CC_END
#endif /* __CCDEVICE_H__ */