コード例 #1
0
ファイル: SCA_PropertySensor.cpp プロジェクト: UPBGE/blender
CValue* SCA_PropertySensor::GetReplica()
{
	SCA_PropertySensor* replica = new SCA_PropertySensor(*this);
	// m_range_expr must be recalculated on replica!
	replica->ProcessReplica();
	replica->Init();
	
	return replica;
}
コード例 #2
0
int SCA_PropertySensor::modeChange(void *self, const PyAttributeDef* attrdef)
{
	SCA_PropertySensor*	sensor = reinterpret_cast<SCA_PropertySensor*>(self);

	if (sensor->m_checktype==KX_PROPSENSOR_INTERVAL)
	{
		sensor->PrecalculateRangeExpression();
	}
	return 0;
}
コード例 #3
0
int SCA_PropertySensor::validValueForIntervalProperty(void *self, const PyAttributeDef*)
{
	SCA_PropertySensor*	sensor = reinterpret_cast<SCA_PropertySensor*>(self);

	if (sensor->m_checktype==KX_PROPSENSOR_INTERVAL)
	{
		sensor->PrecalculateRangeExpression();
	}
	return 0;
}
コード例 #4
0
CValue* SCA_PropertySensor::GetReplica()
{
	SCA_PropertySensor* replica = new SCA_PropertySensor(*this);
	// m_range_expr must be recalculated on replica!
	replica->ProcessReplica();
	replica->Init();

	replica->m_range_expr = NULL;
	if (replica->m_checktype==KX_PROPSENSOR_INTERVAL)
	{
		replica->PrecalculateRangeExpression();
	}
	
	
	return replica;
}