modularity problem
This commit is contained in:
parent
57e9b91c4c
commit
b628beafb9
4 changed files with 74 additions and 57 deletions
|
|
@ -1,3 +1,6 @@
|
|||
#include <raylib.h>
|
||||
#include <raymath.h>
|
||||
|
||||
class IComponent {
|
||||
public:
|
||||
virtual ~IComponent() {}
|
||||
|
|
@ -5,8 +8,16 @@ class IComponent {
|
|||
};
|
||||
|
||||
class Pacman : IComponent {
|
||||
public:
|
||||
virtual void process() {
|
||||
const int speed = 64;
|
||||
private:
|
||||
Texture2D texture;
|
||||
Vector2 position;
|
||||
int facing;
|
||||
|
||||
}
|
||||
Rectangle getTextureRect();
|
||||
public:
|
||||
Pacman();
|
||||
Pacman(Vector2 position);
|
||||
~Pacman();
|
||||
virtual void process();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue