示例#1
0
void BaseSkeleton::setAttachment (const string &slotName, const string &attachmentName) {
	for (int i = 0, n = slots.size(); i < n; i++) {
		Slot *slot = slots[i];
		if (slot->data->name == slotName) {
			slot->setAttachment(getAttachment(i, attachmentName));
			return;
		}
	}
	throw invalid_argument("Slot not found: " + slotName);
}