46 return std::vector<GameObject*>();
49 std::vector<GameObject*> children;
51 if (childSceneNode->getGameObject() !=
nullptr)
52 children.push_back(childSceneNode->getGameObject());
std::vector< Component * > m_components
List of attached components.
std::string m_id
Unique identifier for the GameObject.
std::vector< Script * > m_scripts
List of attached scripts.
void render()
Renders this GameObject and its components.
SceneNode * getSceneNode()
Gets the SceneNode associated with this GameObject.
std::string getTag()
Gets the tag identifier of the GameObject.
void input()
Processes input for this GameObject and its components.
std::vector< GameObject * > getChildren()
Gets all child GameObjects.
GameObject(std::string tag)
Constructs a new GameObject with the specified tag.
~GameObject()
Destructor that cleans up the GameObject and its SceneNode.
std::string m_tag
Category identifier (e.g., "Enemy", "Projectile")
void setSceneNode(SceneNode *sceneNode)
Sets the SceneNode for this GameObject.
SceneNode * m_sceneNode
Node in the scene graph hierarchy.
std::string getId()
Gets the unique identifier of the GameObject.
void update()
Updates this GameObject and its components.
static std::atomic< uint64_t > m_totalObjects
Total number of game objects created.
static std::atomic< uint64_t > m_aliveObjects
Current number of active game objects.
Represents a node in the scene graph, encapsulating a game object and its hierarchy.
const std::vector< SceneNode * > getChildren()
Returns the children of this node.
Defines the SceneManager class for managing scenes in the game.
Defines the Texture component for managing textures within the Game Engine, encapsulating SDL texture...