This page has been translated automatically.
Программирование
Fundamentals
Setting Up Development Environment
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

EntityData Class

Warning
Game Framework is deprecated and no longer supported. We can't guarantee the stable work of the framework.

Provides an access to the game entity data.

The EntityData class implementation can be found in the data/framework/game/game_data.h file.

EntityData Class

Members


void setDescription (string description)

Sets an entity description.

Arguments

  • string description - Entity description.

string getDescription()

Returns an entity description.

Return value

Entity description.

void setEntityFile(string path)

Sets a relative path to an entity file.

Arguments

  • string path - Relative path to an entity file.

string getEntityFile(int is_absolute = false)

Returns a path to the *.entity file relative todata_path.

Arguments

  • int is_absolute - Flag indicating if an absolute file path is returned. 1 to return an absolute file path; otherwise 0.

Return value

Path to the *.entity file.

GameData getGameData()

Returns an instance of the GameData class, to which an entity belongs to.

Return value

GameData class instance.

void setLogicFile(string path)

Sets a relative path to the logic file.

Arguments

  • string path - Relative path to the *.h file.

string getLogicFile(int is_absolute = false)

Returns a relative path to the logic file of the entity.

Arguments

  • int is_absolute - Flag indicating if an absolute file path is returned. 1 to return an absolute file path; otherwise 0.

Return value

Path to the *.h file.

int setName(string name)

Sets an entity name.

Arguments

  • string name - Entity name.

Return value

1 if the new name is set successfully; otherwise 0.

string getName()

Returns an entity name.

Return value

Entity name.

void setNodeFile(string path)

Sets a relative path to the *.node file.

Arguments

  • string path - Relative path to the *.node file.

string getNodeFile(int is_absolute = false)

Returns a path to the *.node file relative todata_path.

Arguments

  • int is_absolute - Flag indicating if an absolute file path is returned. 1 to return an absolute file path; otherwise 0.

Return value

Path to the *.node file.

void setPropertyFile(string path)

Sets a relative path to the property file.

Arguments

  • string path - Relative path to the *.prop file.

string getPropertyFile(int is_absolute = false)

Returns a relative path to the property file of the entity.

Arguments

  • int is_absolute - Flag indicating if an absolute file path is returned. 1 to return an absolute file path; otherwise 0.

Return value

Path to the *.prop file.

EntityData(GameData game_data, string name)

Constructor. Creates a new EntityData class instance.

Arguments

  • GameData game_data - Instance of the GameData class, to which the entity belongs to.
  • string name - Entity name.

int loadData(Xml xml)

Reads entity data from the Xml class instance.

Arguments

  • Xml xml - Data on the entity.

Return value

1 if data is loaded successfully; otherwise 0.

void saveData(Xml xml)

Writes data on the entity to the instance of the Xml class.

Arguments

  • Xml xml - Instance of the Xml class to write data.
Last update: 03.07.2017
Build: ()