From 4758c32fbd5cba714341f9735a994fd244664ff7 Mon Sep 17 00:00:00 2001 From: realtradam Date: Wed, 7 Jul 2021 01:06:51 -0400 Subject: cleaned up documentation a little --- docs/FelFlame/Systems.html | 366 +++++++++++++++++++-------------------------- 1 file changed, 150 insertions(+), 216 deletions(-) (limited to 'docs/FelFlame/Systems.html') diff --git a/docs/FelFlame/Systems.html b/docs/FelFlame/Systems.html index 8961bf1..1bc342a 100644 --- a/docs/FelFlame/Systems.html +++ b/docs/FelFlame/Systems.html @@ -129,7 +129,7 @@
  • - #addition_triggers ⇒ Object + #addition_triggers ⇒ Array<Component> @@ -138,30 +138,7 @@ - - - - - - - - -
    - -
  • - - -
  • - - - #attr_triggers ⇒ Object - - - - - - - + readonly @@ -171,7 +148,9 @@ -
    +
    +

    Stores references to components or their managers that trigger this component when a component or component from that manager is added to an entity.

    +
  • @@ -179,7 +158,7 @@
  • - #const_name ⇒ Object + #attr_triggers ⇒ Hash<Symbol, Array<Symbol>> @@ -188,6 +167,8 @@ + readonly + @@ -197,7 +178,7 @@
    -

    The Constant name assigned to this System.

    +

    Stores references to systems that should be triggered when an attribute from this manager is changed Do not edit this hash as it is managed by FelFlame automatically.

  • @@ -206,7 +187,7 @@
  • - #frame ⇒ Object + #const_name ⇒ Object @@ -224,7 +205,7 @@
    -

    How many frames need to pass before this System is executed when controlled by Stage.

    +

    The Constant name assigned to this System.

  • @@ -260,7 +241,7 @@
  • - #removal_triggers ⇒ Object + #removal_triggers ⇒ Array<Component> @@ -269,6 +250,8 @@ + readonly + @@ -277,7 +260,9 @@ -
    +
    +

    Stores references to components or their managers that trigger this component when a component or component from that manager is removed from an entity.

    +
  • @@ -423,30 +408,6 @@

    Redefine what code is executed by this System when it is called upon.

    - - - -
  • - - - #step ⇒ Boolean - - - - - - - - - - - - - -
    -

    Attempt to execute the system following the frame parameter set on this system.

    -
    -
  • @@ -557,8 +518,7 @@ component.hp += 5 end end -# Only heal all characters with health every other frame. -# Give it a low priority so other systems such as a +# Give it a low priority so other systems such as a # Poison system would kill the player first @@ -624,15 +584,15 @@
     
     
    -56
    -57
    -58
    -59
    -60
    -61
    +67 +68 +69 +70 +71 +72 -
    # File 'system_manager.rb', line 56
    +      
    # File 'system_manager.rb', line 67
     
     def initialize(name, priority: 0, &block)
       FelFlame::Systems.const_set(name, self)
    @@ -655,59 +615,51 @@
           

    - #addition_triggersObject + #addition_triggersArray<Component> -

    - - - - -
    -
    -
    +
    +
    + +

    Stores references to components or their managers that trigger this component when a component or component from that manager is added to an entity. Do not edit this hash as it is managed by FelFlame automatically.

    -14 -15 -16
    -
    -
    # File 'system_manager.rb', line 14
     
    -def addition_triggers
    -  @addition_triggers ||= []
    -end
    -
    +
    - - - -
    -

    +
    - #attr_triggersObject +

    Returns:

    +
      - +
    • + + + (Array<Component>) + + + +
    • +
    - -

    +
    @@ -715,11 +667,11 @@ - +
    -

    +

    - #const_nameObject + #attr_triggersHash<Symbol, Array<Symbol>> @@ -728,13 +680,26 @@

    -

    The Constant name assigned to this System

    +

    Stores references to systems that should be triggered when an attribute from this manager is changed Do not edit this hash as it is managed by FelFlame automatically.

    +

    Returns:

    +
      + +
    • + + + (Hash<Symbol, Array<Symbol>>) + + + +
    • + +
     
     
    -26
    -27
    -28
    +20 +21 +22
    -
    # File 'system_manager.rb', line 26
    +      
    # File 'system_manager.rb', line 20
     
    -def attr_triggers
    -  @attr_triggers ||= {}
    +def addition_triggers
    +  @addition_triggers ||= []
     end
    @@ -742,15 +707,15 @@
     
     
    -7
    -8
    -9
    +38 +39 +40 @@ -758,11 +723,11 @@ - +
    -

    +

    - #frameObject + #const_nameObject @@ -771,7 +736,7 @@

    -

    How many frames need to pass before this System is executed when controlled by FelFlame::Stage

    +

    The Constant name assigned to this System

    @@ -785,15 +750,15 @@
     
     
    -10
    -11
    -12
    +7 +8 +9
    @@ -848,24 +813,48 @@

    - #removal_triggersObject + #removal_triggersArray<Component> -

    -
    # File 'system_manager.rb', line 7
    +      
    # File 'system_manager.rb', line 38
     
    -def const_name
    -  @const_name
    +def attr_triggers
    +  @attr_triggers ||= {}
     end
    -
    # File 'system_manager.rb', line 10
    +      
    # File 'system_manager.rb', line 7
     
    -def frame
    -  @frame
    +def const_name
    +  @const_name
     end
    +
    +
    + +

    Stores references to components or their managers that trigger this component when a component or component from that manager is removed from an entity. Do not edit this hash as it is managed by FelFlame automatically.

    + + +
    +
    +
    + +

    Returns:

    +
      + +
    • + + + (Array<Component>) + + + +
    • + +
    + +
     
     
    -20
    -21
    -22
    +29 +30 +31
    -
    # File 'system_manager.rb', line 20
    +      
    # File 'system_manager.rb', line 29
     
     def removal_triggers
       @removal_triggers ||= []
    @@ -921,12 +910,12 @@
           
     
     
    -35
    -36
    -37
    +47 +48 +49
    -
    # File 'system_manager.rb', line 35
    +      
    # File 'system_manager.rb', line 47
     
     def each(&block)
       constants.map { |sym| const_get(sym) }.sort_by(&:priority).reverse.each(&block)
    @@ -968,12 +957,12 @@
           
     
     
    -64
    -65
    -66
    +75 +76 +77
    -
    # File 'system_manager.rb', line 64
    +      
    # File 'system_manager.rb', line 75
     
     def call
       @block.call
    @@ -1086,10 +1075,6 @@
           
     
     
    -103
    -104
    -105
    -106
     107
     108
     109
    @@ -1154,10 +1139,14 @@
     168
     169
     170
    -171
    +171 +172 +173 +174 +175
    -
    # File 'system_manager.rb', line 103
    +      
    # File 'system_manager.rb', line 107
     
     def clear_triggers(*trigger_types, component_or_manager: nil)
       trigger_types = [:addition_triggers, :removal_triggers, :attr_triggers] if trigger_types.empty?
    @@ -1279,12 +1268,12 @@
           
     
     
    -76
    -77
    -78
    +80 +81 +82
    -
    # File 'system_manager.rb', line 76
    +      
    # File 'system_manager.rb', line 80
     
     def redefine(&block)
       @block = block
    @@ -1292,61 +1281,6 @@
         
    -
    - -
    -

    - - #stepBoolean - - - - - -

    -
    - -

    Attempt to execute the system following the frame parameter set on this system. For example if a System has its frame set to 3, it will only execute once every third frame that is called in FelFlame::Stage

    - - -
    -
    -
    - -

    Returns:

    -
      - -
    • - - - (Boolean) - - - - — -
      -

      true if the frame of the FelFlame::Stage is a multiple of this System's frame setting and this system has executed, false otherwise where the system has not executed.

      -
      - -
    • - -
    - -
    - - - - -
    -
    -
    -
    -72
    -
    -
    # File 'system_manager.rb', line 72
    -
    -def step; end
    -
    @@ -1413,14 +1347,14 @@
     
     
    -176
    -177
    -178
    -179
    -180
    +180 +181 +182 +183 +184
    -
    # File 'system_manager.rb', line 176
    +      
    # File 'system_manager.rb', line 180
     
     def trigger_when_added(component_or_manager)
       self.addition_triggers |= [component_or_manager]
    @@ -1458,10 +1392,6 @@
           
     
     
    -192
    -193
    -194
    -195
     196
     197
     198
    @@ -1469,10 +1399,14 @@
     200
     201
     202
    -203
    +203 +204 +205 +206 +207
    -
    # File 'system_manager.rb', line 192
    +      
    # File 'system_manager.rb', line 196
     
     def trigger_when_is_changed(component_or_manager, attr)
       if component_or_manager.attr_triggers[attr].nil?
    @@ -1555,14 +1489,14 @@
           
     
     
    -185
    -186
    -187
    -188
    -189
    +189 +190 +191 +192 +193
    -
    # File 'system_manager.rb', line 185
    +      
    # File 'system_manager.rb', line 189
     
     def trigger_when_removed(component_or_manager)
       self.removal_triggers |= [component_or_manager]
    @@ -1579,7 +1513,7 @@
     
     
           
    -- 
    cgit v1.2.3