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
class BouncerShot
class ElectroShot
class FreezerShot
class PepperShot
class RFShot
class SeekerShot
class ShieldFireShot
class ShieldLightningShot
class ShieldWaterShot
class Thunderbolt
class ToasterShot

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)