sdl_runtime_compiler git · main
SDL3 game for running and compiling code at runtime
C++ 72.3% C 26.2%git clone https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler.gitwget https://git.christianimmanuel.de/sdl-graphics/sdl_runtime_compiler/archive/sdl_runtime_compiler.tar.gzsrc/systems/word_ai_system.hpp raw
#pragma once
#include "utils/globals.hpp"
#include "text/token.hpp"
namespace
Nimbin
{
struct CarriedLine;
struct Player;
class WordAiSystem
{
int _max_active_ai = 5;
void update_Idle (Text::Token::Data& w, const Player& p, int active_ai_count, double dt);
void update_Attack(Text::Token::Data& w, const Player& p, CarriedLine& carried,
DynArray<Text::TokenPtr>& all_words,
DynArray<Text::TokenPtr>& dropped,
DynArray<Text::TokenPtr>& released,
double dt);
void update_Flee (Text::Token::Data& w, const Player& p,
DynArray<Text::TokenPtr>& released, double dt);
void update_Stunned (Text::Token::Data& w, DynArray<Text::TokenPtr>& released, double dt);
void update_StolenTrail(Text::Token::Data& w, double dt);
void release_StolenWords(Text::Token::Data& w, DynArray<Text::TokenPtr>& out);
void enter_Attack (Text::Token::Data& w);
void enter_Flee (Text::Token::Data& w);
void enter_Stunned (Text::Token::Data& w);
void enter_Idle (Text::Token::Data& w);
void apply_Locomotion(Text::Token::Data& w, const Vec3& target_vel, double dt);
public:
void set_MaxActiveAi (int n) { _max_active_ai = n; }
void update (DynArray<Text::TokenPtr>& words,
const Player& player,
CarriedLine& carried,
DynArray<Text::TokenPtr>& dropped,
double dt);
};
} // namespace Nimbin