update method
Implementation
@override
void update(double deltaTime, BaseObject parent) {
var drawableList = this.drawableList;
if (drawableList != null) {
if (parent is SceneObject && parent.isVisible) {
_positionWorkspace.setFrom(parent.position);
_positionWorkspace.add(drawOffset);
if (cameraRelative) {
final focusPosition = systems.cameraSystem.focusPosition;
final params = systems.parameters;
final x = _positionWorkspace.x - focusPosition.x + params.viewHalfWidth;
final y = _positionWorkspace.y - focusPosition.y + params.viewHalfHeight;
_screenLocation.setValues(x, y);
}
for (var i = 0; i < drawableList.length; i++) {
var drawable = drawableList[i];
if (drawable.isReady && drawable.visibleAtPosition(_screenLocation)) {
systems.renderSystem.drawObject(
drawable: drawable,
position: _positionWorkspace,
priority: priority + i,
cameraRelative: cameraRelative);
}
}
}
}
}