Class: Sprite::WithColor
- Inherits:
-
Sprite
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Sprite
- LiteRGSS::ShaderedSprite
- Sprite
- Sprite::WithColor
- Defined in:
- scripts/00000 Dependencies/00001 LiteRGSS2/00003 Drawable.rb
Overview
Define a sprite that mix with a color
Instance Attribute Summary
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#color=(array) ⇒ self
(also: #set_color)
Set the Sprite color.
-
#initialize(viewport = nil) ⇒ WithColor
constructor
Create a new Sprite::WithColor.
Methods inherited from Sprite
#load, #mouse_in?, #set_origin_div, #set_rect, #set_rect_div, #set_z, #simple_mouse_in?, #translate_mouse_coords, #update
Methods inherited from LiteRGSS::Sprite
new, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
Instance Method Details
#color=(array) ⇒ self Also known as: set_color
Set the Sprite color
84 85 86 87 |
# File 'scripts/00000 Dependencies/00001 LiteRGSS2/00003 Drawable.rb', line 84 def color=(array) shader.set_float_uniform('color', array) return self end |