From b743c44e8f0f85d11bc08d5715a25e0979ce5384 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 5 Oct 2020 20:54:35 +0200 Subject: [PATCH] Add docs for generic effects --- doc/effects.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/effects.md b/doc/effects.md index 03d31a861..92f2ac733 100644 --- a/doc/effects.md +++ b/doc/effects.md @@ -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.