Difference between revisions of "SpriteBatch:setColor"

m
m
Line 2: Line 2:
 
Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch.
 
Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch.
  
The global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.
+
In version [[0.9.2]] and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.
  
 
== Function ==
 
== Function ==

Revision as of 13:23, 20 August 2016

Available since LÖVE 0.8.0
This method is not supported in earlier versions.

Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch.

In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color.

Function

Synopsis

SpriteBatch:setColor( r, g, b, a )

Arguments

number r
The amount of red.
number g
The amount of green.
number b
The amount of blue.
number a (255)
The amount of alpha.

Returns

Nothing.

Function

Disables all per-sprite colors for this SpriteBatch.

Synopsis

SpriteBatch:setColor( )

Arguments

None.

Returns

Nothing.

See Also


Other Languages