void UpdateAutomaticInfluences()
{
for( int n = 0; n < Type.AutomaticInfluences.Count; n++ )
{
DynamicType.AutomaticInfluenceItem typeItem = Type.AutomaticInfluences[ n ];
bool need =
life >= typeItem.LifeCoefficientRange.Minimum * Type.LifeMax &&
life <= typeItem.LifeCoefficientRange.Maximum * Type.LifeMax;
if( need )
{
if( automaticInfluences == null || automaticInfluences[ n ] == null )
AddInfluence( typeItem.Influence, 1000000.0f, false );
}
else
{
if( automaticInfluences != null && automaticInfluences[ n ] != null )
automaticInfluences[ n ].SetShouldDelete();
}
}
}