change floor

This commit is contained in:
Askou
2021-06-17 14:45:08 +02:00
parent 55b19d8bac
commit 55711dd343
5 changed files with 12 additions and 10 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 130 KiB

+5 -5
View File
@@ -1,4 +1,4 @@
/*
/*z
** EPITECH PROJECT, 2021
** Bomberman
** File description:
@@ -25,9 +25,9 @@ namespace RAY::Drawables::Drawables3D
bool lonely,
std::optional<std::pair<MaterialType, std::string>> texture,
const RAY::Vector3 &scale,
float rotationAngle,
const RAY::Vector3 &position,
const RAY::Vector3 &rotationAxis,
float rotationAngle)
const RAY::Vector3 &rotationAxis)
: ADrawable3D(position, WHITE),
_model(_modelsCache.fetch(filename, lonely)),
_rotationAxis(rotationAxis),
@@ -41,9 +41,9 @@ namespace RAY::Drawables::Drawables3D
Model::Model(const Mesh::AMesh &mesh,
std::optional<std::pair<MaterialType, std::string>> texture,
const RAY::Vector3 &scale,
float rotationAngle,
const RAY::Vector3 &position,
const RAY::Vector3 &rotationAxis,
float rotationAngle)
const RAY::Vector3 &rotationAxis)
: ADrawable3D(position, WHITE),
_model(std::make_shared<::Model>(LoadModelFromMesh(*mesh.getRaylibMesh()))),
_rotationAxis(rotationAxis),
+4 -4
View File
@@ -31,18 +31,18 @@ namespace RAY::Drawables::Drawables3D {
Model(const std::string &filePath, bool lonely = false,
std::optional<std::pair<MaterialType, std::string>> texture = std::nullopt,
const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1),
float rotationAngle = 0,
const RAY::Vector3 &position = {0, 0, 0},
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0),
float rotationAngle = 0);
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0));
//! @brief Create an model, loading a file
//! @param mesh: mesh to load
Model(const Mesh::AMesh &mesh,
std::optional<std::pair<MaterialType, std::string>> texture = std::nullopt,
const RAY::Vector3 &scale = RAY::Vector3(1, 1, 1),
float rotationAngle = 0,
const RAY::Vector3 &position = {0, 0, 0},
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0),
float rotationAngle = 0);
const RAY::Vector3 &rotationAxis = RAY::Vector3(0, 1, 0));
//! @brief A copy constructor
Model(const Model &model) = default;
+2
View File
@@ -2,6 +2,7 @@
// Created by HENRY Benjamin on 02/06/2021.
//
#include <Component/Collision/CollisionComponent.hpp>
#include <Component/Collision/CollisionComponent.hpp>
#include <Component/Controllable/ControllableComponent.hpp>
#include <Component/Bonus/PlayerBonusComponent.hpp>
@@ -57,6 +58,7 @@ namespace BBM {
Bonus::BonusType Bonus::getRandomBonusType()
{
return (SPEEDUP);
static std::default_random_engine generator(time(nullptr));
std::map<BonusType, float> chanceValue = {
{NOTHING, 100.0f},
+1 -1
View File
@@ -298,7 +298,7 @@ namespace BBM
WAL::Callback<WAL::Entity &, const WAL::Entity &, CollisionComponent::CollidedAxis>(),
&MapGenerator::holeCollide, Vector3f(0.25, 0.25, 0.25),Vector3f(0.75, 1.75, 0.75));
if (coords.y == 0)
holeEntity.addComponent<Drawable3DComponent, RAY3D::Model>(holeObj, false, std::make_pair(MAP_DIFFUSE, holePng));
holeEntity.addComponent<Drawable3DComponent, RAY3D::Model>(holeObj, false, std::make_pair(MAP_DIFFUSE, holePng), Vector3f(1,1,1), 180);
else
holeEntity.addComponent<Drawable3DComponent, RAY3D::Model>(secondFloorObj, false,
std::make_pair(MAP_DIFFUSE, secondFloorPng));