Class: Osb::Internal::LayerManager Private

Inherits:
Object
  • Object
show all
Defined in:
lib/osb/storyboard.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLayerManager

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of LayerManager.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/osb/storyboard.rb', line 16

def initialize
  # @type [Array<Osb::Sprite, Osb::Animation>]

  @background = []
  # @type [Array<Osb::Sprite, Osb::Animation>]

  @foreground = []
  # @type [Array<Osb::Sprite, Osb::Animation>]

  @fail = []
  # @type [Array<Osb::Sprite, Osb::Animation>]

  @pass = []
  # @type [Array<Osb::Sprite, Osb::Animation>]

  @overlay = []
  # @type [Array<Osb::Background, Osb::Video>]

  @bg_and_video = []
  # @type [Array<Osb::Sample>]

  @samples = []
end

Instance Attribute Details

#backgroundObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def background
  @background
end

#bg_and_videoObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def bg_and_video
  @bg_and_video
end

#failObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def fail
  @fail
end

#foregroundObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def foreground
  @foreground
end

#overlayObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def overlay
  @overlay
end

#passObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def pass
  @pass
end

#samplesObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/osb/storyboard.rb', line 8

def samples
  @samples
end

Instance Method Details

#add(object) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/osb/storyboard.rb', line 34

def add(object)
  case object
  when Osb::Sprite, Osb::Animation
    case object.layer
    when Layer::Background
      @background << object
    when Layer::Foreground
      @foreground << object
    when Layer::Fail
      @fail << object
    when Layer::Pass
      @pass << object
    when Layer::Overlay
      @overlay << object
    end
  when Osb::Sample
    @samples << object
  when Osb::Background, Osb::Video
    @bg_and_video << object
  end
end

#concat(group) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:



57
58
59
60
61
62
63
64
# File 'lib/osb/storyboard.rb', line 57

def concat(group)
  @background.concat(group.layers.background)
  @foreground.concat(group.layers.foreground)
  @fail.concat(group.layers.fail)
  @pass.concat(group.layers.pass)
  @overlay.concat(group.layers.overlay)
  @samples.concat(group.layers.samples)
end