4 #include <ThirdParty/cereal/include/cereal/archives/binary.hpp> 5 #include <ThirdParty/cereal/include/cereal/archives/json.hpp> 36 return owner.lock()->GetAllComponents();
49 return pointerReference;
52 void Component::SetOwner(eastl::weak_ptr<Entity> owner)
57 void Component::SetPointerReference(eastl::weak_ptr<Component> pointerReference)
59 this->pointerReference = pointerReference;
62 template <
typename archive>
68 template <
typename archive>
void SaveBaseComponent(archive ar)
Saves the data of this component to a archive (all derived classes have their own version...
virtual void OnBeginContact(eastl::weak_ptr< Entity > entity)
virtual void Update()
The update method of this component. NOTE: This method will not be called in case the entity is disab...
virtual void InitializeComponent()
This method is used to initialize your component in. This method is called after the setting of the o...
eastl::weak_ptr< Entity > GetOwner() const
This method allows you to get the entity holding this component.
void LoadBaseComponent(archive ar)
loads the data from the archive to this component (all derived classes have their own version...
eastl::vector< eastl::shared_ptr< Component > > GetAllComponents() const
Returns all the components of this entity.
eastl::weak_ptr< Component > GetPointerRefence() const
This method allows you to get a direct refence to the weak pointer of this component.
virtual void OnEndContact(eastl::weak_ptr< Entity > entity)
virtual void OnComponentRemoved(eastl::weak_ptr< Component > removedComponent)
This method will be called whenever a component has been removed from the entity. ...
virtual void OnComponentAdded(eastl::weak_ptr< Component > addedComponent)
This method will be called whenever a component has been added to the entity.