Skip to content

Commit

Permalink
FIX - player pose + prbl win
Browse files Browse the repository at this point in the history
  • Loading branch information
Dleyzzex committed Jun 14, 2020
1 parent e74dc53 commit c4080e4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 29 deletions.
4 changes: 4 additions & 0 deletions GameScene/GameScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,7 @@ void GameScene::Update(void)
i->get()->Update(_obj_list);
}
}

void GameScene::Clear(void)
{
}
1 change: 1 addition & 0 deletions GameScene/GameScene.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class GameScene : public AScene {
GameScene(const std::shared_ptr<IrrlichtController> &ctrl, const std::string name);
void Init(void);
void Update(void);
void Clear();
~GameScene();
protected:
private:
Expand Down
19 changes: 0 additions & 19 deletions Player/Bomb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,6 @@ bool Bomb::calculateCollision(irr::core::vector3df position)
}
}

if (i->get()->GetId() != _id && i->get()->GetType() == IGameObject::type_e::BOMB) {
//std::unique_ptr<Collider> temp = std::make_unique<Collider>(position, 50, 50, 50);
//if (tmp->Collide(*i->get()->GetCollider())) {
std::cout << "Bomb" << std::endl;
//Bomb *bomb = dynamic_cast<Bomb*>(i->get());
//auto bomb = std::dynamic_pointer_cast<Bomb>(i.base());
//bomb->explosion();
//}
}

if (i->get()->GetId() != _id && i->get()->GetType() != IGameObject::type_e::PLAYER && i->get()->GetType() != IGameObject::type_e::DESTRUCTABLE_WALL && i->get()->GetType() != IGameObject::type_e::GROUND) {
if (tmp->Collide(*i->get()->GetCollider())) {
ret = true;
Expand All @@ -136,7 +126,6 @@ void Bomb::explosion()

void Bomb::Delete()
{
//std::cout << "ok" << std::endl;
this->_particles->Delete();
this->_upperExplosion->Delete();
this->_downExplosion->Delete();
Expand All @@ -145,15 +134,7 @@ void Bomb::Delete()
if (this->_node) {
this->_node->remove();
this->_node = NULL;
//this->_node->setVisible(false);
}
/* this->_upperExplosion->clear();
this->_downExplosion->clear();
this->_leftExplosion->clear();
this->_rightExplosion->clear();
//_status = DELETED;
//this->_node->remove();
*/
}

void Bomb::setPosition(irr::core::vector3df const position)
Expand Down
13 changes: 4 additions & 9 deletions Player/Particles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,19 @@ Particles::~Particles()

void Particles::clear()
{
this->_particle->clearParticles();
if (_particle)
this->_particle->clearParticles();
}

void Particles::setPosition(irr::core::vector3df position)
{
this->_particle->setPosition(position);
}

void Particles::Delete() {
//this->clear();
//this->_particle->removeAllAffectors();
//this->_particle->removeAll();
//this->_particle->removeAll();
// std::cout << "Particles" << std::endl;
void Particles::Delete()
{
if (this->_particle) {
this->_particle->remove();
this->_particle = NULL;
//this->_particle->remove();
//this->_particle->drop();
}
}
2 changes: 1 addition & 1 deletion Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void Player::Update(std::vector<std::shared_ptr<IGameObject>> &obj)
this->_old = this->_now;
this->_obj = &obj;

if (!_dead) {
if (!_dead && !_pose) {
if (this->_conf == KeyConfig::LEFT) {
core::vector3df nodePosition = this->GetPosition();

Expand Down

0 comments on commit c4080e4

Please sign in to comment.