merge develop

This commit is contained in:
Askou
2021-06-17 11:54:41 +02:00
96 changed files with 2120 additions and 240 deletions
+21 -2
View File
@@ -16,12 +16,22 @@
#include "Component/BombHolder/BombHolderComponent.hpp"
#include "Component/Tag/TagComponent.hpp"
#include "Component/Renderer/Drawable3DComponent.hpp"
#include "Component/Renderer/Drawable2DComponent.hpp"
#include <Drawables/Image.hpp>
#include "Drawables/2D/Text.hpp"
#include "Component/Renderer/Drawable2DComponent.hpp"
#include "Component/Button/ButtonComponent.hpp"
#include "Drawables/Texture.hpp"
#include "Component/Gravity/GravityComponent.hpp"
#include "Component/BumperTimer/BumperTimerComponent.hpp"
#include "Component/Timer/TimerComponent.hpp"
#include "Model/Model.hpp"
#include "Map/Map.hpp"
#include "Component/Score/ScoreComponent.hpp"
#include "Drawables/2D/Text.hpp"
namespace RAY3D = RAY::Drawables::Drawables3D;
namespace RAY2D = RAY::Drawables::Drawables2D;
namespace BBM
{
@@ -31,6 +41,15 @@ namespace BBM
scene->addEntity("camera")
.addComponent<PositionComponent>(8, 0, -5)
.addComponent<CameraComponent>(Vector3f(8, 0, 8));
scene->addEntity("Timer")
.addComponent<TimerComponent>(std::chrono::minutes (3), [](WAL::Entity &, WAL::Wal &) {
Runner::gameState.nextScene = GameState::ScoreScene;
})
.addComponent<PositionComponent>(1920 / 2 - 2 * 30, 30, 0)
.addComponent<Drawable2DComponent, RAY2D::Text>("", 60, RAY::Vector2(), ORANGE);
scene->addEntity("background image")
.addComponent<Drawable2DComponent, RAY::Texture>(true, "assets/background_game.png", false)
.addComponent<PositionComponent>();
MapGenerator::loadMap(16, 16, MapGenerator::createMap(16, 16, hasHeights), scene);
return scene;
}
@@ -43,14 +62,14 @@ namespace BBM
{SoundComponent::BOMB, "assets/sounds/bomb_drop.ogg"},
//{SoundComponent::DEATH, "assets/sounds/death.ogg"}
};
return scene.addEntity("player")
.addComponent<PositionComponent>()
.addComponent<Drawable3DComponent, RAY3D::Model>("assets/player/player.iqm", true)
.addComponent<ScoreComponent>()
.addComponent<AnimatorComponent>()
.addComponent<GravityComponent>()
.addComponent<BumperTimerComponent>()
//.addComponent<ShaderComponentModel>("assets/shaders/glsl330/predator.fs")
.addComponent<TagComponent<BlowablePass>>()
.addComponent<TagComponent<Player>>()
.addComponent<AnimationsComponent>("assets/player/player.iqm", 3)