| 235 | //----------------------------------------------------------------------------- |
| 236 | |
| 237 | void SFXState::_onActivate() |
| 238 | { |
| 239 | #ifdef DEBUG_SPEW |
| 240 | Platform::outputDebugString( "[SFXState] Activating '%s'", getName() ); |
| 241 | #endif |
| 242 | |
| 243 | onActivate_callback(); |
| 244 | |
| 245 | // Add the state to the list. |
| 246 | |
| 247 | sgActiveStates.push_back( this ); |
| 248 | |
| 249 | // Activate included states. |
| 250 | |
| 251 | for( U32 i = 0; i < MaxIncludedStates; ++ i ) |
| 252 | if( mIncludedStates[ i ] ) |
| 253 | mIncludedStates[ i ]->activate(); |
| 254 | |
| 255 | // Disable excluded states. |
| 256 | |
| 257 | for( U32 i = 0; i < MaxExcludedStates; ++ i ) |
| 258 | if( mExcludedStates[ i ] ) |
| 259 | mExcludedStates[ i ]->disable(); |
| 260 | } |
| 261 | |
| 262 | //----------------------------------------------------------------------------- |
| 263 | |