mirror of
https://github.com/flame-engine/flame.git
synced 2025-11-16 04:38:42 +08:00
Add docs for generic effects
This commit is contained in:
committed by
Lukas Klingsbo
parent
f0349688a7
commit
b743c44e8f
@@ -1,7 +1,9 @@
|
||||
# Effects
|
||||
An effect can be applied to any `PositionComponent`, there are currently two effects that you can use and that is the MoveEffect and the ScaleEffect.
|
||||
An effect can be applied to any `Component` that the effect supports.
|
||||
|
||||
If you want to create an effect that only runs once only specify the required parameters of your wanted Effect class.
|
||||
At the moment there are only `PositionComponentEffect`s, which are applied to PositionComponent`'s, which are presented below.
|
||||
|
||||
If you want to create an effect for another component just extend the `ComponentEffect` class and add your created effect to the component by calling `component.addEffect(yourEffect)`.
|
||||
|
||||
## More advanced effects
|
||||
Then there are two optional boolean parameters called `isInfinite` and `isAlternating`, by combining them you can get different effects.
|
||||
|
||||
Reference in New Issue
Block a user