示例#1
0
	void GameObject::AddMakedComponent(type_index TypeIndex, const shared_ptr<Component>& component) {
		if (!SearchComponent(TypeIndex)) {
			/** Not Component  AddList  */
			pImpl->m_ComponentList.push_back(TypeIndex);

		}
		/** Add Attached Component  */
		pImpl->m_ComponentData[TypeIndex] = component;
		component->AttachGameObject(GetThis<GameObject>());
	}
示例#2
0
	void GameObject::SetTransform(const shared_ptr<Transform>& transform)
	{
		transform->AttachGameObject(GetThis<GameObject>());
		pImpl->m_Transform = transform;
	}