This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
game/include/Components/TopLevel/Game.hpp

28 lines
607 B
C++
Raw Normal View History

2021-02-25 23:13:05 +02:00
#ifndef _GAME_H
#define _GAME_H
2021-04-12 18:04:25 +03:00
#include <Components/TopLevel/GameObject.hpp>
#include <Components/TopLevel/Game.hpp>
#include <vendor/LuaBridge3/Source/LuaBridge/LuaBridge.h> // Pain
2021-02-25 23:13:05 +02:00
struct Game : public GameObject {
Game() : GameObject("game") {
std::cout << "[+] Game" << '\n';
}
2021-04-12 18:04:25 +03:00
bool isGame() {
return true;
}
2021-02-25 23:13:05 +02:00
};
2021-04-12 18:04:25 +03:00
void registerGame(lua_State* L) {
luabridge::getGlobalNamespace (L)
.beginNamespace ("Core")
.deriveClass <Game, GameObject> ("Game")
.addFunction ("isGame", &Game::isGame)
.endClass ()
.endNamespace ();
}
2021-02-25 23:13:05 +02:00
#endif