AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

RB.TintColorSet

Method  -  Static

public static void TintColorSet(Color32 tintColor)

Parameters

tintColor Color32 Tint color

Returns

Nothing.

Description

Set the tint color for drawing. A color tint has a similar effect to placing colored glass in front of a camera. This effect has many uses, such as coloring a character green to indicate that they are poisoned.

The tint color will remain in effect until a different value is set.

Example

void Render()
{
    var oldTint = RB.TintColorGet();

    // Draw the the hero with a green tint if poisoned
    if (poisoned) {
        RB.TintColorSet(Color.green);
    }

    RB.DrawSprite("hero"new Vector2i(00));

    RB.TintColorSet(oldTint);
}

See Also

RB.TintColorGet

See Docs

Features - Color Tinting