From 1c9351e5e95f8b2451de85b28e71d02411234354 Mon Sep 17 00:00:00 2001 From: Foxar Date: Thu, 10 Dec 2020 12:52:54 +0100 Subject: [PATCH] Added: Sea mines, when fully implemented, will explode and take lifes from player. --- src/samples/dolphin/dolphin.cpp | 5 +++++ src/samples/dolphin/dolphin.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/src/samples/dolphin/dolphin.cpp b/src/samples/dolphin/dolphin.cpp index 9df9247..053e813 100755 --- a/src/samples/dolphin/dolphin.cpp +++ b/src/samples/dolphin/dolphin.cpp @@ -74,6 +74,10 @@ void Dolphin::onInit() seabed.shouldBeBackfaceCulled = false; seabed.shouldBeFrustumCulled = false; + mine.loadObj("mine/", "mine", 5.0F, false); + mine.position.set(0, 0, 0); + texRepo->addByMesh("mine/", mine, BMP); + skybox.loadObj("skybox/", "skybox", 400.0F, false); skybox.shouldBeFrustumCulled = false; @@ -168,6 +172,7 @@ void Dolphin::onUpdate() engine->renderer->draw(skybox); engine->renderer->draw(waterbox); engine->renderer->draw(seabed); + engine->renderer->draw(mine); for (u8 i = 0; i < OYSTERS_COUNT; i++) { if (oysters[i].isActive()) diff --git a/src/samples/dolphin/dolphin.hpp b/src/samples/dolphin/dolphin.hpp index 614b94f..f48c149 100755 --- a/src/samples/dolphin/dolphin.hpp +++ b/src/samples/dolphin/dolphin.hpp @@ -41,6 +41,7 @@ private: Mesh seabed; Mesh island; Mesh skybox; + Mesh mine; LightBulb bulb; Player player; Camera camera;