diff --git a/src/Game.cpp b/src/Game.cpp index 5be6017..a307cba 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -4,7 +4,8 @@ #include "Game.h" #include "MazeMap.h" #include "ResourceManager.h" -#include "Entity.h" +#include "Pacman.h" +#include "Ghost.h" void Game::run() { ResourceManager resources; @@ -28,7 +29,12 @@ void Game::run() { {912, 0}, {0, 0}); - Entity pacman; + Pacman pacman; + + Ghost blinky; + Ghost pinky; + Ghost inky; + Ghost clyde; pacman.setAnimationTiles(resources.getTexture("all_textures"), {1824, 0}, "right_walking", {60, 60}, 2, 0); pacman.setAnimationTiles(resources.getTexture("all_textures"), {1824, 64}, "left_walking", {60, 60}, 2, 0); @@ -38,32 +44,24 @@ void Game::run() { pacman.setAnimationTiles(resources.getTexture("all_textures"), {2016, 0}, "death", {60, 60}, 11, 4); pacman.setActiveSprite("static", 0); - Entity blinky; - blinky.setAnimationTiles(resources.getTexture("all_textures"), {1824, 256}, "right_walking", {60, 60}, 2, 4); blinky.setAnimationTiles(resources.getTexture("all_textures"), {1952, 256}, "left_walking", {60, 60}, 2, 4); blinky.setAnimationTiles(resources.getTexture("all_textures"), {2080, 256}, "up_walking", {60, 60}, 2, 4); blinky.setAnimationTiles(resources.getTexture("all_textures"), {2208, 256}, "down_walking", {60, 60}, 2, 4); blinky.setActiveSprite("right_walking", 0); - Entity pinky; - pinky.setAnimationTiles(resources.getTexture("all_textures"), {1824, 320}, "right_walking", {60, 60}, 2, 4); pinky.setAnimationTiles(resources.getTexture("all_textures"), {1952, 320}, "left_walking", {60, 60}, 2, 4); pinky.setAnimationTiles(resources.getTexture("all_textures"), {2080, 320}, "up_walking", {60, 60}, 2, 4); pinky.setAnimationTiles(resources.getTexture("all_textures"), {2208, 320}, "down_walking", {60, 60}, 2, 4); pinky.setActiveSprite("right_walking", 0); - Entity inky; - inky.setAnimationTiles(resources.getTexture("all_textures"), {1824, 384}, "right_walking", {60, 60}, 2, 4); inky.setAnimationTiles(resources.getTexture("all_textures"), {1952, 384}, "left_walking", {60, 60}, 2, 4); inky.setAnimationTiles(resources.getTexture("all_textures"), {2080, 384}, "up_walking", {60, 60}, 2, 4); inky.setAnimationTiles(resources.getTexture("all_textures"), {2208, 384}, "down_walking", {60, 60}, 2, 4); inky.setActiveSprite("right_walking", 0); - Entity clyde; - clyde.setAnimationTiles(resources.getTexture("all_textures"), {1824, 448}, "right_walking", {60, 60}, 2, 4); clyde.setAnimationTiles(resources.getTexture("all_textures"), {1952, 448}, "left_walking", {60, 60}, 2, 4); clyde.setAnimationTiles(resources.getTexture("all_textures"), {2080, 448}, "up_walking", {60, 60}, 2, 4); diff --git a/src/Ghost.cpp b/src/Ghost.cpp new file mode 100644 index 0000000..a16bc4f --- /dev/null +++ b/src/Ghost.cpp @@ -0,0 +1 @@ +#include "Ghost.h" diff --git a/src/Ghost.h b/src/Ghost.h new file mode 100644 index 0000000..ac40815 --- /dev/null +++ b/src/Ghost.h @@ -0,0 +1,10 @@ +#ifndef GHOST_H +#define GHOST_H + +#include "Entity.h" + +class Ghost : public Entity { + +}; + +#endif diff --git a/src/Pacman.cpp b/src/Pacman.cpp new file mode 100644 index 0000000..1d866a8 --- /dev/null +++ b/src/Pacman.cpp @@ -0,0 +1 @@ +#include "Pacman.h" diff --git a/src/Pacman.h b/src/Pacman.h new file mode 100644 index 0000000..4031015 --- /dev/null +++ b/src/Pacman.h @@ -0,0 +1,10 @@ +#ifndef PACMAN_H +#define PACMAN_H + +#include "Entity.h" + +class Pacman : public Entity { + +}; + +#endif