#pragma once #include #include "RTTI.h" #include "RTTI_Meta.h" #include "Game/SaveMap/ISave.h" #include "Delegate/Delegate.h" #include "Math/Vector.h" GENERATE_META(Actor) class Actor : public ISave, public IRTTI { Vector3D loc; Vector3D rot; Vector3D scale; std::list tags; public: Actor(); Delegate OnSetActorLocate; Delegate OnSetActorRotate; #pragma region ISave virtual std::shared_ptr save() override; virtual void load(std::shared_ptr save) override; #pragma endregion virtual void BeginPlay(); virtual void Tick(double delta_time); /* * Изменяет положение в пространстве * Вызывает делегат OnSetActorLocate */ void SetActorLocate(const Vector3D& loc) noexcept; inline const Vector3D& GetActorLocate() const { return loc; } /* * Изменяет ориентацию в пространстве * Вызывает делегат OnSetActorRotate */ void SetActorRotate(const Vector3D& rot) noexcept; inline const Vector3D& GetActorRotate() const { return rot; } void AddTag(const std::string& tag) noexcept; void RemoveTag(const std::string& tag) noexcept; const std::list& GetTags() const { return tags; } };