Spring class
#include <Jazz2/Actors/Environment/Spring.h>
Spring.
Bouncy spring that launches the player when stepped on or run into. Vertical springs come in three strengths—red, green, and blue—that fling the rabbit progressively higher, while horizontal springs shove the player sideways; a frozen spring must be thawed before it works.
Base classes
- class Jazz2::Actors::ActorBase
- Base class of an object.
Public static functions
- static void Preload(const ActorActivationDetails& details)
- Preloads all assets required by this actor.
Constructors, destructors, conversion operators
- Spring()
- Creates a new instance.
Public functions
- auto OnHandleCollision(ActorBase* other) -> bool override
- Called when the object collides with another object.
- auto Activate() -> Vector2f
- Activates the spring.
Public variables
- bool KeepSpeedX
- Whether player horizontal speed should be kept.
- bool KeepSpeedY
- Whether player vertical speed should be kept.
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.