Monad Engine da02fba2
> Undercity Codex_
Loading...
Searching...
No Matches
PhysicsComponent.h
Go to the documentation of this file.
1#pragma once
2#include "scene/Component.h"
3#include "physics/RigidBody.h"
4
5namespace eng
6{
8 {
10 public:
11 PhysicsComponent() = default;
12 PhysicsComponent(const std::shared_ptr<RigidBody>& body);
13
14 void LoadProperties(const nlohmann::json& json) override;
15 void Init() override;
16 void Update(float deltaTime) override;
17
18 void SetRigidBody(const std::shared_ptr<RigidBody>& body);
19 const std::shared_ptr<RigidBody>& GetRigidBody();
20
21 private:
22 std::shared_ptr<RigidBody> m_rigidBody;
23 };
24}
void LoadProperties(const nlohmann::json &json) override
PhysicsComponent()=default
void SetRigidBody(const std::shared_ptr< RigidBody > &body)
const std::shared_ptr< RigidBody > & GetRigidBody()
void Update(float deltaTime) override
#define COMPONENT(ComponentClass)
Definition Component.h:105