summaryrefslogtreecommitdiffhomepage
path: root/Enemy.h
blob: 97f3a8ed5a9078474620775b92259f369f3bc6aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <memory>

#include <raylib.h>

#include "Behaviour.h"
#include "Generator.h"


class Enemy
{
public:
    friend class EnemyFactory;
    Enemy();
    Enemy(
        std::shared_ptr<Vector2> position,
        std::shared_ptr<Generator> generator,
        std::shared_ptr<Behaviour> behaviour);
    void update(float dt);
    void draw();
    bool gone() const;
private:
    float m_hold;
    std::shared_ptr<Vector2> m_position;
    std::shared_ptr<Generator> m_generator;
    std::shared_ptr<Behaviour> m_behaviour;
};