| 2350 | } |
| 2351 | |
| 2352 | void ShapeBase::updateThread(Thread& st) |
| 2353 | { |
| 2354 | switch (st.state) |
| 2355 | { |
| 2356 | case Thread::Stop: |
| 2357 | { |
| 2358 | mShapeInstance->setTimeScale( st.thread, 1.f ); |
| 2359 | mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); |
| 2360 | } // Drop through to pause state |
| 2361 | |
| 2362 | case Thread::Pause: |
| 2363 | { |
| 2364 | mShapeInstance->setTimeScale( st.thread, 0.f ); |
| 2365 | } break; |
| 2366 | |
| 2367 | case Thread::Play: |
| 2368 | { |
| 2369 | if (st.atEnd) |
| 2370 | { |
| 2371 | mShapeInstance->setTimeScale(st.thread,1); |
| 2372 | mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); |
| 2373 | mShapeInstance->setTimeScale(st.thread,0); |
| 2374 | st.state = Thread::Stop; |
| 2375 | } |
| 2376 | else |
| 2377 | { |
| 2378 | if ( st.position != -1.f ) |
| 2379 | { |
| 2380 | mShapeInstance->setTimeScale( st.thread, 1.f ); |
| 2381 | mShapeInstance->setPos( st.thread, st.position ); |
| 2382 | } |
| 2383 | |
| 2384 | mShapeInstance->setTimeScale(st.thread, st.timescale ); |
| 2385 | } |
| 2386 | } break; |
| 2387 | |
| 2388 | case Thread::Destroy: |
| 2389 | { |
| 2390 | st.atEnd = true; |
| 2391 | st.sequence = -1; |
| 2392 | if(st.thread) |
| 2393 | { |
| 2394 | mShapeInstance->destroyThread(st.thread); |
| 2395 | st.thread = 0; |
| 2396 | } |
| 2397 | } break; |
| 2398 | } |
| 2399 | } |
| 2400 | |
| 2401 | bool ShapeBase::stopThread(U32 slot) |
| 2402 | { |
nothing calls this directly
no test coverage detected