Thunderbolt class
#include <Jazz2/Actors/Weapons/Thunderbolt.h>
Thunderbolt (shot).
Lightning weapon that strikes instantly as a beam spanning from the gun muzzle to a far point, damaging everything along its length and passing through solid tiles. The bolt follows the player's aim until they stop firing or change facing, then fades out.
Base classes
- class ShotBase
- Base class of a shot from a player's weapon.
Constructors, destructors, conversion operators
- Thunderbolt()
- Creates a new instance.
Public functions
-
void OnFire(const std::
shared_ptr<ActorBase>& owner, Vector2f gunspotPos, Vector2f speed, float angle, bool isFacingLeft) - Called when the shot is fired.
- auto OnHandleCollision(ActorBase* other) -> bool override
- Called when the object collides with another object.
- auto GetWeaponType() -> WeaponType override
- Returns weapon type.
Protected functions
- auto OnActivatedAsync(const ActorActivationDetails& details) -> Task<bool> override
- Called when the object is created and activated.
- void OnUpdate(float timeMult) override
- Called every frame to update the object state.
- void OnUpdateHitbox() override
- Called when the hitbox needs to be updated.
- void OnEmitLights(SmallVectorImpl<LightEmitter>& lights) override
- Called when emitting lights.
- void OnAnimationFinished() override
- Called when an animation finished.
- void OnHitWall(float timeMult) override
- Called when the object hits a wall.
- void OnRicochet() override
- Called on shot ricochet.