small fises in deleting Transformables WIP
This commit is contained in:
@@ -34,6 +34,10 @@ namespace TSE
|
||||
objectEntries[id] = this;
|
||||
}
|
||||
|
||||
Transformable::~Transformable()
|
||||
{
|
||||
}
|
||||
|
||||
Vector3 Transformable::forward() const
|
||||
{
|
||||
return Vector3::Normalize(GetGlobalMatrix() * Vector3::forward - GetGlobalMatrix() * Vector3::zero);
|
||||
@@ -368,12 +372,15 @@ namespace TSE
|
||||
if(!onlyThis)
|
||||
for(auto child : t->children)
|
||||
{
|
||||
HardDelete(child);
|
||||
HardDelete(child, onlyThis);
|
||||
}
|
||||
|
||||
//deleting atteched scripts
|
||||
for (auto& [_, script] : t->components)
|
||||
{
|
||||
delete script;
|
||||
}
|
||||
t->components.clear();
|
||||
|
||||
//deleting self
|
||||
Delete(t);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace TSE
|
||||
Transformable(uuids::uuid id);
|
||||
Transformable(const string& name);
|
||||
Transformable(const string& name, uuids::uuid id);
|
||||
~Transformable() = default;
|
||||
~Transformable();
|
||||
|
||||
Vector3 forward() const;
|
||||
Vector3 right() const;
|
||||
|
||||
Reference in New Issue
Block a user