summaryrefslogtreecommitdiff
path: root/themes/LeafParticleRender.h
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-10-23 09:50:55 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-10-23 09:50:55 -0400
commitac9c187740797c5f8105b052bc057d274edc4be1 (patch)
treeaa03267c14044ff2a4ea25d72954f409b7d9b637 /themes/LeafParticleRender.h
parent5ee0e7a8dbd647b79073beee88e82870e181b363 (diff)
(mkosarek) Better reemerging
Diffstat (limited to 'themes/LeafParticleRender.h')
-rw-r--r--themes/LeafParticleRender.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/themes/LeafParticleRender.h b/themes/LeafParticleRender.h
index 9f5d5f4..28c9bc1 100644
--- a/themes/LeafParticleRender.h
+++ b/themes/LeafParticleRender.h
@@ -10,20 +10,26 @@ struct LeafParticleLoadData {
int numLeaves = 48;
};
+enum LeafParticleState {
+ OnTree,
+ Falling,
+ OnGround,
+ Remerging
+};
+
struct LeafParticleUpdateData {
- bool canFall = false;
+ LeafParticleState state = LeafParticleState::Remerging;
+
Renderer2dVertex* vertexToFollow = NULL;
Vector4 color = Vector4(1.f, 0.f, 0.f, 0.f);
float32 scale = 1.f;
- float32 timeFallingSeconds = 0.f;
- bool isFalling = false;
+ float32 timeElapsedSeconds = 0.f;
int32 fallChance = -1;
Vector2 fallPosition;
float32 fallVerticalVelocity;
float32 fallHorizontalFrequency;
- bool onGround = false;
float32 resetTime = 0.f;
Renderer2dVertex* vertexPtr = NULL;