本文整理汇总了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 );
}
}
示例2: ReserveSensors
//----------------------------------------------------------------//
void MOAIInputMgr::ReserveSensors ( u8 deviceID, u8 total ) {
MOAIInputDevice* device = this->GetDevice ( deviceID );
if ( device ) {
device->ReserveSensors ( total );
}
}
示例3: SetDeviceActive
//----------------------------------------------------------------//
void MOAIInputMgr::SetDeviceActive ( u8 deviceID, bool active ) {
MOAIInputDevice* device = this->GetDevice ( deviceID );
if ( device ) {
device->SetActive ( active );
}
}
示例4: SetDeviceExtendedName
//----------------------------------------------------------------//
void MOAIInputMgr::SetDeviceExtendedName ( u8 deviceID, cc8* nameExtended ) {
MOAIInputDevice* device = this->GetDevice ( deviceID );
if ( device ) {
device->SetExtendedName(nameExtended);
}
}
示例5: GetSensor
//----------------------------------------------------------------//
MOAISensor* MOAIInputMgr::GetSensor ( u8 deviceID, u8 sensorID ) {
MOAIInputDevice* device = this->GetDevice ( deviceID );
if ( device ) {
return device->GetSensor ( sensorID );
}
return 0;
}
示例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;
}
示例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 );
}
示例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 );
}