当前位置: 首页>>代码示例>>C++>>正文


C++ MOAIInputDevice类代码示例

本文整理汇总了C++中MOAIInputDevice的典型用法代码示例。如果您正苦于以下问题:C++ MOAIInputDevice类的具体用法?C++ MOAIInputDevice怎么用?C++ MOAIInputDevice使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MOAIInputDevice类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetSensor

//----------------------------------------------------------------//
void MOAIInputMgr::SetSensor ( u8 deviceID, u8 sensorID, cc8* name, u32 type ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device ) {
		device->SetSensor ( sensorID, name, type );
	}
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:8,代码来源:MOAIInputMgr.cpp

示例2: ReserveSensors

//----------------------------------------------------------------//
void MOAIInputMgr::ReserveSensors ( u8 deviceID, u8 total ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device ) {
		device->ReserveSensors ( total );
	}
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:8,代码来源:MOAIInputMgr.cpp

示例3: SetDeviceActive

//----------------------------------------------------------------//
void MOAIInputMgr::SetDeviceActive ( u8 deviceID, bool active ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device ) {
		device->SetActive ( active );
	}
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:8,代码来源:MOAIInputMgr.cpp

示例4: SetDeviceExtendedName

//----------------------------------------------------------------//
void MOAIInputMgr::SetDeviceExtendedName ( u8 deviceID, cc8* nameExtended ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device ) {
		device->SetExtendedName(nameExtended);
	}
}
开发者ID:Chenhx,项目名称:moai-dev,代码行数:8,代码来源:MOAIInputMgr.cpp

示例5: GetSensor

//----------------------------------------------------------------//
MOAISensor* MOAIInputMgr::GetSensor ( u8 deviceID, u8 sensorID ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device ) {
		return device->GetSensor ( sensorID );
	}
	return 0;
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:9,代码来源:MOAIInputMgr.cpp

示例6: CheckSensor

//----------------------------------------------------------------//
bool MOAIInputMgr::CheckSensor ( u8 deviceID, u8 sensorID, u32 type ) {

	MOAIInputDevice* device = this->GetDevice ( deviceID );
	if ( device && device->mIsActive ) {
		MOAISensor* sensor = device->GetSensor ( sensorID );
		return ( sensor && ( sensor->mType == type ));
	}
	return false;
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:10,代码来源:MOAIInputMgr.cpp

示例7: Reset

//----------------------------------------------------------------//
void MOAIInputMgr::Reset () {

	for ( u32 i = 0; i < this->mDevices.Size (); ++i ) {
		MOAIInputDevice* device = this->mDevices [ i ];
		if ( device ) {
			device->Reset ();
		}
	}
	this->mInput.Seek ( 0, SEEK_SET );
}
开发者ID:SimonRen,项目名称:moai-beta,代码行数:11,代码来源:MOAIInputMgr.cpp

示例8: MOAIInputDevice

//----------------------------------------------------------------//
void MOAIInputMgr::SetDevice ( u8 deviceID, cc8* name ) {

	if ( !( deviceID < this->mDevices.Size ())) return;

	MOAIInputDevice* device = new MOAIInputDevice ();
	device->SetName ( name );
	
	this->LuaRelease ( this->mDevices [ deviceID ]);
	
	this->mDevices [ deviceID ] = device;
	this->LuaRetain ( device );
	
	MOAILuaStateHandle state = MOAILuaRuntime::Get ().State ();
	this->PushLuaClassTable ( state );
	
	device->PushLuaUserdata ( state );
	lua_setfield ( state, -2, name );
}
开发者ID:Inzaghi2012,项目名称:moai-dev,代码行数:19,代码来源:MOAIInputMgr.cpp


注:本文中的MOAIInputDevice类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。