13 using std::unique_ptr;
152 this->action = unique_ptr<Action>(
action);
158 virtual void start();
GUIEffect(EffectType type, GUINode *guiNode)
Public constructor.
float getTimeTotal() const
GUIEffectState originalEndState
void setAction(Action *action)
Set action to be performed on effect end.
virtual void apply(GUIRenderer *guiRenderer)=0
Apply effect.
void setRepeat(int repeat)
Set repeat count or -1 for unlimited repeating.
EffectType getType() const
virtual void start()
Start this effect.
void setYoyo(bool yoyo)
Set yoyo.
unique_ptr< Action > action
Action * getAction() const
virtual void stop()
Stop this effect.
void setPersistant(bool persistant)
Set persistant, means if duration is reached this effect will still remain until removal.
GUIEffectState originalStartState
virtual bool update(GUIRenderer *guiRenderer)
Updates the effect to GUI renderer and updates time.
float isPersistant() const
virtual ~GUIEffect()
Destructor.
GUIEffectState startState
void setTimeTotal(float timeTotal)
Set time total.
static constexpr int REPEAT_UNLIMITED
#define FORBID_CLASS_COPY(CLASS)