Skip to content

Commit

Permalink
Bug with load scene
Browse files Browse the repository at this point in the history
When load scene, we add empty components and on his update the engine breaks.
  • Loading branch information
vandalo committed Mar 22, 2018
1 parent d9e6b03 commit 7707f06
Show file tree
Hide file tree
Showing 2 changed files with 10,474 additions and 9 deletions.
10 changes: 5 additions & 5 deletions LCSEngine/GameObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,39 +279,39 @@ void GameObject::load(nlohmann::json& conf) {
MaterialComponent* materialComp = new MaterialComponent(this);
materialComp->typeComponent = MATERIAL;
materialComp->load(*it);
addComponent(materialComp);
//addComponent(materialComp);
}
break;
case MESH:
{
MeshComponent* meshComp = new MeshComponent(this);
meshComp->typeComponent = MESH;
meshComp->load(*it);
addComponent(meshComp);
//addComponent(meshComp);
}
break;
case ANIMATION:
{
AnimationComponent* animationComp = new AnimationComponent(this);
animationComp->typeComponent = ANIMATION;
animationComp->load(*it);
addComponent(animationComp);
//addComponent(animationComp);
}
break;
case AUDIOLISTENER:
{
AudioListenerComponent* audioListenerComp = new AudioListenerComponent(this);
audioListenerComp->typeComponent = AUDIOLISTENER;
audioListenerComp->load(*it);
addComponent(audioListenerComp);
//addComponent(audioListenerComp);
}
break;
case AUDIOSOURCE:
{
AudioSourceComponent* audioSourceComp = new AudioSourceComponent(this);
audioSourceComp->typeComponent = AUDIOSOURCE;
audioSourceComp->load(*it);
addComponent(audioSourceComp);
//addComponent(audioSourceComp);
}
break;
}
Expand Down
Loading

0 comments on commit 7707f06

Please sign in to comment.