File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414namespace Supernova {
1515
16- class Scene ;
16+ class Scene ;
1717
18- class SUPERNOVA_API SubSystem {
18+ class SUPERNOVA_API SubSystem {
1919
20- protected:
21- Signature signature;
22- Scene* scene;
23-
24- public:
20+ protected:
21+ Signature signature;
22+ Scene* scene;
2523
26- SubSystem (Scene* scene) {
27- this ->scene = scene;
28- }
24+ public:
2925
30- virtual void load () = 0;
26+ SubSystem (Scene* scene) {
27+ this ->scene = scene;
28+ }
3129
32- virtual void draw () = 0;
30+ virtual void load () = 0;
3331
34- virtual void destroy () = 0;
35-
36- virtual void update (double dt) = 0;
32+ virtual void draw () = 0;
3733
38- virtual void onComponentAdded (Entity entity, ComponentId componentId) {}
39- virtual void onComponentRemoved (Entity entity, ComponentId componentId) {}
40-
41- };
34+ virtual void destroy () = 0;
35+
36+ virtual void update (double dt) = 0;
37+
38+ virtual void onComponentAdded (Entity entity, ComponentId componentId) { (void )entity; (void )componentId; }
39+ virtual void onComponentRemoved (Entity entity, ComponentId componentId) { (void )entity; (void )componentId; }
40+
41+ };
4242
4343}
4444
Original file line number Diff line number Diff line change @@ -110,9 +110,9 @@ void EntityRegistry::sortComponentsByTransform(Signature entitySignature){
110110 }
111111
112112 // Lines component
113- if (entitySignature.test (getComponentId<PointsComponent >())){
114- auto points = componentManager.getComponentArray <PointsComponent >();
115- points ->sortByComponent <Transform>(componentManager.getComponentArray <Transform>());
113+ if (entitySignature.test (getComponentId<LinesComponent >())){
114+ auto lines = componentManager.getComponentArray <LinesComponent >();
115+ lines ->sortByComponent <Transform>(componentManager.getComponentArray <Transform>());
116116 }
117117
118118 // Audio component
Original file line number Diff line number Diff line change @@ -65,9 +65,9 @@ namespace Supernova {
6565 void changeTransformChildren (Entity entity);
6666
6767 protected:
68- virtual void onComponentAdded (Entity entity, ComponentId componentId) {}
69- virtual void onComponentRemoved (Entity entity, ComponentId componentId) {}
70- virtual void onEntityDestroyed (Entity entity, Signature signature) {}
68+ virtual void onComponentAdded (Entity entity, ComponentId componentId) { ( void )entity; ( void )componentId; }
69+ virtual void onComponentRemoved (Entity entity, ComponentId componentId) { ( void )entity; ( void )componentId; }
70+ virtual void onEntityDestroyed (Entity entity, Signature signature) { ( void )entity; ( void )signature; }
7171
7272 public:
7373 EntityRegistry ();
You can’t perform that action at this time.
0 commit comments