Skip to content

Commit 5dac3a9

Browse files
committed
Changed some internal methods
1 parent 102e5d0 commit 5dac3a9

3 files changed

Lines changed: 9 additions & 19 deletions

File tree

engine/core/Scene.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,8 @@ void Scene::updateSizeFromCamera(){
246246
getSystem<RenderSystem>()->updateCameraSize(getCamera());
247247
}
248248

249-
Entity Scene::createEntityInternal(Entity entity){
250-
return entityManager.createEntityInternal(entity);
251-
}
252-
253-
void Scene::setLastEntityInternal(Entity lastEntity){
254-
entityManager.setLastEntityInternal(lastEntity);
255-
}
256-
257-
Entity Scene::getLastEntityInternal() const{
258-
return entityManager.getLastEntityInternal();
249+
bool Scene::recreateEntity(Entity entity){
250+
return entityManager.recreateEntity(entity);
259251
}
260252

261253
Entity Scene::createEntity(){

engine/core/Scene.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,7 @@ namespace Supernova{
137137

138138
//Entity methods
139139

140-
Entity createEntityInternal(Entity entity); // for internal editor use only
141-
void setLastEntityInternal(Entity lastEntity); // for internal editor use only
142-
Entity getLastEntityInternal() const; // for internal editor use only
140+
bool recreateEntity(Entity entity); // for internal editor use only
143141

144142
Entity createEntity();
145143

engine/core/ecs/EntityManager.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ namespace Supernova{
2525

2626
public:
2727

28-
Entity createEntityInternal(Entity entity) { // for internal editor use only
29-
metadata[entity];
28+
bool recreateEntity(Entity entity) { // for internal editor use only
29+
if (!isCreated(entity)){
30+
metadata[entity];
3031

31-
return entity;
32-
}
32+
return true;
33+
}
3334

34-
void setLastEntityInternal(Entity lastEntity){ // for internal editor use only
35-
this->lastEntity = lastEntity;
35+
return false;
3636
}
3737

3838
Entity getLastEntityInternal() const{ // for internal editor use only

0 commit comments

Comments
 (0)