Class: Carbuncle::Sprite

Inherits:
Object show all
Defined in:
gems/carbuncle-graphics/mrblib/sprite.rb

Instance Method Summary collapse

Instance Method Details

#opacityObject



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

#oxObject



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

#oyObject



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