MCPcopy Create free account
hub / github.com/carbonengine/trinity / CanTransition

Method CanTransition

trinity/Controllers/Finalizers/Tr2SyncToAnimation.cpp:10–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9
10bool Tr2SyncToAnimation::CanTransition( Tr2Controller& controller ) const
11{
12 EveSpaceObject2Ptr spaceObject = BlueCastPtr( controller.GetOwner() );
13 if( !spaceObject )
14 {
15 return true;
16 }
17 auto ac = spaceObject->GetAnimationController();
18 if( !ac )
19 {
20 return true;
21 }
22 auto layer = ac->GetAnimationLayer( m_mask.empty() ? nullptr : m_mask.c_str() );
23 if( !layer )
24 {
25 return true;
26 }
27 auto remaining = layer->GetAnimationRemainingTime();
28 return remaining <= 0;
29}

Callers 2

UpdateMethod · 0.45
StopMethod · 0.45

Calls 5

GetAnimationLayerMethod · 0.80
emptyMethod · 0.80
GetOwnerMethod · 0.45

Tested by

no test coverage detected