Dicewars-Siedler/src/engine/layer/Layer.h

33 lines
673 B
C++

//
// Created by sebastian on 24.12.25.
//
#ifndef DICEWARS_SIEDLER_LAYER_H
#define DICEWARS_SIEDLER_LAYER_H
#include <memory>
#include <utility>
#include "../core/Application.h"
class GameMode;
class Layer {
public:
Layer() = default;
virtual ~Layer() = default;
virtual void onAttach() {}
virtual void onDetach() {}
virtual void onUpdate() {}
virtual void onRender() {}
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