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()
- Seeds the swarm.
- auto IsEmpty() const -> bool
- Returns
trueif 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.