Skip to content

Commit d5473a4

Browse files
committed
Added setTintFill method
1 parent 18120cb commit d5473a4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

src/gameobjects/rope/Rope.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,30 @@ var Rope = new Class({
209209
return this;
210210
},
211211

212+
/**
213+
* Swap this Game Object from using a fill-tint to an additive tint.
214+
*
215+
* Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture
216+
* with those in the tint. You can use this for effects such as making a player flash 'white'
217+
* if hit by something. See the `setColors` method for details of tinting the vertices.
218+
*
219+
* @method Phaser.GameObjects.Rope#setTintFill
220+
* @webglOnly
221+
* @since 3.23.0
222+
*
223+
* @param {boolean} [value=false] - Use tint fill (`true`) or an additive tint (`false`)
224+
*
225+
* @return {this} This Game Object instance.
226+
*/
227+
setTintFill: function (value)
228+
{
229+
if (value === undefined) { value = false; }
230+
231+
this.tintFill = value;
232+
233+
return this;
234+
},
235+
212236
/**
213237
* Set the alpha values used by the Rope during rendering.
214238
*

0 commit comments

Comments
 (0)