private void InitializeEntities() { var e1 = new Entity(_entityIdManager.GetUniqueId()); e1.Register(new PosComp()); e1.Register(new RotComp()); _entitiesDatabase.Register(e1); var e2 = new Entity(_entityIdManager.GetUniqueId()); e2.Register(new PosComp()); e2.Register(new RotComp()); _entitiesDatabase.Register(e2); }
private void InitializeEntities() { for (var i = 0; i < _entityCount; i++) { var entity = new Entity(_entityIdManager.GetUniqueId()); for (var j = 0; j < _componentPerEntity; j++) { entity.Register(new PosComp { X = 10, Y = 20 }); entity.Register(new RotComp()); } _entitiesDatabase.Register(entity); } var rotEntity = new Entity(_entityIdManager.GetUniqueId()); rotEntity.Register(new RotComp { Angle = 200 }); _entitiesDatabase.Register(rotEntity); }