#include "olcPixelGameEngine.h" #include "Animation.h" #include "olcUTIL_Animate2D.h" enum MonsterStrategy{ RUN_TOWARDS, SHOOT_AFAR }; struct MonsterData{ private: int hp; int atk; float moveSpd;//1.0=100% float size; MonsterStrategy strategy; Animate2D::Animationanimation; public: MonsterData(); MonsterData(int hp,int atk,float moveSpd=1.0f,float size=1.0f,MonsterStrategy strategy=RUN_TOWARDS); int GetHealth(); int GetAttack(); float GetMoveSpdMult(); float GetSizeMult(); MonsterStrategy GetAIStrategy(); }; enum MonsterName{ SLIME_GREEN, SLIME_BLUE, SLIME_RED, SLIME_YELLOW, }; struct Monster{ private: vf2d pos; int hp,maxhp; int atk; float moveSpd; float size; MonsterStrategy strategy; public: Monster(); Monster(vf2d pos,MonsterData data); vf2d&GetPos(); int GetHealth(); int GetAttack(); float GetMoveSpdMult(); float GetSizeMult(); }; struct MonsterSpawner{ vf2d pos; int range; std::vector>monsters; };