Commit 29a1d505 authored by Сулимов Игорь Андреевич's avatar Сулимов Игорь Андреевич
Browse files

Start of forth item of lab work

parent 4ba549ab
No related merge requests found
Showing with 54 additions and 2 deletions
+54 -2
File added
#pragma once
#include "IDynamicEntity.h"
class Enemy: public IDynamicEntity {
public:
void prepare_for_drawing() override; ///@todo
void draw_into(sf::RenderWindow& window) const override; ///@todo
std::unique_ptr<IDynamicEntity> clone() override; ///@todo
void action() override; ///@todo
public:
Enemy(); ///@todo
private:
sf::RectangleShape m_rectangle;
sf::Clock m_stopwatch;
};
\ No newline at end of file
#pragma once
#include "MazeContent/Entities/IEntity.h"
class IDynamicEntity: public IEntity {
public:
virtual std::unique_ptr<IDynamicEntity> clone() = 0;
virtual void action() = 0;
virtual ~IDynamicEntity() = default;
};
\ No newline at end of file
#pragma once
\ No newline at end of file
#pragma once
\ No newline at end of file
#pragma once
#include "IStaticEntity.h"
class Food: public IStaticEntity {
public:
void prepare_for_drawing() override; ///@todo
void draw_into(sf::RenderWindow& window) const override; ///@todo
std::unique_ptr<IStaticEntity> clone() override; ///@todo
public:
Food(); ///@todo
private:
sf::CircleShape m_circle;
};
\ No newline at end of file
#pragma once
#include "MazeContent/Entities/IEntity.h"
class IStaticEntity: public IEntity {
public:
virtual std::unique_ptr<IStaticEntity> clone() = 0;
virtual ~IStaticEntity() = default;
};
\ No newline at end of file
#include "MazeContent/Entities/Pacman.h"
void Pacman::move(Room::Direction direction) {
m_location->get_side(direction)->enter(this);
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment