void ApplicationState::addDrawableObject(DrawableObject& drawable) { drawableObjects.push_back(&drawable); if (drawable.isClickable()) addClickableObject(drawable, drawable.getLayer()); }
void ApplicationState::addClickableObject(DrawableObject& clickable, int z) { if (!clickable.isClickable()) return; clickableObjects[z].insert(clickable); }