From: lukel495 Date: Thu, 9 Nov 2023 14:59:52 +0000 (+0100) Subject: skelett för Voi_enemy och liten ändring i static_obeject.h X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=545ebb2d67c2c533c921011a58c9a2bcdfa949f2;p=TDDC76_proj.git skelett för Voi_enemy och liten ändring i static_obeject.h --- diff --git a/src/Static_object.h b/src/Static_object.h index ca7994c..0f62fdb 100644 --- a/src/Static_object.h +++ b/src/Static_object.h @@ -7,18 +7,14 @@ class Static_obejct : public Object { public: - { - Static_object() = default; - virtual ~Static_object() = default; - virtual bool collides(Object & other) = 0; - virtual void collision(Object & other) = 0; - virtual void update() = 0; - virtual void render(sf::RenderWindow & window) = 0; - } + Static_object() = default; + virtual ~Static_object() = default; + virtual bool collides(Object &other) = 0; + virtual void collision(Object &other) = 0; + virtual void update() = 0; + virtual void render(sf::RenderWindow &window) = 0; private: - { - } }; #endif \ No newline at end of file diff --git a/src/Voi_enemy.h b/src/Voi_enemy.h index e69de29..bcde053 100644 --- a/src/Voi_enemy.h +++ b/src/Voi_enemy.h @@ -0,0 +1,24 @@ +#ifndef VOI_ENEMY_H +#define VOI_ENEMY_H + +#include +#include "Autonomous_object.h" + +class Voi_enemy +{ +public: + bool collides(Object &other) override; + void collision(Object &other) override; + void update() override; + void render(sf::RenderWindow &window) override; + +private: + void move(Time) override; + +protected: + double x_pos; + double y_pos; + sf::Sprite sprite; +}; + +#endif \ No newline at end of file