#pragma once #include "imodule.h" #include "ideclmanager.h" #include "math/Vector3.h" namespace fx { class IFxAction { public: using Ptr = std::shared_ptr; enum class Type { Undefined = -1, Light = 0, Particle, Decal, Model, Sound, Shake, AttachLight, AttachEntity, Launch, Shockwave }; virtual ~IFxAction() {} virtual Type getActionType() = 0; // Returns the name of this action (which might be an empty string) virtual const std::string& getName() = 0; // Returns the action delay in seconds virtual float getDelayInSeconds() = 0; // Action duration in seconds, before it is killed or restarted virtual float getDurationInSeconds() = 0; // True: Don't shake the entity this effect is attached to virtual bool getIgnoreMaster() = 0; // Shake parameters virtual float getShakeTimeInSeconds() = 0; virtual float getShakeAmplitude() = 0; virtual float getShakeDistance() = 0; virtual bool getShakeFalloff() = 0; virtual float getShakeImpulse() = 0; // True: The light in this effect doesn't cast shadows virtual bool getNoShadows() = 0; // Causes the sibling action to happen when this action does. virtual const std::string& getFireSiblingAction() = 0; // Let the delay be random between min and max (in seconds) // If both are 0.0 no random delay is active and the regular delay is used instead virtual std::pair getRandomDelay() = 0; // According to the docs this is not used virtual float getRotate() = 0; // Move around with the entity (vs stationary after spawning) virtual bool getTrackOrigin() = 0; // True: the action starts again after the 'duration' has run out virtual bool getRestart() = 0; // Fade in the RGB of the light or model over