Sets a fill-based tint on this Game Object.
Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture with those in the tint. You can use this for effects such as making a player flash 'white' if hit by something. The whole Game Object will be rendered in the given color.
To modify the tint color once set, either call this method again with new values or use the
tint
property.
To remove a tint call clearTint
, or call this method with no parameters.
To swap this from being a fill-tint to an additive tint set the property tintFill
to false
.
name | type | arguments | Default | description |
---|---|---|---|---|
color | number | <optional> | 0xffffff |
The tint being applied to the entire Game Object. |
This Game Object instance.