mirror of
https://github.com/HowestDAE/dae16-VerhulstBram.git
synced 2025-12-16 12:31:47 +01:00
Added the Grid, Camera, Level system
Basic player Started (Barely) on the TextureManager And other fixes
This commit is contained in:
@@ -1,17 +1,41 @@
|
||||
#pragma once
|
||||
#include "Level.h"
|
||||
#include "Texture.h"
|
||||
#include "WorldLevel.h"
|
||||
#include "WorldTile.h"
|
||||
#include <array>
|
||||
|
||||
#include "Player.h"
|
||||
|
||||
|
||||
class WorldLevel : public Level {
|
||||
public:
|
||||
WorldLevel();
|
||||
~WorldLevel();
|
||||
static const int WORLD_WIDTH = 34;
|
||||
static const int WORLD_HEIGHT = 34;
|
||||
|
||||
static const int TILE_WIDTH = 50;
|
||||
static const int TILE_HEIGHT = 50;
|
||||
|
||||
WorldLevel(Camera* camera);
|
||||
~WorldLevel() override;
|
||||
|
||||
void Update(float elapsedSec) override;
|
||||
void Draw() const override;
|
||||
|
||||
void MouseMove(const Point2f& mousePos) override;
|
||||
|
||||
WorldTile* GetTileAt(const Point2f& pos) const;
|
||||
void SetTileAt(const Point2f& pos, WorldTile* tile);
|
||||
|
||||
std::array<std::array<WorldTile*, WORLD_WIDTH>, WORLD_HEIGHT> GetAllTiles() const;
|
||||
|
||||
|
||||
|
||||
private:
|
||||
WorldTile m_WorldTiles[10][10];
|
||||
|
||||
|
||||
|
||||
std::array<std::array<WorldTile*, WORLD_WIDTH>, WORLD_HEIGHT> m_worldTiles;
|
||||
|
||||
Player m_player;
|
||||
Point2f m_mousePos{};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user