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

Function IsAnimationPlaying

trinity/Controllers/Tr2ControllerExpression.cpp:103–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103float IsAnimationPlaying( IRoot* ctx, const char* layerName )
104{
105 EveSpaceObject2Ptr spaceObject = BlueCastPtr( ctx );
106 if( !spaceObject )
107 {
108 return 0;
109 }
110 auto ac = spaceObject->GetAnimationController();
111 if( !ac )
112 {
113 return 0;
114 }
115 auto layer = ac->GetAnimationLayer( layerName && !*layerName ? nullptr : layerName );
116 if( !layer )
117 {
118 return 0;
119 }
120 auto remaining = layer->GetAnimationRemainingTime();
121 return remaining > 0;
122}
123
124float KillCount( IRoot* ctx )
125{

Callers

nothing calls this directly

Calls 3

GetAnimationLayerMethod · 0.80

Tested by

no test coverage detected