/*
 * Monster.h
 *
 *  Created on: 21 févr. 2017
 *      Author: sylvain
 */

#ifndef MONSTER_H_
#define MONSTER_H_

#include <QWidget>
#include <QBoxLayout>
#include <QLabel>
#include <QFontDatabase>
#include <QFont>
#include <QImage>
#include <QGraphicsPixmapItem>
#include <QGraphicsTextItem>
#include <QGraphicsView>
#include <QTime>
#include <QDebug>
#include "Animator.h"

class Monster : public QObject{

public:
	Monster();
	virtual ~Monster();

    QPixmap monsterImage;
    Animator *currentAnimation;
    QGraphicsPixmapItem *monsterView; //On spawn plusieurs monstres -> chacun doit avoir sa propre vue

    void updateMonster(void);
    int getXPos(void);
    int getYPos(void);
    int getLife(void);
    void moveLeft(void);
    void moveRight(void);
    void moveUp(void);
    void moveDown(void);
    void setLife(int life);

    struct Position
        {
            float x;
            float y;
        };

    enum Direction
    {
        NORTH,
        SOUTH,
        EAST,
        WEST
    };


private:

	int life;
    Position pos;
    Direction dir;
    Animator animDown;
    Animator animLeft;
    Animator animUp;
    Animator animRight;
    float timer;




};

#endif /* MONSTER_H_ */
