diff --git a/Nidrobb_UML.html b/Nidrobb_UML.html
new file mode 100644
index 0000000..311ca8b
--- /dev/null
+++ b/Nidrobb_UML.html
@@ -0,0 +1,12 @@
+
+
+
+Draw.io Diagram
+
+
+
+
+
+
+
+
diff --git a/Nidrobb_UML.png b/Nidrobb_UML.png
new file mode 100644
index 0000000..3da0594
Binary files /dev/null and b/Nidrobb_UML.png differ
diff --git a/README.pdf b/README.pdf
new file mode 100644
index 0000000..c2dff28
Binary files /dev/null and b/README.pdf differ
diff --git a/src/Animation/Animation.cpp b/src/Animation/Animation.cpp
new file mode 100644
index 0000000..a939360
--- /dev/null
+++ b/src/Animation/Animation.cpp
@@ -0,0 +1,100 @@
+#include "Animation.hpp"
+
+Animation::Animation(const string& name, const vector frames):_name(name)//, _frames(frames)
+{
+ //VERIFIER BONNE TRANSMISSION DES FRAMES
+ for(AnimationFrame* frame : frames)
+ {
+ //cout<<" anim: "<center().first<<"/"<center().second<& Animation::nextFrame()
+{
+ unsigned int res;
+ //cout<<"Progress : "<< _progress << "/"<<_duration <center().first<<"/"<<_frames[res]->center().second<center();
+}
+
+//Vérifie si une hitbox rentre en collision active avec la frame active
+bool Animation::collideA(const SDL_Rect* box) const
+{
+ if(_frames[_progress]->collideA(box))
+ return true;
+ else
+ return false;
+}
+
+//Vérifie si une hitbox rentre en collision passive avec la frame active
+bool Animation::collideP(const SDL_Rect* box) const
+{
+ if(_frames[_progress]->collideP(box))
+ return true;
+ else
+ return false;
+}
+
+//Bloque toute les frames à une position donnée (repère SDL)
+void Animation::holdPos(const pair& pos)
+{
+ for(AnimationFrame* a : _frames)
+ {
+ a->translate(pos);
+ }
+}
+
+Animation& Animation::operator=(const Animation& a)
+{
+ _name = a.name();
+ _duration=a.duration();
+ _progress=a.progress()-1; //On recupère l'indice
+
+ _frames.clear(); //Si pas supprimé, garde le précédent vecteur et rajoute a la fin ...
+ AnimationFrame* animFrame;
+
+
+ for(unsigned int i=0; i<_duration; i++)
+ {
+ //std::cout<<"Framecopy "<center().first<<"/"<center().second<center().first<<"/"<center().second< _frames; //Frames de l'animation
+ unsigned int _duration, _progress; //Durée/Progrès de l'animation (en Frame)
+public:
+ //Animation():_name("Null"), _duration(0), _progress(0){};
+ Animation(const string& name, const vector frames);
+ Animation(const Animation& a){ *this = a;}
+ ~Animation();
+
+ bool inProgress() const; //Indique si l'animation est en cours
+ const pair& nextFrame(); //Défile l'animation et retourne la position de la frame active
+ bool collideA(const SDL_Rect* box) const; //Vérifie si une hitbox rentre en collision active avec la frame active
+ bool collideP(const SDL_Rect* box) const; //Vérifie si une hitbox rentre en collision passive avec la frame active
+ void holdPos(const pair& pos); //Bloque toute les frames à une position donnée (repère SDL)
+
+ //Accesseurs
+ const string& name() const{ return _name;}
+ AnimationFrame* getFrame() const{ return _frames[_progress];}
+ AnimationFrame* getFrame(unsigned int i) const{ if(i<_duration) return _frames[i]; else return nullptr;}
+ Sprite& sprite() { return _frames[_progress]->sprite();};
+ const Sprite& sprite() const{ return _frames[_progress]->sprite();}
+ unsigned int duration() const{ return _duration;}
+ unsigned int progress() const{ return _progress+1;} //Numéro de la frame (indice+1)
+ /*
+ SDL_Texture *getTexture() const {return _frames[_progress]->getTexture();}//On recupere la texture de l'objet dessinable
+ SDL_Rect *getRect() const { return _frames[_progress]->getRect();}//On recupere la zone ou dessiner l'objet dessinable
+ */
+
+ Animation& operator=(const Animation& a);
+};
+
+#endif
\ No newline at end of file
diff --git a/src/Animation/AnimationBuilder.cpp b/src/Animation/AnimationBuilder.cpp
new file mode 100644
index 0000000..2b057ba
--- /dev/null
+++ b/src/Animation/AnimationBuilder.cpp
@@ -0,0 +1,425 @@
+#include "AnimationBuilder.hpp"
+
+//Chargement de toute les textures joueurs.
+//Amélioration : ne charger les texture que une à une quand elles sont demandés
+AnimationBuilder::AnimationBuilder(SDL_Renderer *renderer):_renderer(renderer)
+{
+ //ATTENTION BUILDER CREER UNE FOIS PAR JOUEUR (soit singleton soit texture persos)
+ //addTexture("red_square","images/red_square.png");
+ // addTexture("stand","images/stickman_stand.png");
+ // addTexture("right_move","images/stickman_right.png");
+ // addTexture("jump","images/jump.jpg");
+ // addTexture("crouch1","images/crouch1.jpg");
+ // addTexture("crouch2","images/crouch2.jpg");
+ // addTexture("punch","images/stickman_punch.png");
+
+ addTexture("stand","images/Robot/robot_stand.png");
+ addTexture("right_move","images/Robot/robot_right.png");
+ addTexture("right_move2","images/Robot/robot_right2.png");
+ addTexture("left_move","images/Robot/robot_left.png");
+ addTexture("left_move2","images/Robot/robot_left2.png");
+ addTexture("jump","images/Robot/robot_jump.png");
+ addTexture("jump_right","images/Robot/robot_jump_right.png");
+ addTexture("jump_right2","images/Robot/robot_jump_right2.png");
+ addTexture("jump_left","images/Robot/robot_jump_left.png");
+ addTexture("jump_left2","images/Robot/robot_jump_left2.png");
+ addTexture("crouch","images/Robot/robot_crouch.png");
+ addTexture("attack_left","images/Robot/robot_attack_left.png");
+ addTexture("attack_left2","images/Robot/robot_attack_left2.png");
+ addTexture("attack_right","images/Robot/robot_attack_right.png");
+ addTexture("attack_right2","images/Robot/robot_attack_right2.png");
+}
+
+AnimationBuilder::~AnimationBuilder()
+{
+ for(auto & i : _texture) // map<>::iterator
+ {
+ SDL_DestroyTexture(i.second); //Destruction des textures
+ }
+}
+
+//Ajout d'une texture au dictionnaire
+void AnimationBuilder::addTexture(const string name, const string imgPath)
+{
+ //Chargement d'une texture par defaut (objet noir)
+ SDL_Surface *tmpSurface = IMG_Load(imgPath.c_str());
+ //Verification de la non presence d'erreur lors du chargement
+ if(!tmpSurface)
+ std::cout << "AnimationBuilder : Surface "<< name <<" non chargee. Erreur :" << SDL_GetError() << std::endl;
+ //Creation/Ajout de la texture a partir de la surface chargee
+ _texture [name]= SDL_CreateTextureFromSurface(_renderer, tmpSurface);
+ //Liberation de la memoire allouee pour la surface
+ SDL_FreeSurface(tmpSurface);
+}
+
+//Construit une frame de joueur. Par défaut, sans active hitbox et avec le rectangle de texture en passive hitbox.
+AnimationFrame* AnimationBuilder::PlayerFrame(SDL_Texture * texture, const pair& Pos, SDL_Rect* SpriteRect, const vector ahitbox, const vector& phitbox) const
+{
+ AnimationFrame* res;
+ if(SpriteRect == nullptr)
+ {
+ SpriteRect = createRect(Pos.first,Pos.second,PLAYER_WIDTH,PLAYER_HEIGHT);
+ }
+
+ Sprite s(SpriteRect,texture);
+
+ if(phitbox.size()==0)//Passive hitbox par défault (Rectangle du sprite)
+ {
+ //cout<<"default"< defPhitbox;
+ defPhitbox.push_back(SpriteRect);
+ res = new AnimationFrame(s,defPhitbox,ahitbox, Pos);
+ }
+ else
+ res = new AnimationFrame(s,phitbox,ahitbox, Pos);
+
+ return res;
+}
+
+//ON prefere des constructeur avec pos initial ou intial/final ?
+
+//Construit l'animation statique
+Animation* AnimationBuilder::stand(const pair& StartPos)
+{
+ //cout<<"AnimationBuilder : Stand"< anim;
+ anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+
+ /*
+ //Creation d'une hitbox
+ SDL_Rect *h = createRect(StartPos.first,StartPos.second,PLAYER_WIDTH,PLAYER_HEIGHT);
+ //ATTENTION A LA POSITION ? POSITION DU CDG OU DES PIEDS ?
+
+ //Declaration du vecteur des hitboxes d'un personnage
+ vector phitbox;
+ //Ajout d'une hitbox au vecteur
+ phitbox.push_back(h);
+
+ vector ahitbox; //Vide
+ //Ajout d'une hitbox au vecteur
+ //ahitbox.push_back(h2);
+
+ //Sprite s(_renderer, h, "images/stickman_stand.png");
+ Sprite s(h,_texture["stand"]);
+
+ //Creation d'une frame d'une animation composee de cette hitbox
+ AnimationFrame* animF = new AnimationFrame(s,phitbox,ahitbox, StartPos);
+
+ //Creation de l'animation en ajoutant la frame
+ vector anim;
+ anim.push_back(animF);
+ */
+ //Animation res(anim);
+ return new Animation("Stand",anim);//Attention on souhaite plus tard creer des ensemble de frame
+}
+
+//Construit un déplacement vers la droite
+//Vitesse en fonction des positions/nombre de frames ...
+Animation* AnimationBuilder::moveRight(const pair& StartPos)
+{
+ //cout<<"AnimationBuilder : moveRight"< FinalPos = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE, StartPos.second); //Position finale
+ pair MidPos = make_pair((StartPos.first + FinalPos.first)/2, (StartPos.second + FinalPos.second)/2); //Position Intermédiaire
+ //cout<<" "< anim;
+
+ vector aHitbox; aHitbox.push_back(createRect(StartPos.first, StartPos.second,PLAYER_WIDTH,PLAYER_HEIGHT));
+
+ //1ere frame
+ //anim.push_back(PlayerFrame(_texture["right_move"], StartPos, nullptr, aHitbox));
+ anim.push_back(PlayerFrame(_texture["right_move"], StartPos));
+ anim.push_back(PlayerFrame(_texture["right_move"], StartPos));
+ /*
+ SDL_Rect *h = createRect(StartPos.first,StartPos.second,PLAYER_WIDTH,PLAYER_HEIGHT);
+
+ vector phitbox;
+ phitbox.push_back(h);
+
+ vector ahitbox; //Vide
+
+ Sprite s1(h,_texture["stand"]);
+
+ //AnimationFrame animF1(phitbox,ahitbox, StartPos);
+ AnimationFrame* animF1 = new AnimationFrame(s1,phitbox,ahitbox, StartPos);
+ */
+
+ //2e Frame
+ anim.push_back(PlayerFrame(_texture["right_move"], MidPos));
+ anim.push_back(PlayerFrame(_texture["right_move2"], MidPos));
+ /*
+ h = createRect(MidPos.first,MidPos.second,PLAYER_WIDTH,PLAYER_HEIGHT);
+
+ phitbox.clear();
+ phitbox.push_back(h);
+
+ ahitbox.clear(); //Vide
+ //ahitbox.push_back(h2);
+
+ Sprite s2(h,_texture["right_move"]);
+
+ //AnimationFrame animF2(phitbox,ahitbox, MidPos);
+ AnimationFrame* animF2 = new AnimationFrame(s2,phitbox,ahitbox, MidPos);
+ */
+
+ //3e Frame
+ anim.push_back(PlayerFrame(_texture["right_move2"], FinalPos));
+ anim.push_back(PlayerFrame(_texture["stand"], FinalPos));
+ /*
+ h = createRect(FinalPos.first,FinalPos.second,PLAYER_WIDTH,PLAYER_HEIGHT);
+
+ phitbox.clear();
+ phitbox.push_back(h);
+
+ ahitbox.clear(); //Vide
+
+ Sprite s3(h,_texture["stand"]);
+
+ //AnimationFrame animF3(phitbox,ahitbox, FinalPos);
+ AnimationFrame* animF3 = new AnimationFrame(s3,phitbox,ahitbox, FinalPos);
+ */
+
+ //Creation de l'animation en ajoutant les frame
+ /*
+ vector anim;
+ anim.push_back(animF1);
+ anim.push_back(animF2);
+ anim.push_back(animF3);
+ */
+ //cout<<"Builder Right size: "<< anim.size() <& StartPos)
+{
+ //cout<<"AnimationBuilder : moveLeft"< FinalPos = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE, StartPos.second); //Position finale
+ pair MidPos = make_pair((StartPos.first + FinalPos.first)/2, (StartPos.second + FinalPos.second)/2); //Position Intermédiaire
+
+ //cout<<" "< anim;
+
+ //1ere frame
+ anim.push_back(PlayerFrame(_texture["left_move"], StartPos));
+ anim.push_back(PlayerFrame(_texture["left_move"], StartPos));
+
+ //2e Frame
+ anim.push_back(PlayerFrame(_texture["left_move"], MidPos));
+ anim.push_back(PlayerFrame(_texture["left_move2"], MidPos));
+
+ //3e Frame
+ anim.push_back(PlayerFrame(_texture["left_move2"], FinalPos));
+ anim.push_back(PlayerFrame(_texture["stand"], FinalPos));
+
+ //Animation res(anim);
+ return new Animation("Left Move",anim);
+}
+
+//Construit un saut
+//PB DERNIERE FRAME PAS JOUER -> CHECK player in progress
+Animation* AnimationBuilder::jump(const pair& StartPos)
+{
+ //cout<<"AnimationBuilder : Jump"< anim;
+
+ pair MidPos = make_pair(StartPos.first, StartPos.second - PLAYER_JUMP_HEIGHT/2); //Position Intermédiaire
+ pair TopPos = make_pair(StartPos.first, (StartPos.second - PLAYER_JUMP_HEIGHT)); //Position zenith
+ //1ere frame
+ anim.push_back(PlayerFrame(_texture["jump"], StartPos));
+ anim.push_back(PlayerFrame(_texture["jump"], StartPos));
+ anim.push_back(PlayerFrame(_texture["jump"], StartPos));
+
+ //2e frame
+ anim.push_back(PlayerFrame(_texture["jump"], MidPos));
+ anim.push_back(PlayerFrame(_texture["jump"], MidPos));
+ anim.push_back(PlayerFrame(_texture["jump"], MidPos));
+
+ //3e frame
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+
+ //4e frame
+ anim.push_back(PlayerFrame(_texture["stand"], MidPos));
+ anim.push_back(PlayerFrame(_texture["stand"], MidPos));
+ anim.push_back(PlayerFrame(_texture["stand"], MidPos));
+
+ //5e frame
+ anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+ anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+
+ //Frame de debbug : PB de dernière frame pas tjrs jouer
+ //anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+
+ //Animation res(anim);
+ return new Animation("Jump",anim);//Attention on souhaite plus tard creer des ensemble de frame
+}
+
+//Construit un saut vers la droite
+//Besoin de sprite approprié
+Animation* AnimationBuilder::rightJump(const pair& StartPos)
+{
+ //cout<<"AnimationBuilder : Right Jump"< anim;
+
+ pair MidPos1 = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE, StartPos.second - PLAYER_JUMP_HEIGHT/4); //Position Intermédiaire
+ pair MidPos2 = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE*2, StartPos.second - PLAYER_JUMP_HEIGHT/2); //Position Intermédiaire
+ pair TopPos = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE*3, (StartPos.second - PLAYER_JUMP_HEIGHT)); //Position zenith
+ pair MidPos3 = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE*4, StartPos.second - PLAYER_JUMP_HEIGHT/2); //Position Intermédiaire
+ pair MidPos4 = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE*5, StartPos.second - PLAYER_JUMP_HEIGHT/4); //Position Intermédiaire
+ pair EndPos = make_pair(StartPos.first+PLAYER_MOVE_DISTANCE*6, StartPos.second); //Position Intermédiaire
+
+ anim.push_back(PlayerFrame(_texture["jump_right"], StartPos));
+ anim.push_back(PlayerFrame(_texture["jump_right"], MidPos1));
+ anim.push_back(PlayerFrame(_texture["jump_right"], MidPos1));
+ anim.push_back(PlayerFrame(_texture["jump_right"], MidPos2));
+ anim.push_back(PlayerFrame(_texture["jump_right"], MidPos2));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump_right2"], MidPos3));
+ anim.push_back(PlayerFrame(_texture["jump_right2"], MidPos3));
+ anim.push_back(PlayerFrame(_texture["jump_right2"], MidPos4));
+ anim.push_back(PlayerFrame(_texture["jump_right2"], MidPos4));
+ anim.push_back(PlayerFrame(_texture["jump_right2"], EndPos));
+ anim.push_back(PlayerFrame(_texture["stand"], EndPos));
+
+ return new Animation("Right Jump",anim);
+}
+
+//Construit un saut vers la gauche
+//Besoin de sprite approprié
+Animation* AnimationBuilder::leftJump(const pair& StartPos)
+{
+ //cout<<"AnimationBuilder : Left Jump"< anim;
+
+ pair MidPos1 = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE, StartPos.second - PLAYER_JUMP_HEIGHT/4); //Position Intermédiaire
+ pair MidPos2 = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE*2, StartPos.second - PLAYER_JUMP_HEIGHT/2); //Position Intermédiaire
+ pair TopPos = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE*3, (StartPos.second - PLAYER_JUMP_HEIGHT)); //Position zenith
+ pair MidPos3 = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE*4, StartPos.second - PLAYER_JUMP_HEIGHT/2); //Position Intermédiaire
+ pair MidPos4 = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE*5, StartPos.second - PLAYER_JUMP_HEIGHT/4); //Position Intermédiaire
+ pair EndPos = make_pair(StartPos.first-PLAYER_MOVE_DISTANCE*6, StartPos.second); //Position Intermédiaire
+
+ anim.push_back(PlayerFrame(_texture["jump_left"], StartPos));
+ anim.push_back(PlayerFrame(_texture["jump_left"], MidPos1));
+ anim.push_back(PlayerFrame(_texture["jump_left"], MidPos1));
+ anim.push_back(PlayerFrame(_texture["jump_left"], MidPos2));
+ anim.push_back(PlayerFrame(_texture["jump_left"], MidPos2));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump"], TopPos));
+ anim.push_back(PlayerFrame(_texture["jump_left2"], MidPos3));
+ anim.push_back(PlayerFrame(_texture["jump_left2"], MidPos3));
+ anim.push_back(PlayerFrame(_texture["jump_left2"], MidPos4));
+ anim.push_back(PlayerFrame(_texture["jump_left2"], MidPos4));
+ anim.push_back(PlayerFrame(_texture["jump_left2"], EndPos));
+ anim.push_back(PlayerFrame(_texture["stand"], EndPos));
+
+ return new Animation("Left Jump",anim);
+}
+
+//Constuit l'animation pour s'accroupir
+Animation* AnimationBuilder::crouch(const pair& StartPos)
+{
+ //cout << "AnimationBuilder : Crouch" << endl;
+
+ vector anim;
+
+ SDL_Rect* crouchRect1 = createRect(StartPos.first,StartPos.second+PLAYER_HEIGHT*1/3,PLAYER_WIDTH,PLAYER_HEIGHT*2/3); //Acrroupi = plus petite hitbox/sprite
+ SDL_Rect* crouchRect2 = createRect(StartPos.first,StartPos.second+PLAYER_HEIGHT*1/3,PLAYER_WIDTH,PLAYER_HEIGHT*2/3);
+
+ anim.push_back(PlayerFrame(_texture["crouch"], StartPos, crouchRect1));
+ anim.push_back(PlayerFrame(_texture["crouch"], StartPos, crouchRect2));
+
+ return new Animation("Crouch", anim);
+}
+
+//Construit une chute
+Animation* AnimationBuilder::fall(const pair& StartPos)//, const pair& EndPos)
+{
+ //cout << "AnimationBuilder : Fall" << endl;
+
+ vector anim;
+
+ /*
+ pair pos;
+
+ //Chute a vitesse consdtante... on peut l'ameliorer on verra
+
+ int y = StartPos.second;
+
+ while( y < EndPos.second )
+ {
+ pos = make_pair(StartPos.first, y);
+ anim.push_back(PlayerFrame(_texture["stand"], pos));
+ y += 1;
+ }
+ */
+
+ pair newPos(StartPos.first, StartPos.second + PLAYER_FALL_SPEED);
+
+ // anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+ anim.push_back(PlayerFrame(_texture["stand"], newPos));
+
+ //COmment faire ? On aimerait detecter le bord le plus pres sur lequel le perso atterit ?
+ return new Animation("Fall", anim);
+}
+
+//Construit une attaque vers la droite
+//Hitbox active à retravailler ! (parade impossible)
+Animation* AnimationBuilder::attackRight(const pair& StartPos)
+{
+ vector anim;
+
+ vector attackBox1;
+ //attackBox.push_back(createRect(StartPos.first,StartPos.second+PLAYER_HEIGHT*1/4,PLAYER_WIDTH,PLAYER_HEIGHT*1/10));
+ attackBox1.push_back(createRect(StartPos.first,StartPos.second,PLAYER_WIDTH,PLAYER_HEIGHT*1/3));
+
+ vector attackBox2;
+ //attackBox.push_back(createRect(StartPos.first,StartPos.second+PLAYER_HEIGHT*1/4,PLAYER_WIDTH,PLAYER_HEIGHT*1/10));
+ attackBox2.push_back(createRect(StartPos.first,StartPos.second,PLAYER_WIDTH*3/2,PLAYER_HEIGHT*1/3));
+
+ anim.push_back(PlayerFrame(_texture["attack_right"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_right"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_right"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_right2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["attack_right2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["attack_right2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+
+ return new Animation("Attack Right", anim);
+}
+
+//Construit une attaque vers la gauche
+//Besoin de sprite approprié
+//Hitbox active à retravailler ! (parade impossible)
+Animation* AnimationBuilder::attackLeft(const pair& StartPos)
+{
+ vector anim;
+
+ vector attackBox1;
+ attackBox1.push_back(createRect(StartPos.first-PLAYER_WIDTH,StartPos.second,PLAYER_WIDTH,PLAYER_HEIGHT*1/3));
+
+ vector attackBox2;
+ //attackBox.push_back(createRect(StartPos.first,StartPos.second+PLAYER_HEIGHT*1/4,PLAYER_WIDTH,PLAYER_HEIGHT*1/10));
+ attackBox2.push_back(createRect(StartPos.first-PLAYER_WIDTH/2,StartPos.second,PLAYER_WIDTH*3/2,PLAYER_HEIGHT*1/3));
+
+ anim.push_back(PlayerFrame(_texture["attack_left"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_left"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_left"], StartPos, nullptr, attackBox1));
+ anim.push_back(PlayerFrame(_texture["attack_left2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["attack_left2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["attack_left2"], StartPos, nullptr, attackBox2));
+ anim.push_back(PlayerFrame(_texture["stand"], StartPos));
+
+ return new Animation("Attack Left", anim);
+}
\ No newline at end of file
diff --git a/src/Animation/AnimationBuilder.hpp b/src/Animation/AnimationBuilder.hpp
new file mode 100644
index 0000000..dd553e7
--- /dev/null
+++ b/src/Animation/AnimationBuilder.hpp
@@ -0,0 +1,39 @@
+#ifndef ANIMATIONBUILDER_HPP
+#define ANIMATIONBUILDER_HPP
+
+#include