Module: RGSS3::Container
Overview
common methods for Plane, Sprite
Constant Summary collapse
- BLEND =
{0 => :default, 1 => :additive, 2 => :subtractive}
Instance Attribute Summary collapse
-
#bitmap ⇒ Object
Returns the value of attribute bitmap.
-
#blend_type ⇒ Object
Returns the value of attribute blend_type.
-
#color ⇒ Object
Returns the value of attribute color.
-
#opacity ⇒ Object
Returns the value of attribute opacity.
-
#ox ⇒ Object
Returns the value of attribute ox.
-
#oy ⇒ Object
Returns the value of attribute oy.
-
#tone ⇒ Object
Returns the value of attribute tone.
-
#viewport ⇒ Object
Returns the value of attribute viewport.
-
#visible ⇒ Object
Returns the value of attribute visible.
-
#z ⇒ Object
Returns the value of attribute z.
-
#zoom_x ⇒ Object
Returns the value of attribute zoom_x.
-
#zoom_y ⇒ Object
Returns the value of attribute zoom_y.
Instance Method Summary collapse
- #dispose ⇒ Object
- #disposed? ⇒ Boolean
-
#do_draw ⇒ Object
this method is used internally by Graphics.
-
#draw ⇒ Object
overwrite.
- #initialize(viewport = nil) ⇒ Object
- #initialize_copy ⇒ Object
Instance Attribute Details
#bitmap ⇒ Object
Returns the value of attribute bitmap.
10 11 12 |
# File 'lib/rgss3/container.rb', line 10 def bitmap @bitmap end |
#blend_type ⇒ Object
Returns the value of attribute blend_type.
11 12 13 |
# File 'lib/rgss3/container.rb', line 11 def blend_type @blend_type end |
#color ⇒ Object
Returns the value of attribute color.
11 12 13 |
# File 'lib/rgss3/container.rb', line 11 def color @color end |
#opacity ⇒ Object
Returns the value of attribute opacity.
12 13 14 |
# File 'lib/rgss3/container.rb', line 12 def opacity @opacity end |
#ox ⇒ Object
Returns the value of attribute ox.
6 7 8 |
# File 'lib/rgss3/container.rb', line 6 def ox @ox end |
#oy ⇒ Object
Returns the value of attribute oy.
6 7 8 |
# File 'lib/rgss3/container.rb', line 6 def oy @oy end |
#tone ⇒ Object
Returns the value of attribute tone.
8 9 10 |
# File 'lib/rgss3/container.rb', line 8 def tone @tone end |
#viewport ⇒ Object
Returns the value of attribute viewport.
7 8 9 |
# File 'lib/rgss3/container.rb', line 7 def @viewport end |
#visible ⇒ Object
Returns the value of attribute visible.
7 8 9 |
# File 'lib/rgss3/container.rb', line 7 def visible @visible end |
#z ⇒ Object
Returns the value of attribute z.
6 7 8 |
# File 'lib/rgss3/container.rb', line 6 def z @z end |
#zoom_x ⇒ Object
Returns the value of attribute zoom_x.
9 10 11 |
# File 'lib/rgss3/container.rb', line 9 def zoom_x @zoom_x end |
#zoom_y ⇒ Object
Returns the value of attribute zoom_y.
9 10 11 |
# File 'lib/rgss3/container.rb', line 9 def zoom_y @zoom_y end |
Instance Method Details
#dispose ⇒ Object
36 37 38 39 40 |
# File 'lib/rgss3/container.rb', line 36 def dispose @disposed = true @bitmap = nil Graphics.remove_container(self) end |
#disposed? ⇒ Boolean
42 43 44 |
# File 'lib/rgss3/container.rb', line 42 def disposed? @disposed end |
#do_draw ⇒ Object
this method is used internally by Graphics
55 56 57 58 |
# File 'lib/rgss3/container.rb', line 55 def do_draw return if !@visible || @opacity == 0 || @bitmap.nil? || @bitmap.disposed? draw end |
#draw ⇒ Object
overwrite
51 52 |
# File 'lib/rgss3/container.rb', line 51 def draw end |
#initialize(viewport = nil) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rgss3/container.rb', line 16 def initialize( = nil) @visible = true @z = 0 @ox = 0 @oy = 0 @tone = Tone.new @viewport = @zoom_x = @zoom_y = 1.0 @blend_type = 0 @color = Color.new @opacity = 255 Graphics.add_container(self) end |
#initialize_copy ⇒ Object
30 31 32 33 34 |
# File 'lib/rgss3/container.rb', line 30 def initialize_copy copy = super Graphics.add_container(copy) copy end |