data driving walls

This commit is contained in:
Andrew Haynes Macbook
2026-01-14 16:05:17 -05:00
parent 1fa3293df0
commit ad2d01ab05
12 changed files with 319 additions and 209 deletions
+21 -7
View File
@@ -1,14 +1,28 @@
#ifndef SCHEDULER_HPP
#define SCHEDULER_HPP
struct Times {
float dash_cooldown { 0 };
float dash_cooldown_max { .5 };
float level_switch_cooldown { 0 };
float level_switch_cooldown_max { 1 };
#include <ctime>
#include <string>
#include <vector>
class Timer {
public:
Timer(std::string name, float max_time) : name(name), max_time(max_time) {};
bool below_or_zero();
float get_time();
std::string get_name();
void reset();
void update();
private:
float time = 0;
const float max_time;
const std::string name;
};
struct Timer {
void update_timers(bool& running, Times& times);
struct Scheduler {
std::vector<Timer> timers;
void update(bool& running, std::vector<Timer>& times);
int pull(std::vector<Timer>& times, std::string name);
};
#endif