Jazz2::Actors::Collectibles::CollectibleBase::IlluminateLights class

Swarm of lights orbiting an illuminated collectible.

The effect is decoration, seeded at random and animated on its own, which is why it's reusable: an illuminated collectible in an online session is drawn by a stand-in that runs none of the object's logic, and reproducing the swarm there costs nothing — whereas describing two dozen constantly moving lights to every client on every update would be by far the most expensive object in the level.

Public functions

void Create(float elapsedFrames)
Seeds the swarm at elapsedFrames of the level, every swarm is in the same phase at the same time.
auto IsEmpty() const -> bool
Returns true if the swarm hasn't been seeded yet.
void OnUpdate(float timeMult)
Advances the swarm.
void OnEmitLights(SmallVectorImpl<LightEmitter>& lights, Vector2f pos) const
Emits the swarm around the specified position.