ToasterShot class
#include <Jazz2/Actors/Weapons/ToasterShot.h>
Toaster (shot).
Short-range flamethrower projectile that drifts slowly outward with randomized spread, is extinguished on contact with water, and normally dies when it hits a wall. The powered-up variant lives longer and slides along walls instead of being extinguished by them.
Base classes
- class ShotBase
- Base class of a shot from a player's weapon.
Constructors, destructors, conversion operators
- ToasterShot()
- 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.
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 OnRicochet() override
- Called on shot ricochet.