mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-04 10:44:42 +00:00
cleanup before PR
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
RAY::Camera::Camera3D::Camera3D(const RAY::Vector3 &position, const RAY::Vector3 &target, const RAY::Vector3 &up, float fovy, Projection projection):
|
||||
_camera({position, target, up, fovy, projection})
|
||||
{
|
||||
SetCameraMode(_camera, CAMERA_FREE);
|
||||
}
|
||||
|
||||
void RAY::Camera::Camera3D::setPosition(const Vector3 &Position)
|
||||
|
||||
@@ -77,8 +77,8 @@ namespace BBM
|
||||
animation.setAnimIndex(5);
|
||||
});
|
||||
scene->addEntity("camera")
|
||||
.addComponent<PositionComponent>(10, 20, 10)
|
||||
.addComponent<CameraComponent>(Vector3f(2, 0, 2));
|
||||
.addComponent<PositionComponent>(8, 20, 7)
|
||||
.addComponent<CameraComponent>(Vector3f(8, 0, 8));
|
||||
/*scene->addEntity("cube")
|
||||
.addComponent<PositionComponent>(-5, 0, -5)
|
||||
.addComponent<Drawable3DComponent, RAY3D::Cube>(Vector3f(0, 0, 0), Vector3f(3, 3, 3), RED)
|
||||
|
||||
@@ -32,26 +32,6 @@ namespace BBM
|
||||
|
||||
this->_window.useCamera(this->_camera);
|
||||
for (auto &[_, pos, drawable] : this->_wal.scene->view<PositionComponent, Drawable3DComponent>()) {
|
||||
if (_.getName() == "cube") {
|
||||
auto col = _.getComponent<CollisionComponent>();
|
||||
DrawCubeWires({pos.position.x, pos.position.y, pos.position.z},
|
||||
col.bound.x,
|
||||
col.bound.y,
|
||||
col.bound.z,
|
||||
WHITE);
|
||||
DrawPoint3D({pos.position.x, pos.position.y, pos.position.z}, BLUE);
|
||||
DrawPoint3D({pos.position.x + col.bound.x, pos.position.y + col.bound.y, pos.position.z + col.bound.z}, BLUE);
|
||||
}
|
||||
if (_.getName() == "player") {
|
||||
auto col = _.getComponent<CollisionComponent>();
|
||||
DrawCubeWires({pos.position.x, pos.position.y, pos.position.z},
|
||||
col.bound.x,
|
||||
col.bound.y,
|
||||
col.bound.z,
|
||||
WHITE);
|
||||
DrawPoint3D({pos.position.x, pos.position.y, pos.position.z}, BLUE);
|
||||
DrawPoint3D({pos.position.x + col.bound.x, pos.position.y + col.bound.y, pos.position.z + col.bound.z}, BLUE);
|
||||
}
|
||||
drawable.drawable->setPosition(pos.position);
|
||||
drawable.drawable->drawOn(this->_window);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user