17 #ifndef ACCELERATORLOGIC_H
18 #define ACCELERATORLOGIC_H
20 #include <Engine/Logic.h>
49 virtual void init()
override;
54 virtual void update()
override;
63 float mAcceleration = 3.0f;
67 #endif // ACCELERATORLOGIC_H
void accelerationChanged()
Emitted when acceleration changes.
void setAcceleration(float value)
Sets acceleration.
float acceleration
How much the contacting Bodys are accelerated each frame.
Definition: AcceleratorLogic.h:34
virtual void update() override
Uses Body::applyForceToCenter() to accelerate Bodys in contact with actor.
Accelerates Bodys that are in contact with the AcceleratorLogic's actor in the direction that they ar...
Definition: AcceleratorLogic.h:26
Non-visual entities in the QML item tree that define behavior for their parent Actor.
Definition: Logic.h:31
virtual void init() override
Checks the AcceleratorLogic has an actor with a Body.
float getAcceleration() const
Returns acceleration.
Definition: AcceleratorLogic.h:39