Implementando el enemy engine
This commit is contained in:
33
source/enemy_path.h
Normal file
33
source/enemy_path.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include "enemy.h"
|
||||
#include <string>
|
||||
|
||||
#ifndef ENEMY_PATH_H
|
||||
#define ENEMY_PATH_H
|
||||
|
||||
// Clase EnemyPath
|
||||
class EnemyPath : public Enemy
|
||||
|
||||
|
||||
{
|
||||
private:
|
||||
SDL_Point p1; // Punto 1 (inicial) de la ruta
|
||||
SDL_Point p2; // Punto 2 (final) de la ruta
|
||||
|
||||
// Comprueba si ha llegado al limite del recorrido para darse media vuelta
|
||||
void checkPath();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
EnemyPath(enemy_t enemy, SDL_Point p1, SDL_Point p2);
|
||||
|
||||
// Destructor
|
||||
~EnemyPath();
|
||||
|
||||
// Actualiza las variables del objeto
|
||||
void update();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user