ColorAction¶
Inherits: TimedAction
C++ type: ColorAction
Description¶
Animates the color property of its target object, interpolating from a start colour to an end colour over a fixed duration. Both RGB (Vector3) and RGBA (Vector4) variants are available.
Constructors¶
Available in C++ and Lua:
ColorAction(Scene* scene)— creates a new entity.ColorAction(Scene* scene, Entity entity)— wraps an existing entity without taking ownership.
In Lua, use ColorAction(scene, entity) to access an existing action. The entity must
already have the components required by this type; wrapping does not add them.
See EntityHandle ownership.
Methods¶
| Type | Name | Langs |
|---|---|---|
| void | setAction | C++ | Lua |
Method details¶
setAction¶
- void setAction(Vector3 startColor, Vector3 endColor, float duration, bool loop = false)
- void setAction(Vector4 startColor, Vector4 endColor, float duration, bool loop = false)
Configures the tween. The Vector3 overload interpolates RGB; the Vector4 overload includes alpha. duration is in seconds.