Class: Carbuncle::Sprite
- Defined in:
- gems/carbuncle-graphics/mrblib/sprite.rb
Instance Method Summary collapse
- #opacity ⇒ Object
- #opacity=(value) ⇒ Object
- #ox ⇒ Object
- #ox=(value) ⇒ Object
- #oy ⇒ Object
- #oy=(value) ⇒ Object
Instance Method Details
#opacity ⇒ Object
7 8 9 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 7 def opacity color.alpha end |
#opacity=(value) ⇒ Object
11 12 13 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 11 def opacity=(value) color.alpha = value end |
#ox ⇒ Object
15 16 17 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 15 def ox pivot.x * width end |
#ox=(value) ⇒ Object
23 24 25 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 23 def ox=(value) pivot.x = value.to_f / width end |
#oy ⇒ Object
19 20 21 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 19 def oy pivot.y * height end |
#oy=(value) ⇒ Object
27 28 29 |
# File 'gems/carbuncle-graphics/mrblib/sprite.rb', line 27 def oy=(value) pivot.y = value.to_f / height end |