MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / InvokeAnimEvents

Method InvokeAnimEvents

Source/Engine/Animations/Graph/AnimGraph.cpp:87–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void AnimGraphInstanceData::InvokeAnimEvents()
88{
89 const bool all = IsInMainThread();
90 for (int32 i = 0; i < OutgoingEvents.Count(); i++)
91 {
92 const OutgoingEvent e = OutgoingEvents[i];
93 if (all || e.Instance->Async)
94 {
95 OutgoingEvents.RemoveAtKeepOrder(i);
96 switch (e.Type)
97 {
98 case OutgoingEvent::OnEvent:
99 e.Instance->OnEvent(e.Actor, e.Anim, e.Time, e.DeltaTime);
100 break;
101 case OutgoingEvent::OnBegin:
102 ((AnimContinuousEvent*)e.Instance)->OnBegin(e.Actor, e.Anim, e.Time, e.DeltaTime);
103 break;
104 case OutgoingEvent::OnEnd:
105 ((AnimContinuousEvent*)e.Instance)->OnEnd(e.Actor, e.Anim, e.Time, e.DeltaTime);
106 break;
107 }
108 }
109 }
110}
111
112Transform AnimGraphInstanceData::GetObjectTransform() const
113{

Callers 2

PostExecuteMethod · 0.80
UpdateMethod · 0.80

Calls 6

IsInMainThreadFunction · 0.85
RemoveAtKeepOrderMethod · 0.80
CountMethod · 0.45
OnEventMethod · 0.45
OnBeginMethod · 0.45
OnEndMethod · 0.45

Tested by

no test coverage detected