Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Olympe::EntityPrefab Struct Reference

#include <PrefabLoader.h>

Public Member Functions

 EntityPrefab ()
 
 EntityPrefab (const std::string &name)
 
json ToJson () const
 

Static Public Member Functions

static EntityPrefab FromJson (const json &data)
 

Public Attributes

std::string prefabName
 
std::string prefabPath
 
std::vector< ComponentDatacomponents
 
std::map< std::string, std::string > metadata
 
int schemaVersion
 

Detailed Description

Definition at line 97 of file PrefabLoader.h.

Constructor & Destructor Documentation

◆ EntityPrefab() [1/2]

Olympe::EntityPrefab::EntityPrefab ( )
inline

Definition at line 105 of file PrefabLoader.h.

◆ EntityPrefab() [2/2]

Olympe::EntityPrefab::EntityPrefab ( const std::string &  name)
inlineexplicit

Definition at line 110 of file PrefabLoader.h.

Member Function Documentation

◆ FromJson()

EntityPrefab Olympe::EntityPrefab::FromJson ( const json data)
static

Definition at line 18 of file PrefabLoader.cpp.

References GetComponentTypeID_Static(), and prefabName.

Referenced by Olympe::PrefabLoader::LoadFromFile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ToJson()

json Olympe::EntityPrefab::ToJson ( ) const

Definition at line 17 of file PrefabLoader.cpp.

References components, GetComponentTypeID_Static(), metadata, prefabName, prefabPath, schemaVersion, and ToJson().

Referenced by ToJson().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ components

std::vector<ComponentData> Olympe::EntityPrefab::components

Definition at line 101 of file PrefabLoader.h.

Referenced by ToJson().

◆ metadata

std::map<std::string, std::string> Olympe::EntityPrefab::metadata

Definition at line 102 of file PrefabLoader.h.

Referenced by ToJson().

◆ prefabName

std::string Olympe::EntityPrefab::prefabName

Definition at line 99 of file PrefabLoader.h.

Referenced by FromJson(), and ToJson().

◆ prefabPath

std::string Olympe::EntityPrefab::prefabPath

Definition at line 100 of file PrefabLoader.h.

Referenced by ToJson().

◆ schemaVersion

int Olympe::EntityPrefab::schemaVersion

Definition at line 103 of file PrefabLoader.h.

Referenced by ToJson().


The documentation for this struct was generated from the following files: