Move to object_ptr

This commit is contained in:
Jiga228
2025-10-17 21:39:30 +07:00
parent 136235749a
commit 137522cefa
8 changed files with 58 additions and 48 deletions
+4 -5
View File
@@ -7,6 +7,7 @@
#include "Game/SaveMap/ISave.h"
#include "Delegate/Delegate.h"
#include "Math/Vector.hpp"
#include "Types/object_ptr.hpp"
class World;
GENERATE_META(Actor)
@@ -15,9 +16,7 @@ class Actor : public ISave, public IRTTI
{
World* world_;
Vector3D loc;
Vector3D rot;
Vector3D scale;
UType::object_ptr<Vector3D> loc, rot, scale;
std::list<std::string> tags;
@@ -42,14 +41,14 @@ public:
* Вызывает делегат OnSetActorLocate
*/
void SetActorLocate(const Vector3D& loc) noexcept;
inline const Vector3D& GetActorLocate() const { return loc; }
inline const UType::object_ptr<Vector3D> GetActorLocate() const { return loc; }
/*
* Изменяет ориентацию в пространстве
* Вызывает делегат OnSetActorRotate
*/
void SetActorRotate(const Vector3D& rot) noexcept;
inline const Vector3D& GetActorRotate() const { return rot; }
inline const UType::object_ptr<Vector3D> GetActorRotate() const { return rot; }
void AddTag(const std::string& tag) noexcept;
void RemoveTag(const std::string& tag) noexcept;