Add classes Mesh and StaticMesh

This commit is contained in:
Jiga228
2025-10-10 19:39:30 +07:00
parent 2b2ed1f050
commit fedffa7634
14 changed files with 118 additions and 20 deletions
+4 -3
View File
@@ -6,6 +6,7 @@
#include "RTTI.h"
#include "Game/Actors/Actor.h"
#include "Game/Actors/Mesh/Mesh.hpp"
class GameInstance;
@@ -36,8 +37,8 @@ public:
Container list;
for (auto i = actors.cbegin(); i != actors.cend(); ++i)
{
if (RTTI::IsA<T>(*i))
list.push_back(*i);
if (T* cast_object = RTTI::dyn_cast<T>(*i))
list.push_back(cast_object);
}
return list;
}
@@ -52,7 +53,7 @@ public:
return object;
}
template<class Container = std::vector<Actor*>>
template<class T, class Container = std::vector<T*>>
Container GetActorsByTag(std::string tag)
{
Container container;