15#include "VEX/VEX_export.h"
82const std::vector<std::shared_ptr<GameObject>>&
GetAllObjects()
const {
return m_objects; }
86const std::vector<std::shared_ptr<GameObject>>&
GetAllAddedObjects()
const {
return m_addedObjects; }
95void Save(
const std::string& outputPath);
100void AddEditorGameObject(
GameObject* gameObject);
102std::string GetScenePath(){
108void FlushDestructionQueue();
121std::vector<std::shared_ptr<GameObject>> m_objects;
122std::vector<std::shared_ptr<GameObject>> m_addedObjects;
123std::vector<GameObject*> m_pendingDestruction;
126bool m_creatingFromScene =
false;
Contains main Engine class.
This file defines GameObjectFactory class used to auto register GameObjects.
This file defines the GameObject class.
Class for interaction with engine systems.
Its base class for all game objects, eg. Player, Enemy, Weapon. Your Class needs to inherit from it.
Scene(const std::string &path, Engine &engine)
Constructor creates empty scene object.
GameObject * GetGameObjectByEntity(vex::Entity &entity)
Function to get a game object by its entity ID.
void RegisterGameObject(GameObject *gameObject)
Registers a game object into the scene's internal storage.
std::vector< GameObject * > GetAllGameObjectsByClassName(const std::string &classname)
Function to get all game objects of a specific class type.
void DestroyGameObject(GameObject *gameObject)
Marks a game object for destruction.
const std::vector< std::shared_ptr< GameObject > > & GetAllAddedObjects() const
Function to get all added game objects in the scene.
void AddGameObject(std::unique_ptr< GameObject > gameObject)
[Deprecated] Function to add a game object to the scene.
std::vector< GameObject * > GetAllGameObjectsByName(const std::string &name)
Function to get all game objects with a specific name.
void sceneBegin()
Calls BeginPlay on all objects in the scene.
void sceneUpdate(float deltaTime)
Updates all objects in the scene.
const std::vector< std::shared_ptr< GameObject > > & GetAllObjects() const
Function to get all game objects in the scene.
uint32_t Entity
Type alias representing a unique entity identifier in the ECS system.