summaryrefslogtreecommitdiff
path: root/themes/src/spring/SpringTheme.hpp
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2023-04-03 06:35:27 -0400
committermattkae <mattkae@protonmail.com>2023-04-03 06:35:27 -0400
commit5d3ff36045bfb11af0f373d5ecee7c9b54e4c4f9 (patch)
tree1877c85fc652603312c1093ff31678ab807616b2 /themes/src/spring/SpringTheme.hpp
parent9e21251ea16e594c8ef416cf8a6b8ebbbb42a858 (diff)
Folderized all of the seasons and loading the shaders from a remote source
Diffstat (limited to 'themes/src/spring/SpringTheme.hpp')
-rw-r--r--themes/src/spring/SpringTheme.hpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/themes/src/spring/SpringTheme.hpp b/themes/src/spring/SpringTheme.hpp
new file mode 100644
index 0000000..0866921
--- /dev/null
+++ b/themes/src/spring/SpringTheme.hpp
@@ -0,0 +1,41 @@
+#ifndef SPRING_THEME_HPP
+#define SPRING_THEME_HPP
+
+#include "../mathlib.h"
+#include "../types.h"
+#include "../Renderer3d.h"
+
+
+enum class SpringThemeState {
+ Loading = 0,
+ LoadedShader,
+ LoadedBunny,
+ PreHop,
+ Hopping,
+ Idle
+};
+
+struct SpringTheme {
+ Renderer3d renderer;
+ SpringThemeState state;
+ f32 bunnySpeed = 5.f;
+ Vector3 bunnyPosition = Vector3(0, 0, 0);
+ Vector3 bunnyTarget = Vector3(0, 0, 0);
+ Vector3 hopIncrement = Vector3(0, 0, 0);
+
+ f32 numHops = 0;
+ f32 hopCount = 0;
+ f32 bunnyHopAnimationTimer = 0.f;
+ f32 stateTimer = 0.f;
+ f32 bunnyRotation = 0.f;
+ f32 targetRotation = 0.f;
+
+ Mesh3d bunnyMesh;
+
+ void load(WebglContext*);
+ void update(f32 dtSeconds);
+ void render();
+ void unload();
+};
+
+#endif \ No newline at end of file