Man ir kaut kāda kļūda. Man ir fails player.h
Code: Select all
#ifndef _PLAYER_H_
#define _PLAYER_H_
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#define PLAYER_WIDTH 30
#define PLAYER_HEIGHT 70
enum Direction
{
left = -1,
right = 1
};
class Player
{
public:
sf::Vector2<float> Position;
void Initialize(sf::Vector2f position);
void Update(sf::Time time);
void Draw(sf::RenderWindow* window);
private:
float acceleration, maxSpeed;
sf::Vector2f velocity;
Direction direction;
};
#endif
Code: Select all
#ifndef _LEVEL_H_
#define _LEVEL_H_
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include "cell.h"
#include "player.h"
#define LEVEL_WIDTH_MAX 80
#define LEVEL_HEIGHT_MAX 30
#define CELL_WIDTH 40
#define CELL_HEIGHT 40
class Level
{
public:
Level(sf::RenderWindow* window);
void LoadFromFile(const char* fileName, Player* player);
void Draw();
Cell Cells[LEVEL_WIDTH_MAX][LEVEL_HEIGHT_MAX];
unsigned width, height;
private:
sf::RenderWindow* _window;
};
#endif