Click or drag to resize
PlanBaseModulateColor Method
Modulate/scale the specified color channel of the specified sprite to the specified level.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual void ModulateColor(
	SpriteBase Sprite,
	PlanBaseColorChannel Channel,
	int Level
)

Parameters

Sprite
Type: (Default Namespace)SpriteBase
Sprite whose appearance will be altered/restored
Channel
Type: (Default Namespace)PlanBaseColorChannel
Which color channel will be affected
Level
Type: SystemInt32
Specifies the level to which the channel will be modulated
Remarks
Modulating a color channel means that its output will be scaled down to the specified level
Examples
The following example scales the blue channel to 128 (half) which will cause the sprite to appear more yellow, green or red than normal:
ModulateColor(m_ParentLayer.m_Player_1, ColorChannel.Blue, 128);
The following example scales the alpha channel to 128 (half) which will cause the sprite to appear semi-transparent:
ModulateColor(m_ParentLayer.m_Player_1, ColorChannel.Alpha, 128);
See Also