Merge pull request #6641 from rexrainbow/gameobject-tint-getter

Add getter of tint property
This commit is contained in:
Richard Davey 2023-11-08 15:29:29 +00:00 committed by GitHub
commit 2d1c24cc3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -182,7 +182,7 @@ var Tint = {
/**
* The tint value being applied to the whole of the Game Object.
* This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.
* Return `tintTopLeft` when read this tint property.
*
* @name Phaser.GameObjects.Components.Tint#tint
* @type {number}
@ -191,6 +191,11 @@ var Tint = {
*/
tint: {
get: function()
{
return this.tintTopLeft;
},
set: function (value)
{
this.setTint(value, value, value, value);