MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / stringToAnimationMode

Method stringToAnimationMode

source/base/StarAnimatedPartSet.cpp:234–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234AnimatedPartSet::AnimationMode AnimatedPartSet::stringToAnimationMode(String const& string) {
235 if (string.equals("end", String::CaseInsensitive)) {
236 return End;
237 } else if (string.equals("loop", String::CaseInsensitive)) {
238 return Loop;
239 } else if (string.equals("transition", String::CaseInsensitive)) {
240 return Transition;
241 } else {
242 throw AnimatedPartSetException(strf("No such AnimationMode '{}'", string));
243 }
244}
245
246void AnimatedPartSet::freshenActiveState(StateType& stateType) {
247 if (stateType.activeStateDirty) {

Callers

nothing calls this directly

Calls 2

strfFunction · 0.85
equalsMethod · 0.45

Tested by

no test coverage detected