mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-31 09:32:02 +00:00
Merge pull request #175 from AnonymusRaccoon/camera_system
Camera system
This commit is contained in:
@@ -19,8 +19,6 @@
|
||||
#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"
|
||||
@@ -28,7 +26,6 @@
|
||||
#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;
|
||||
@@ -39,7 +36,7 @@ namespace BBM
|
||||
{
|
||||
auto scene = std::make_shared<WAL::Scene>();
|
||||
scene->addEntity("camera")
|
||||
.addComponent<PositionComponent>(8, 20, 7)
|
||||
.addComponent<PositionComponent>(8, 0, -5)
|
||||
.addComponent<CameraComponent>(Vector3f(8, 0, 8));
|
||||
scene->addEntity("Timer")
|
||||
.addComponent<TimerComponent>(std::chrono::minutes (3), [](WAL::Entity &, WAL::Wal &) {
|
||||
@@ -62,16 +59,16 @@ 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<ControllableComponent>()
|
||||
.addComponent<ScoreComponent>()
|
||||
.addComponent<AnimatorComponent>()
|
||||
.addComponent<GravityComponent>()
|
||||
.addComponent<BumperTimerComponent>()
|
||||
.addComponent<TagComponent<BlowablePass>>()
|
||||
.addComponent<TagComponent<Player>>()
|
||||
.addComponent<AnimationsComponent>("assets/player/player.iqm", 3)
|
||||
.addComponent<CollisionComponent>(BBM::Vector3f{0.25, 0, 0.25}, BBM::Vector3f{.75, 2, .75})
|
||||
.addComponent<MovableComponent>()
|
||||
|
||||
Reference in New Issue
Block a user