From c099bf2d93c2bffa9d54668bfcf7547c1481c9c3 Mon Sep 17 00:00:00 2001 From: Clement Date: Wed, 15 Dec 2021 19:50:25 +0100 Subject: [PATCH] Readme --- include/entity/strategies/README.md | 14 ++++++++++++++ include/entity/strategies/controllable.h | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 include/entity/strategies/README.md diff --git a/include/entity/strategies/README.md b/include/entity/strategies/README.md new file mode 100644 index 0000000..11ba9be --- /dev/null +++ b/include/entity/strategies/README.md @@ -0,0 +1,14 @@ +Interfaces: + +``` +(1) Events Cond/Ett: void flush(unsigned short [NB_KEYS]) +(2) Collisions Cond/PhX : std::vector checkCollision(std::vector) +(3) Pos Update Cond/Ett : +``` + +RQ sur (2): +le cond envoie TOUT, la phX teste si les hitbox "toucheur" collisionnent les "touchable" +struct collisionner: + toucheur + touché + vector d'intrication \ No newline at end of file diff --git a/include/entity/strategies/controllable.h b/include/entity/strategies/controllable.h index 001b619..a0f9d2c 100644 --- a/include/entity/strategies/controllable.h +++ b/include/entity/strategies/controllable.h @@ -3,6 +3,8 @@ #include "strategy.h" #include +#define NB_KEYS 256 + class Controllable : public virtual Strategy @@ -13,7 +15,7 @@ class Controllable : public virtual Strategy Controllable(/* args */); ~Controllable(); - void flush(unsigned short[][] inputs); //flush ? events ?, receive an array of boolean (flags) representing if some keys are pressed, + void flush(unsigned short[NB_KEYS] inputs); //flush ? events ?, receive an array of boolean (flags) representing if some keys are pressed, // WARNIGN needs a convention (between conductor.ControllableHandler and this class) on that boolean array };