Jazz2::Actors::Weapons::ShotBase class

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

Base classes

class Jazz2::Actors::ActorBase
Base class of an object.

Derived classes

class BlasterShot
Blaster (shot)
class BouncerShot
Bouncer (shot)
class ElectroShot
Electro (shot)
class FreezerShot
Freezer (shot)
class PepperShot
Pepper (shot)
class RFShot
RF (shot)
class SeekerShot
Seeker (shot)
class ShieldFireShot
Fire shield (shot)
class ShieldLightningShot
Lightning shield (shot)
class ShieldWaterShot
Water shield (shot)
class Thunderbolt
Thunderbolt (shot)
class ToasterShot
Toaster (shot)

Constructors, destructors, conversion operators

ShotBase()

Public functions

auto OnHandleCollision(std::shared_ptr<ActorBase> other) -> bool override
Called when the object collides with another object.
auto GetStrength() -> std::int32_t
Returns strength (damage)
auto GetOwner() -> Player*
Returns owner of the shot.
auto GetWeaponType() -> WeaponType virtual
Returns weapon type.
void TriggerRicochet(ActorBase* other)
Triggers shot ricochet.

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 OnRicochet() virtual
Called on shot ricochet.
void TryMovement(float timeMult, Tiles::TileCollisionParams& params)