Adds a color change at a certain point in a particle's life. For example a color added with Time=1 will make the particle equal the given color when it has been alive for 1 second.
procedure AddColorKeyFrame(const Time: Single; const Color: TAgkColor); overload;
|
Parameters |
Description |
|
const Time: Single |
The time that particles should become this color. |
|
const Color: TAgkColor |
The new color. |
If SmoothColorInterpolation is set to True, the particle will gradually transform from its current color to the next color. For example if you add three colors, red when Time=1, green when Time=2, and blue when Time=3, then the particle will start its life as red (as that is the nearest color) and remain completely red until it is 1 second old. When the particle is between 1 and 2 seconds old it will gradually change from red to green until it is 2 seconds old, at this point it is completely green. When the particle is between 2 and 3 seconds old it will gradually change from green to blue until it is 3 seconds old, at this point it is completely blue. The particle will remain completely blue until the end of its life as no other colors have been added.
|
Copyright (c) 2012. All rights reserved.
|