Files
Cubed/include/Cubed/tools/cubed_random.hpp
zhenyan121 412f88565a feat(ai): add wander AI system with move boost
Add AIBase and WanderAITag components, a WanderAISystem, and a MoveBoost component to control wandering behavior. Replace the old MoveState with MoveBoost and include a horizontal random direction helper.
2026-07-31 19:59:33 +08:00

27 lines
495 B
C++

#pragma once
#include "glm/ext/vector_float3.hpp"
#include <random>
namespace Cubed {
class Random {
public:
Random();
Random(unsigned seed);
bool random_bool(double probability);
std::mt19937& engine();
unsigned seed();
void init(unsigned seed);
int random_int(int min, int max);
float random_float(float min, float max);
glm::vec3 random_direction_horizontal();
private:
unsigned int m_seed = 0;
std::mt19937 m_engine;
};
} // namespace Cubed