Jazz2::Actors::Weapons::ElectroShot class

Electro (shot).

Projectile of the electro blaster, a high-strength energy ball that passes through solid tiles instead of stopping at walls and trails an expanding swirl of electric particles as it travels. The powered-up variant is slightly faster.

Base classes

class ShotBase
Base class of a shot from a player's weapon.

Constructors, destructors, conversion operators

ElectroShot()
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 GetWeaponType() -> WeaponType override
Returns weapon type.
auto OnHandleCollision(ActorBase* other) -> bool override
Called when the object collides with another object.

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.
auto OnPerish(ActorBase* collider) -> bool override
Called when the object has no health left and should perish.
void OnHitWall(float timeMult) override
Called when the object hits a wall.
void OnRicochet() override
Called on shot ricochet.