Update KekEngine
This commit is contained in:
parent
bb98a34cb6
commit
bbb720af79
2
dependencies/kekengine
vendored
2
dependencies/kekengine
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 81ea6e0dc52e7dc5055c5f5b8e445d1e21a6e027
|
Subproject commit 3051fbd3b924c13ceeb06305be9420cbec69970a
|
@ -51,7 +51,7 @@ Mesh *floorMesh;
|
|||||||
TextElement *debugText;
|
TextElement *debugText;
|
||||||
std::shared_ptr<Texture> red, gray, white, wallpaper;
|
std::shared_ptr<Texture> red, gray, white, wallpaper;
|
||||||
|
|
||||||
void gameLoop(GLFWwindow *window, void *) {
|
void gameLoop(kek::PeriodicEvent event) {
|
||||||
Player *player = Engine::getPlayer();
|
Player *player = Engine::getPlayer();
|
||||||
Camera *camera = Engine::getActiveCamera();
|
Camera *camera = Engine::getActiveCamera();
|
||||||
glm::vec3 playerPos = player->getPosition();
|
glm::vec3 playerPos = player->getPosition();
|
||||||
@ -147,7 +147,7 @@ void gameLoop(GLFWwindow *window, void *) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void startGame(void *) {
|
void startGame() {
|
||||||
buttonPlay->visible = false;
|
buttonPlay->visible = false;
|
||||||
|
|
||||||
Scene *scene = new Scene();
|
Scene *scene = new Scene();
|
||||||
@ -160,7 +160,7 @@ void startGame(void *) {
|
|||||||
flashlight = new SpotLight(glm::vec3(1), glm::vec3(0), 2, 3, 5, 0.5, 0.6);
|
flashlight = new SpotLight(glm::vec3(1), glm::vec3(0), 2, 3, 5, 0.5, 0.6);
|
||||||
flashlight->moveTo(Engine::getPlayer()->getPosition() + glm::vec3(0, KEK_PLAYER_EYE_OFFSET, 0));
|
flashlight->moveTo(Engine::getPlayer()->getPosition() + glm::vec3(0, KEK_PLAYER_EYE_OFFSET, 0));
|
||||||
|
|
||||||
Input::addPeriodicCallback(PeriodicCallback(gameLoop, nullptr));
|
Input::addPeriodicCallback(PeriodicCallback(gameLoop));
|
||||||
|
|
||||||
std::shared_ptr<Texture> cubeTexture = Texture::generateColor(glm::vec3(1, 0, 0));
|
std::shared_ptr<Texture> cubeTexture = Texture::generateColor(glm::vec3(1, 0, 0));
|
||||||
GameObject *floorObject = new GameObject();
|
GameObject *floorObject = new GameObject();
|
||||||
|
Loading…
Reference in New Issue
Block a user