Jazz2::Actors::Solid::Pole class

Pole.

An upright tree trunk or vine (Diamondus, Carrotus, Jungle, etc.) that the player can shoot or blow up with TNT to make it topple over, where it falls in the hit direction and bounces a few times before coming to rest, often forming a bridge or clearing a path.

Base classes

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

Public types

enum class FallDirection { None, Right, Left, Fallen }
Direction the pole is falling in.

Public static functions

static void Preload(const ActorActivationDetails& details)
Preloads all assets required by this actor.

Constructors, destructors, conversion operators

Pole()
Creates a new instance.

Public functions

auto OnHandleCollision(ActorBase* other) -> bool override
Called when the object collides with another object.
auto CanCauseDamage(ActorBase* collider) -> bool override
Called to check whether collider can cause damage to the object.
auto GetFallDirection() const -> FallDirection
Returns the direction the pole is falling in.

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 OnPacketReceived(MemoryStream& packet) override
Called when the object receives a network packet.

Enum documentation

enum class Jazz2::Actors::Solid::Pole::FallDirection

Direction the pole is falling in.

Enumerators
None

Standing upright

Right

Falling to the right

Left

Falling to the left

Fallen

Finished falling