Skip to content
Snippets Groups Projects
enemy.h 488 B
Newer Older
sgupta72's avatar
sgupta72 committed
#ifndef ENEMY_H
#define ENEMY_H

#include "entity.h"
sgupta72's avatar
sgupta72 committed
/**
 * Main enemy class, inherits entity class
 */
sgupta72's avatar
sgupta72 committed
class Enemy: public Entity
{
public:
    Enemy(Window &window);
    ~Enemy();
    void Update(vector<Entity *> entities);
    void Draw(Window &window);
    Rect *get_rect();
private:
sgupta72's avatar
sgupta72 committed
    //store rect and the flipped version flipped rect
sgupta72's avatar
sgupta72 committed
    Rect *rect;
    Rect *flipped_rect;
sgupta72's avatar
sgupta72 committed
    //store y velocity of enemy
sgupta72's avatar
sgupta72 committed
    int vy;
sgupta72's avatar
sgupta72 committed
    //is enemy going left or right?
sgupta72's avatar
sgupta72 committed
    bool right;
};
#endif