Files
Tower-Defense/include/game/server/ServerWorld.h
2021-12-12 13:31:01 +01:00

28 lines
620 B
C++

#pragma once
#include "game/World.h"
namespace td {
namespace server {
class Server;
class ServerGame;
class ServerWorld : public game::World {
private:
game::MobID m_CurrentMobID;
game::TowerID m_CurrentTowerID;
Server* m_Server;
public:
static constexpr float MobSpawnBorder = 0.01f;
ServerWorld(Server* server, ServerGame* game);
void spawnMobs(game::MobType type, std::uint8_t level, game::PlayerID sender, std::uint8_t count);
game::TowerPtr placeTowerAt(game::TowerType type, std::int32_t x, std::int32_t y, game::PlayerID builder);
};
} // namespace server
} // namespace td