28 lines
601 B
C++
28 lines
601 B
C++
//
|
|
// Created by sebastian on 24.12.25.
|
|
//
|
|
|
|
#ifndef DICEWARS_SIEDLER_LAYER_H
|
|
#define DICEWARS_SIEDLER_LAYER_H
|
|
#include <memory>
|
|
#include <utility>
|
|
|
|
#include "../../game/GameMode.h"
|
|
|
|
|
|
class Layer {
|
|
public:
|
|
virtual ~Layer() = default;
|
|
virtual void onAttach() {}
|
|
virtual void onDetach() {}
|
|
virtual void onUpdate() {}
|
|
|
|
void setGameMode(std::shared_ptr<GameMode> gameMode) {this->gameMode = std::move(gameMode);}
|
|
[[nodiscard]] std::shared_ptr<GameMode> getGameMode() const {return gameMode;}
|
|
|
|
protected:
|
|
std::shared_ptr<GameMode> gameMode;
|
|
};
|
|
|
|
|
|
#endif //DICEWARS_SIEDLER_LAYER_H
|