Details
Add EnergyBar effect to your Sprite Renderer and Unity UI Canvas Image.
Add it to the Sprite Renderer or Unity UI Canvas Image GameObject via the Components menu
2DxFX > Standard > EnergyBar
4 Gradients is available in Advanced Lightning Mode. Via the Components menu
2DxFX > Advanced Lightning > EnergyBar
Note : Advanced Lightning is not working with the Unity UI Canvas (UI Canvas don't use lightning)
*without and with 2DxFX EnergyBar
Property |
Range |
Default |
---|---|---|
_Alpha | 0 to 1 | 1f |
BarProgress | 0f to 1f | 0.5f |
_Value2 | 0.9f to 1f | 0.975f |
_Value3 | 0f to 0.5f | 0.5f |
_Value4 | 0f to 1f | 1.0f |
_Value5 | 0f to 1f | 0.0f |
Manipulate EnergyBar by script
Example:
// Drag and Drop your Sprite GameObject
// with the EnergyBar component
// to your current script on the FX_Standard_EnergyBar field
public _2dxFX_EnergyBar_Editor FX_EnergyBar;
void Update()
{
FX_EnergyBar._Alpha = 1f;
}