Huge rework of editor and other changes.
This commit is contained in:
22
Nuake/src/Scene/Components/BoxCollider.cpp
Normal file
22
Nuake/src/Scene/Components/BoxCollider.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "BoxCollider.h"
|
||||
#include "src/Resource/Serializable.h"
|
||||
|
||||
namespace Nuake
|
||||
{
|
||||
json BoxColliderComponent::Serialize()
|
||||
{
|
||||
BEGIN_SERIALIZE();
|
||||
|
||||
j["IsTrigger"] = IsTrigger;
|
||||
SERIALIZE_VEC3(Size);
|
||||
END_SERIALIZE();
|
||||
}
|
||||
|
||||
bool BoxColliderComponent::Deserialize(const std::string& str)
|
||||
{
|
||||
BEGIN_DESERIALIZE();
|
||||
this->IsTrigger = j["IsTrigger"];
|
||||
this->Size = Vector3(j["Size"]["x"], j["Size"]["y"], j["Size"]["z"]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user