Skip to content

Commit

Permalink
fixed name of trigger_when_is_changed in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
realtradam authored Jan 25, 2022
1 parent badc69e commit eb84d91
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ FelECS::Systems::PassiveRegen.trigger_when_added(@component)
FelECS::Systems::PassiveRegen.trigger_when_removed(@component)

# When this Component's health attribute is changed, this System will be called
FelECS::Systems::PassiveRegen.trigger_when_is_set(@component, :health)
FelECS::Systems::PassiveRegen.trigger_when_is_changed(@component, :health)
```

If we want these triggers to happen for all Components that belong to specific Component Manager then we can do that instead:
Expand All @@ -300,7 +300,7 @@ FelECS::Systems::PassiveRegen.trigger_when_added(@component_manager)
FelECS::Systems::PassiveRegen.trigger_when_removed(@component_manager)

# When this Component's health attribute from this Component Manager is changed, this System will be called
FelECS::Systems::PassiveRegen.trigger_when_is_set(@component_manager, :health)
FelECS::Systems::PassiveRegen.trigger_when_is_changed(@component_manager, :health)
```

We can create any number of these links between Systems, Components, and Component Manangers as we like, simply call the method again with our other Components and Component Managers
Expand All @@ -322,7 +322,7 @@ FelECS::Systems::PassiveRegen.clear_triggers(@component, :added)
# clear the 'trigger_when_removed' for this Component
FelECS::Systems::PassiveRegen.clear_triggers(@component, :removed)

# clear the 'trigger_when_is_set' for this Component specifically for the health attribute
# clear the 'trigger_when_is_changed' for this Component specifically for the health attribute
FelECS::Systems::PassiveRegen.clear_triggers(@component, :is_set, :health)
```

Expand All @@ -338,7 +338,7 @@ FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :added)
# clear the 'trigger_when_removed' for this Component Manager
FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :removed)

# clear the 'trigger_when_is_set' for this Component Manager specifically for the health attribute
# clear the 'trigger_when_is_changed' for this Component Manager specifically for the health attribute
FelECS::Systems::PassiveRegen.clear_triggers(@component_manager, :is_set, :health)
```

Expand Down

0 comments on commit eb84d91

Please sign in to comment.