| 129 | } |
| 130 | |
| 131 | void OvCore::ECS::Actor::SetParent(Actor& p_parent) |
| 132 | { |
| 133 | DetachFromParent(); |
| 134 | |
| 135 | /* Define the given parent as the new parent */ |
| 136 | m_parent = &p_parent; |
| 137 | m_parentID = p_parent.m_actorID; |
| 138 | transform.SetParent(p_parent.transform); |
| 139 | |
| 140 | /* Store the actor in the parent children list */ |
| 141 | p_parent.m_children.push_back(this); |
| 142 | |
| 143 | AttachEvent.Invoke(*this, p_parent); |
| 144 | } |
| 145 | |
| 146 | void OvCore::ECS::Actor::DetachFromParent() |
| 147 | { |
no test coverage detected