From 09fc5ef46b911f9d7e31cdedd240e7afc4c11c92 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 7 Jul 2021 17:49:00 -0400 Subject: completed functionality --- docs/FelFlame/Scenes.html | 761 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 761 insertions(+) create mode 100644 docs/FelFlame/Scenes.html (limited to 'docs/FelFlame/Scenes.html') diff --git a/docs/FelFlame/Scenes.html b/docs/FelFlame/Scenes.html new file mode 100644 index 0000000..00252ed --- /dev/null +++ b/docs/FelFlame/Scenes.html @@ -0,0 +1,761 @@ + + + + + + + Class: FelFlame::Scenes + + — Documentation by YARD 0.9.26 + + + + + + + + + + + + + + + + + + + +
+ + +

Class: FelFlame::Scenes + + + +

+
+ +
+
Inherits:
+
+ Object + +
    +
  • Object
  • + + + +
+ show all + +
+
+ + + + + + + + + + + +
+
Defined in:
+
felflame.rb,
+ scene_manager.rb
+
+
+ +
+ +

Overview

+
+ +

Creates and manages Scenes. Scenes are collections of Systems, and execute all the Systems when called upon.

+ +

TODO: Improve Scenes overview

+ + +
+
+
+ + +
+ + + +

Instance Attribute Summary collapse

+
    + +
  • + + + #const_name ⇒ Object + + + + + + + + + readonly + + + + + + + + + +
    +

    The Constant name assigned to this Scene.

    +
    + +
  • + + +
  • + + + #systems ⇒ Array<System> + + + + + + + + + + + + + + + + +
    +

    The list of Systems this Scene contains.

    +
    + +
  • + + +
+ + + + + +

+ Instance Method Summary + collapse +

+ + + + +
+

Constructor Details

+ +
+

+ + #initialize(name) ⇒ Scenes + + + + + +

+
+ +

Create a new Scene using the name given

+ + +
+
+
+

Parameters:

+
    + +
  • + + name + + + (String) + + + + — +
    +

    String format must follow requirements of a constant

    +
    + +
  • + +
+ + +
+ + + + +
+
+
+
+10
+11
+12
+13
+
+
# File 'scene_manager.rb', line 10
+
+def initialize(name)
+  FelFlame::Scenes.const_set(name, self)
+  @const_name = name
+end
+
+
+ +
+ +
+

Instance Attribute Details

+ + + +
+

+ + #const_nameObject (readonly) + + + + + +

+
+ +

The Constant name assigned to this Scene

+ + +
+
+
+ + +
+ + + + +
+
+
+
+4
+5
+6
+
+
# File 'scene_manager.rb', line 4
+
+def const_name
+  @const_name
+end
+
+
+ + + +
+

+ + #systemsArray<System> + + + + + +

+
+ +

The list of Systems this Scene contains

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Array<System>) + + + +
  • + +
+ +
+ + + + +
+
+
+
+17
+18
+19
+
+
# File 'scene_manager.rb', line 17
+
+def systems
+  @systems ||= []
+end
+
+
+ +
+ + +
+

Instance Method Details

+ + +
+

+ + #add(*systems_to_add) ⇒ Boolean + + + + + +

+
+ +

Adds any number of Systems to this Scene

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +
    +

    true

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+30
+31
+32
+33
+34
+35
+
+
# File 'scene_manager.rb', line 30
+
+def add(*systems_to_add)
+  self.systems |= systems_to_add
+  systems.sort_by!(&:priority)
+  FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self
+  true
+end
+
+
+ +
+

+ + #callBoolean + + + + + +

+
+ +

Execute all systems in this Scene, in the order of their priority

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +
    +

    true

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+23
+24
+25
+26
+
+
# File 'scene_manager.rb', line 23
+
+def call
+  systems.each(&:call)
+  true
+end
+
+
+ +
+

+ + #clearBoolean + + + + + +

+
+ +

Removes all Systems from this Scene

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +
    +

    true

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+48
+49
+50
+51
+52
+
+
# File 'scene_manager.rb', line 48
+
+def clear
+  systems.clear
+  FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self
+  true
+end
+
+
+ +
+

+ + #remove(*systems_to_remove) ⇒ Boolean + + + + + +

+
+ +

Removes any number of SystemS from this Scene

+ + +
+
+
+ +

Returns:

+
    + +
  • + + + (Boolean) + + + + — +
    +

    true

    +
    + +
  • + +
+ +
+ + + + +
+
+
+
+39
+40
+41
+42
+43
+44
+
+
# File 'scene_manager.rb', line 39
+
+def remove(*systems_to_remove)
+  self.systems -= systems_to_remove
+  systems.sort_by!(&:priority)
+  FelFlame::Stage.update_systems_list if FelFlame::Stage.scenes.include? self
+  true
+end
+
+
+ +
+ +
+ + + +
+ + \ No newline at end of file -- cgit v1.2.3