From 9d590665caa9f282e4a7365b10e1ba8a85e384d9 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Thu, 14 Oct 2021 07:39:38 -0400 Subject: Leaves can now fall off of the tree --- themes/LeafParticleRender.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'themes/LeafParticleRender.h') diff --git a/themes/LeafParticleRender.h b/themes/LeafParticleRender.h index c305363..0627322 100644 --- a/themes/LeafParticleRender.h +++ b/themes/LeafParticleRender.h @@ -15,11 +15,23 @@ struct LeafParticleUpdateData { Renderer2dVertex* vertexToFollow = NULL; Vector4 color = Vector4(1.f, 0.f, 0.f, 0.f); float32 scale = 1.f; - Vector2 fallDirection; + + float32 timeFallingSeconds = 0.f; + bool isFalling = false; + int32 fallChance = -1; + Vector2 fallPosition; + float32 fallVerticalVelocity; + float32 fallHorizontalFrequency; + + bool onGround = false; + Renderer2dVertex* vertexPtr = NULL; }; struct LeafParticleRender { + float32 elapsedTimeSeconds = 0.5; + float32 fallIntervalSeconds = 1.f; + // Update data int32 numLeaves = 0; -- cgit v1.2.1