| 2199 | } |
| 2200 | |
| 2201 | void ShapeBase::updateThread(Thread& st) |
| 2202 | { |
| 2203 | switch (st.state) |
| 2204 | { |
| 2205 | case Thread::Stop: |
| 2206 | { |
| 2207 | mShapeInstance->setTimeScale( st.thread, 1.f ); |
| 2208 | mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); |
| 2209 | } // Drop through to pause state |
| 2210 | |
| 2211 | case Thread::Pause: |
| 2212 | { |
| 2213 | mShapeInstance->setTimeScale( st.thread, 0.f ); |
| 2214 | } break; |
| 2215 | |
| 2216 | case Thread::Play: |
| 2217 | { |
| 2218 | if (st.atEnd) |
| 2219 | { |
| 2220 | mShapeInstance->setTimeScale(st.thread,1); |
| 2221 | mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); |
| 2222 | mShapeInstance->setTimeScale(st.thread,0); |
| 2223 | st.state = Thread::Stop; |
| 2224 | } |
| 2225 | else |
| 2226 | { |
| 2227 | if ( st.position != -1.f ) |
| 2228 | { |
| 2229 | mShapeInstance->setTimeScale( st.thread, 1.f ); |
| 2230 | mShapeInstance->setPos( st.thread, st.position ); |
| 2231 | } |
| 2232 | |
| 2233 | mShapeInstance->setTimeScale(st.thread, st.timescale ); |
| 2234 | } |
| 2235 | } break; |
| 2236 | |
| 2237 | case Thread::Destroy: |
| 2238 | { |
| 2239 | st.atEnd = true; |
| 2240 | st.sequence = -1; |
| 2241 | if(st.thread) |
| 2242 | { |
| 2243 | mShapeInstance->destroyThread(st.thread); |
| 2244 | st.thread = 0; |
| 2245 | } |
| 2246 | } break; |
| 2247 | } |
| 2248 | } |
| 2249 | |
| 2250 | bool ShapeBase::stopThread(U32 slot) |
| 2251 | { |
nothing calls this directly
no test coverage detected