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/World/Cube.hpp

34 lines
808 B
C++
Raw Normal View History

2021-04-12 18:04:25 +03:00
#ifndef _CUBE_H
#define _CUBE_H
#define DIGRAPHENE_GRAPHICS_BUFFER_IMPLEMENTATION
#define DIGRAPHENE_GRAPHICS_CAMERA_IMPLEMENTATION
#define DIGRAPHENE_GRAPHICS_MESH_IMPLEMENTATION
#define DIGRAPHENE_GRAPHICS_SHADER_IMPLEMENTATION
2021-04-24 13:37:57 +03:00
#include <Components/Data/Vector3.cpp>
#include <Components/TopLevel/GameObject.cpp>
2021-04-12 18:04:25 +03:00
#include <cassert>
#include <cmath>
#include <cstring>
#include <iostream>
2021-04-24 13:37:57 +03:00
struct Cube : public GameObject {
2021-04-12 18:04:25 +03:00
Game() : GameObject("Cube") {}
2021-04-24 13:37:57 +03:00
Vector3 position;
Vector3 size;
2021-04-12 18:04:25 +03:00
};
void registerCube(lua_State* L) {
luabridge::getGlobalNamespace(L)
.beginNamespace("Core")
2021-04-24 13:37:57 +03:00
.deriveClass <Cube, GameObject> ("Cube")
.addProperty ("position", &Cube::position)
.addProperty ("size", &Cube::size)
.endClass()
2021-04-12 18:04:25 +03:00
.endNamespace();
}
#endif