Move world on unordered_map and object_ptr
This commit is contained in:
@@ -8,7 +8,7 @@ void Actor::OnDestroy()
|
||||
{
|
||||
}
|
||||
|
||||
Actor::Actor()
|
||||
Actor::Actor() : loc(new Vector3D), rot(new Vector3D), scale(new Vector3D)
|
||||
{
|
||||
SetType(Classes::Actor);
|
||||
}
|
||||
@@ -60,9 +60,3 @@ void Actor::RemoveTag(const std::string& tag) noexcept
|
||||
{
|
||||
tags.remove(tag);
|
||||
}
|
||||
|
||||
void Actor::Destroy()
|
||||
{
|
||||
OnDestroy();
|
||||
//world_->actors.remove(this);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ GENERATE_META(Actor)
|
||||
class Actor : public ISave, public IRTTI
|
||||
{
|
||||
World* world_;
|
||||
std::string name_;
|
||||
|
||||
UType::object_ptr<Vector3D> loc, rot, scale;
|
||||
|
||||
@@ -53,9 +54,9 @@ public:
|
||||
void AddTag(const std::string& tag) noexcept;
|
||||
void RemoveTag(const std::string& tag) noexcept;
|
||||
const std::list<std::string>& GetTags() const { return tags; }
|
||||
void Destroy();
|
||||
|
||||
World* GetWorld() const { return world_; }
|
||||
const std::string& GetName() const { return name_; }
|
||||
|
||||
friend class World;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user